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 if there's an available python library compatible with Python2.6 that exposes
Does anyone know of a "similar words or keywords" algorithm available in open source
Does anyone know of any freely available scheduling control for Silverlight 3? Something that
Does anyone know of some global state variable that is available so that I
does anyone know of a module thats available for asp.net that uses a queue
Does anyone know if there are any Sublime Text 2 packages available to enable
Does anyone know of available Javadoc for Tibco rvd datagrams (specifically, class com.tibco.tibrv.TibrvMsg)? It
Does anyone know of any publicly available Question answering applications which have built using
Does anyone know when a tool will be available to manage a SQL Azure
Does anyone know if views states (used in Silverlight) will be available in next

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.