Repository navigation
Pass extra Stanza arguments through StanzaAsSpacy - #1
Open
Agnieszkachr wants to merge 1 commit into
Open
Agnieszkachr wants to merge 1 commit into
Agnieszkachr wants to merge 1 commit into
Conversation
Forward **kwargs from stanza_config to stanza.Pipeline, so that settings such as lemma_model_path and pos_model_path are no longer ignored.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Thank you for releasing ALMA together with the data and benchmarking scripts! It is a very useful tool, and it was easy to reproduce your Greek results with it.
CollationALMAcreates the tagger withStanzaAsSpacy(**stanza_config).StanzaAsSpacy.__init__collects the remaining keys in**kwargs, and both its docstring and the README (wherestanza_configis described as a "Configuration dict forwarded to Stanza") say they are passed to the Stanza pipeline, butstanza.Pipelinewas called withlang,processorsanduse_gpuonly. Keys such aslemma_model_pathandpos_model_pathwere therefore silently ignored, and Stanza loaded its default model for the language.In practice, with the Greek configuration in
paper/benchmarking/benchmarking.py:lemma_model_pathandpos_model_pathpoint to../../stanza_models/grc_proielnodia_lemmatizer.ptandgrc_proielnodia_tagger.pt, but these models are never loaded; the lemma and POS steps of ALMA run with Stanza's default Ancient Greek model instead, which expects accented text;stanza_modelsare missing: I noticed the issue because the benchmark ran without them and reproduced the Greek means inpaper/results/john_greek_all_res_mean.csv;no_parse=Trueare not affected, since they do not use Stanza.This one-line change forwards
**kwargstostanza.Pipeline.Note:
stanza_modelsis listed in.gitignore, so these files are not in the repository. With this change they need to be present locally, otherwise Stanza will raise a missing-file error.