fabianvf/python-rake

Filter results by word/phrase category

Closed this issue · 2 comments

Love the package! I was wondering if there is a way to return only results that fit one of NLTK's "Parts of Speech"? I'd love to contribute, but sadly my knowledge regarding the inner workings of NLTK is a bit lacking (at the moment!).

As an example, I'm hoping to use some NLTK/RAKE type package to automatically assign keywords to blog posts. After running a few test scenarios using the current package, I find that some of the higher-ranked keywords returned by python-rake are, say, adjectives, adverbs, etc., where I'm really hoping for nouns, noun phrases, possibly even proper nouns.

I feel like this feature would benefit anyone using the package, but I could be wrong. Thoughts?

This seems beyond the scope of the intent of this project to me. That being said, it seems fairly trivial to do on your own. You'd just take the list of words produced by rake, tag them with NLTK, and remove the ones with a tag you don't want to keep.

Understandable, thanks for the tip!