mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Create lookups if not passed in
This commit is contained in:
parent
d039ed2267
commit
fde4f8ac8e
|
@ -39,6 +39,8 @@ from . import about
|
|||
class BaseDefaults(object):
|
||||
@classmethod
|
||||
def create_lemmatizer(cls, nlp=None, lookups=None):
|
||||
if lookups is None:
|
||||
lookups = cls.create_lookups(nlp=nlp)
|
||||
lemma_rules, lemma_index, lemma_exc, lemma_lookup = util.get_lemma_tables(lookups)
|
||||
return Lemmatizer(lemma_index, lemma_exc, lemma_rules, lemma_lookup)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user