Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 351861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:41:00+00:00 2026-05-12T11:41:00+00:00

Does anyone know of an available PHP function that takes a piece of text,

  • 0

Does anyone know of an available PHP function that takes a piece of text, with say a few hundreds of words long and produces an array of keywords? Ie. the most important, frequently occuring unique terms?

Thanks
Philip

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:41:00+00:00Added an answer on May 12, 2026 at 11:41 am

    No such function exists (would be magical if it did) but to start something off, you could do the following:

    1. Split the text at the space,
      producing an array of words.
    2. Remove stop-words and
      unnecessary punctuation and symbols (possibly using regular expressions – See preg_replace).
    3. Count the number of occurences of
      each word in the remaining array,
      and sort it in order of frequency
      (so the most frequently occuring word is at the first offset, i.e. $words[0]).
    4. Use array_unique to remove the
      duplicates, thus producing an array
      of unique keywords ordered by
      frequency of occurrence.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

does anyone know of a module thats available for asp.net that uses a queue
Does anyone know if the MS Sync Framework source code is available and how
Does anyone know if there is any language detection script/library available for javascript? I
Does anyone know of a web development toll which will tell me what physical
Does anyone know of any way to list open transactions on SQL Server 2000
Does anyone know how to check if a Youtube video is embeddable using the
Does anyone know of a jQuery grid plugin with filterable columns? Obviously there are
I'm generating PDFs dynamically using PHP and PDFlib and some of the fields require
I am trying to make a form which would check if an username is
In an Win/IE environment with the right settings you can fire up a .exe

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.