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

Add spacy NER, fix some UI. #425

Merged
merged 7 commits into from
Jul 6, 2023
Merged

Add spacy NER, fix some UI. #425

merged 7 commits into from
Jul 6, 2023

Conversation

nsthorat
Copy link
Contributor

@nsthorat nsthorat commented Jul 6, 2023

spacy.mp4

@nsthorat nsthorat changed the title [not ready] Add spacy NER, fix some UI. Add spacy NER, fix some UI. Jul 6, 2023
@nsthorat nsthorat requested a review from dsmilkov July 6, 2023 18:58
"""Named entity recognition with SpaCy

For details see: [spacy.io/models](https://spacy.io/models).
""" # noqa: D415, D400
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@dsmilkov dsmilkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

:raises: SystemExit: if the model_name cannot be downloaded.
"""
try:
model_module = import_module(model_name)
Copy link
Collaborator

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied yours, thanks!

@nsthorat nsthorat merged commit 85dc3c7 into main Jul 6, 2023
3 checks passed
@nsthorat nsthorat deleted the nik-spacy-ner branch July 6, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Progress bars should be reported in time intervals, not progress intervals.
2 participants