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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
No such function exists (would be magical if it did) but to start something off, you could do the following:
producing an array of words.
unnecessary punctuation and symbols (possibly using regular expressions – See
preg_replace).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]).duplicates, thus producing an array
of unique keywords ordered by
frequency of occurrence.