mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
* Fix loading of special morph words
This commit is contained in:
parent
a6f3c0c329
commit
0e4c2ba036
|
@ -243,8 +243,9 @@ cdef class EnPosTagger:
|
||||||
self.tags[i].id = i
|
self.tags[i].id = i
|
||||||
self.tags[i].pos = pos
|
self.tags[i].pos = pos
|
||||||
set_morph_from_dict(&self.tags[i].morph, props)
|
set_morph_from_dict(&self.tags[i].morph, props)
|
||||||
if path.exists(path.join(data_dir, 'morphs.json')):
|
if path.exists(path.join(data_dir, 'tokenizer', 'morphs.json')):
|
||||||
self.load_morph_exceptions(json.load(open(path.join(data_dir, 'morphs.json'))))
|
self.load_morph_exceptions(json.load(open(path.join(data_dir, 'tokenizer',
|
||||||
|
'morphs.json'))))
|
||||||
self.lemmatizer = Lemmatizer(path.join(data_dir, 'wordnet'), NOUN, VERB, ADJ)
|
self.lemmatizer = Lemmatizer(path.join(data_dir, 'wordnet'), NOUN, VERB, ADJ)
|
||||||
|
|
||||||
def __call__(self, Tokens tokens):
|
def __call__(self, Tokens tokens):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user