Rename Polish lemmatizer method (#5960)

Rename Polish lemmatizer method to `pos_lookup` to distinguish it from
pure token-based lookup methods.
This commit is contained in:
Adriane Boyd 2020-08-25 00:22:27 +02:00 committed by GitHub
parent e12b03358b
commit abd3f2b65a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ class Polish(Language):
@Polish.factory(
"lemmatizer",
assigns=["token.lemma"],
default_config={"model": None, "mode": "lookup", "lookups": None},
default_config={"model": None, "mode": "pos_lookup", "lookups": None},
scores=["lemma_acc"],
default_score_weights={"lemma_acc": 1.0},
)

View File

@ -12,7 +12,7 @@ class PolishLemmatizer(Lemmatizer):
@classmethod
def get_lookups_config(cls, mode: str) -> Dict:
if mode == "lookup":
if mode == "pos_lookup":
return {
"required_tables": [
"lemma_lookup_adj",
@ -29,7 +29,7 @@ class PolishLemmatizer(Lemmatizer):
else:
return super().get_lookups_config(mode)
def lookup_lemmatize(self, token: Token) -> List[str]:
def pos_lookup_lemmatize(self, token: Token) -> List[str]:
string = token.text
univ_pos = token.pos_
morphology = token.morph.to_dict()