-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Sentences containing single number get incorrect POS tag #2285
Comments
Merging this with #3052. We've now added a master thread for incorrect predictions and related reports – see the issue for more details. In this case, it's also important to note that the part-of-speech tagger generally expects sentences or at least more than one token to really predict the part-of-speech tag based on the context. So it makes sense that it struggles if there's no context around the word. As a workaround, you could add a custom pipeline component that check whether the token consists of digits ( |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I found that sentences containing a single number, e.g. "2", get an incorrect POS tag
'PUNCT'
instead of the'NUM
' tag.>> (u'2', u'PUNCT')
Note that in other languages, such as Dutch or French, the POS gives the correct tag. Furthermore, once the number is larger than 6, the POS tag switches to
'NUM'
.Following versions:
Python version 2.7.14
Platform Linux-4.13.0-39-generic-x86_64-with-Ubuntu-17.10-artful
spaCy version 2.0.9
The text was updated successfully, but these errors were encountered: