Simple NLP: How to use ngram to do word similarity?

Posted by sadawd on Stack Overflow See other posts from Stack Overflow or by sadawd
Published on 2010-03-15T03:39:08Z Indexed on 2010/03/15 3:49 UTC
Read the original article Hit count: 298

Filed under:

Dear Everyone, I Hear that google uses up to 7-grams for their own data. I am interested in finding words that are similar in context (i.e. cat and dog) and I was wondering how do I compute the similarity of two words on a n-gram model given that n > 2.

Given a sample set like this forexample: (I, love cats), (cats, loves, dogs), (dogs, hate, human)

What is a good way to compare the similarity of this pair (I, cats)?

Also does anyone know of anyway to do levels for NLP? like: Army->Military->Solider ?

© Stack Overflow or respective owner

Related posts about nlp