mirror of
https://github.com/explosion/spaCy.git
synced 2025-03-13 07:55:49 +03:00
* Ensure word senses are loaded, even if not in probabilities file
This commit is contained in:
parent
149a901ea7
commit
9534d336ed
|
@ -110,7 +110,7 @@ def setup_vocab(src_dir, dst_dir):
|
|||
lexicon = []
|
||||
for word, prob in reversed(sorted(probs.items(), key=lambda item: item[1])):
|
||||
entry = get_lex_props(word)
|
||||
if word in clusters or float(prob) >= -17:
|
||||
if word in clusters or word in senses or float(prob) >= -17:
|
||||
entry['prob'] = float(prob)
|
||||
cluster = clusters.get(word, '0')
|
||||
# Decode as a little-endian string, so that we can do & 15 to get
|
||||
|
|
Loading…
Reference in New Issue
Block a user