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

Allow users to override NER with known locations #7

Open
ahalterman opened this issue Apr 10, 2023 · 0 comments
Open

Allow users to override NER with known locations #7

ahalterman opened this issue Apr 10, 2023 · 0 comments

Comments

@ahalterman
Copy link
Owner

Sometimes the spaCy NER step fails with very short documents, including examples where the entire document is just a single sentence, because it's lacking the usual context to identify locations. This happens especially with locations outside of Europe or English-speaking countries because of the limitations of the NER training data.

It would be nice to allow users to override the NER step and force a geolocation on a known entity.

The easiest way to do this would probably be to:

  • pull most of the geolocation logic out of geoparse_doc into a separate function
  • create a new function (geoparse_ent?) that takes a document + entity string as arguments. It can then manually add the string entity as a spaCy entity, and then call the new function above.
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

1 participant