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

Mimic spaCy pipeline API #83

Open
6 tasks
sam-writer opened this issue Sep 22, 2020 · 0 comments
Open
6 tasks

Mimic spaCy pipeline API #83

sam-writer opened this issue Sep 22, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@sam-writer
Copy link
Contributor

replaCy extensions can be added... but not removed or renamed. We also don't constrain component names to be unique. So to match the spaCy API (and just have reasonable functionality), we need:

  • remove_pipe method
  • rename_pipe method
  • replace_pipe method
  • when instantiating ReplaceMatcher, allow disable=["any built in component"] passed as kwarg to disable those components for that instance
  • when calling ReplaceMatcher.__call__, allow disable=["any built in component"] passed as kwarg to disable those components for that invocation
  • (maybe) disable_pipes context manager

see the spaCy docs.

the context manager would look like:

replaCy = ReplaceMatcher(stuff)

with replaCy.disable_pipes("scorer"):
    spans = replaCy("some text")
@sam-writer sam-writer added the enhancement New feature or request label Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant