Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

find the root word of a word

I need to build a php dictionary, which will find the root word of a word. Ex. search "cars", it will tell "Cars is plural of car" Or "took", it's "the past tense of take"

I am considering using Wordnet, but it seems complicated.

Any suggestion? m desperated

Regards;

like image 956
jack 101 Avatar asked Mar 27 '11 17:03

jack 101


1 Answers

Well, since suggested stemmer does not work correctly for you, you can choose some, that suits you better from here:

http://snowball.tartarus.org/

Here is also some interesting library: http://sourceforge.net/projects/nlp/

Also links to similiar questions on StackOverflow:

NLP programming tools using PHP?

Text mining with PHP

UPDATE: How do I do word Stemming or Lemmatization?

http://www.reddit.com/r/programming/comments/8e5d3/how_do_i_programatically_do_stemming_eg_eating_to/

http://www.nltk.org/

Wordnet lemmatizer: http://wordnet.princeton.edu/wordnet/download/

like image 198
Vladislav Rastrusny Avatar answered Oct 21 '22 22:10

Vladislav Rastrusny