4 ms·
You may use Levenshtein Distance to get better results by taking word variations into account. And also you can enhance it by using semantic similarity scores
by sixtosugarman 12y ago
You may use Levenshtein Distance to get better results by taking word variations into account.
And also you can enhance it by using semantic similarity scores for strings.
- mazelife 12y agoIf you're willing to get into actual NLP, then semantic similarity would certainly be one way to go. Is there any equivalent to Stanford (Java) or NLTK (Python) in Ruby land? But I'm not sure that Levenshtein will necessarily get you better results than the bag-of-words approach the author is taking with Jaccard distance, if all you're doing is document classification.
- jbranchaud 12y agoAs far as NLP libraries in Ruby land, there is both [treat](https://github.com/louismullie/treat https://github.com/louismullie/treat) and [ruby bindings to the Stanford Core NLP](https://github.com/louismullie/stanford-core-nlp https://github.com/louismullie/stanford-core-nlp).
- otobrglez 12y agoI've used OpenNLP with jRuby for my NLP experiment. Check it out https://github.com/otobrglez/politiki-ner https://github.com/otobrglez/politiki-ner to get an idea how to mix it.