GEM-benchmark / NL-Augmenter

NL-Augmenter 🦎 → 🐍 A Collaborative Repository of Natural Language Transformations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`gender_neutral_rewrite` Unresolved references to spaCy and Unresolved List reference

Saad-Mahamood opened this issue · comments

When running the gender_neutral_rewrite there are several unresolved references to the spacy_nlp variable. In particular on line:

  • Line 27: self.nlp = spacy_nlp if spacy_nlp else spacy.load("en_core_web_sm")

Please use from initialize import spacy_nlp to get a handle on the global spacy instance.

There is also an unresolved reference on Line 495: def generate(self, sentence: str) -> List[str]. List[str] is not resolvable. Should this be lower case? e.g. list[str]

Thanks for pointing this out. Made a PR here: #324