From 35cd953f9e618d2c4d6860846a21d4c809235690 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 27 Sep 2016 14:16:22 +0200 Subject: [PATCH] Fix pos name conflict with morphology --- spacy/lemmatizer.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spacy/lemmatizer.py b/spacy/lemmatizer.py index f5ce5ae6f..26177e2f7 100644 --- a/spacy/lemmatizer.py +++ b/spacy/lemmatizer.py @@ -37,15 +37,15 @@ class Lemmatizer(object): self.exc = exceptions self.rules = rules - def __call__(self, string, pos, **morphology): - if pos == NOUN: - pos = 'noun' - elif pos == VERB: - pos = 'verb' - elif pos == ADJ: - pos = 'adj' - elif pos == PUNCT: - pos = 'punct' + def __call__(self, string, univ_pos, **morphology): + if univ_pos == NOUN: + univ_pos = 'noun' + elif univ_pos == VERB: + univ_pos = 'verb' + elif univ_pos == ADJ: + univ_pos = 'adj' + elif univ_pos == PUNCT: + univ_pos = 'punct' # See Issue #435 for example of where this logic is requied. if self.is_base_form(pos, **morphology): return set([string.lower()])