mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 18:26:30 +03:00
use model_dir inside of load_model
This commit is contained in:
parent
93cf4af701
commit
c19b83f6ae
|
@ -11,7 +11,7 @@ def load_model(model_dir):
|
||||||
with (model_dir / 'vocab' / 'strings.json').open('r', encoding='utf8') as file_:
|
with (model_dir / 'vocab' / 'strings.json').open('r', encoding='utf8') as file_:
|
||||||
nlp.vocab.strings.load(file_)
|
nlp.vocab.strings.load(file_)
|
||||||
nlp.vocab.load_lexemes(model_dir / 'vocab' / 'lexemes.bin')
|
nlp.vocab.load_lexemes(model_dir / 'vocab' / 'lexemes.bin')
|
||||||
ner = EntityRecognizer.load(pathlib.Path("ner"), nlp.vocab, require=True)
|
ner = EntityRecognizer.load(model_dir, nlp.vocab, require=True)
|
||||||
return (nlp, ner)
|
return (nlp, ner)
|
||||||
|
|
||||||
(nlp, ner) = load_model('ner')
|
(nlp, ner) = load_model('ner')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user