This repository was archived by the owner on Aug 9, 2023. It is now read-only.
Closed
Conversation
Allows CLI functions defined by plac (or argparse) to be called using the following syntax: `python -m wellcomeml <command>`
This was referenced Feb 13, 2020
Closed
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that there is https://github.com/wellcometrust/deep_reference_parser, I'm moving the associated utilities out of datalabs into
wellcomeml.nlpso we can access them easily on any platform. This is quite large, so let me know if you would prefer me to chop it up into smaller PRs, I think most of it is tests though.This class allows you to convert manual reference annotations in prodigy into token annotations.
The other significant change here is that I had added a
__main__.pyinspired by SpaCy. This basically gives us an entry point into the package functions like so:This plugs into the cli of each of these functions, so you can also do:
I quite like this pattern for getting CLI access to the code without creating explicit entry points in
setup.py. I think some of these functions are borderline in terms of their fit in WellcomeML, see what you think, happy to put them indeep_reference_parserif not here.