Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nltk.pos_tag performance #1110

Closed
stevenbird opened this issue Sep 5, 2015 · 6 comments
Closed

nltk.pos_tag performance #1110

stevenbird opened this issue Sep 5, 2015 · 6 comments
Milestone

Comments

@stevenbird
Copy link
Member

NLTK's built-in POS tagger doesn't perform so well:

>>> text = word_tokenize("The quick brown fox jumps over the lazy dog")
>>> pos_tag(text)
[('The', 'DT'), ('quick', 'NN'), ('brown', 'NN'), ('fox', 'NN'), ('jumps', 'NNS'), ('over', 'IN'), ('the', 'DT'), ('lazy', 'NN'), ('dog', 'NN')]

We need a better built-in model.

cf. http://stackoverflow.com/questions/30821188/python-nltk-pos-tag-not-returning-the-correct-part-of-speech-tag

@stevenbird stevenbird added this to the 3.1 milestone Sep 5, 2015
@alvations
Copy link
Contributor

@stevenbird , I think the simplest to "reimplement" with top quality accuracy is actually honnibal's perception tagger.

Next, the simplest to implement with unknown accuracy is ngram taggers with backoff ngram taggers using existing tagger corpora in NLTK or redistributable model that one can build with LDC's corpora (something like Spaghetti tagger.

There's one hand-crafted tagger with unknown accuracy too in nltk.parse.malt. Other rule-based tagger to consider is from CLIPS' pattern.en. The major caveats of pattern's tagger is the dependence on lexicon: https://raw.githubusercontent.com/clips/pattern/master/pattern/text/en/en-lexicon.txt

My last suggestion is a pre-trained Brill tagger, pattern has a list of rules: https://github.com/clips/pattern/blob/master/pattern/text/en/en-context.txt

@stevenbird
Copy link
Member Author

@alvations: thanks for those suggestions. It looks like Honnibal's tagger uses an MIT license. @syllog1sm is there any objection to including this tagger in NLTK?

@honnibal
Copy link

honnibal commented Sep 7, 2015

Sure, go ahead. You might want my transition-based parser too, which is also under MIT I think.

@stevenbird
Copy link
Member Author

@honnibal – great, thanks very much

@stevenbird
Copy link
Member Author

@stevenbird
Copy link
Member Author

Resolved by #1122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants