-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
sentence segmentation error #592
Comments
Thanks! One of the features of 1.0 I haven't documented yet is that it's now easy to fix this sort of thing at run-time, without messing with data files. You should be able to do: import spacy.en
spacy.en.English.Defaults.tokenizer_exceptions["Ph.D."] = [{"F": "Ph.D."}] What you're doing here is telling the tokenizer, "when you see this chunk, 'Ph.D.', process it into these tokens". The list you're giving it here has just one token, and you've specified its form (with the F key). You can also specify its POS and lemma (with P and L). This is a little dinky --- it should support full token attributes. |
Cool! That works! |
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 know that sentence segmentation is more difficult than it appears, but this looks like an error that spaCy might want to know about. Or if there is something I am doing wrong, it would be good for me to know :)
results in
In Python 3.5, spaCy version 1.1.2.
The text was updated successfully, but these errors were encountered: