-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add spacy NER, fix some UI. #425
Conversation
src/signals/ner.py
Outdated
"""Named entity recognition with SpaCy | ||
|
||
For details see: [spacy.io/models](https://spacy.io/models). | ||
""" # noqa: D415, D400 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove noqa if you end the first line with a period
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
src/signals/ner.py
Outdated
:raises: SystemExit: if the model_name cannot be downloaded. | ||
""" | ||
try: | ||
model_module = import_module(model_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use this util in text_statistics?
also see the code in text_statistics to avoid try /catch
if not spacy.util.is_package(SPACY_LANG_MODEL):
spacy.cli.download(SPACY_LANG_MODEL)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied yours, thanks!
spacy.mp4