Search code examples
phpcomparisonsimilarity

Get category for texts


I want to choose a category of text(article)(ex. sport,economic), string, and I want to know whether the best way to do with function similar_text() or otherwise. I need to compare the texts. One article is a description which should be assigned to categories. The second text is actually text with all the key words that describe the category. Comparing the two texts given the percentage of similarity. Text that has the most similarities with the particular category is in fact and that category. Should I do this cryptographic similar_text() or otherwise?


Solution

  • I would use a Bayesian classifier to determine the degree of similarity.