mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Set tag_map to None if it's not seen in the data by vocab
This commit is contained in:
parent
33996e770b
commit
6ee1df93c5
|
@ -83,6 +83,8 @@ cdef class Vocab:
|
|||
if tag_map is True and (path / 'vocab' / 'tag_map.json').exists():
|
||||
with (path / 'vocab' / 'tag_map.json').open('r', encoding='utf8') as file_:
|
||||
tag_map = json.load(file_)
|
||||
elif tag_map is True:
|
||||
tag_map = None
|
||||
if lex_attr_getters is not None \
|
||||
and oov_prob is True \
|
||||
and (path / 'vocab' / 'oov_prob').exists():
|
||||
|
|
Loading…
Reference in New Issue
Block a user