mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 00:46:28 +03:00
Port over PR #1055
This commit is contained in:
parent
ee1d35bdb0
commit
4eefb288e3
|
@ -102,10 +102,6 @@ def read_clusters(clusters_path):
|
|||
|
||||
|
||||
def populate_vocab(vocab, clusters, probs, oov_prob):
|
||||
# Ensure probs has entries for all words seen during clustering.
|
||||
for word in clusters:
|
||||
if word not in probs:
|
||||
probs[word] = oov_prob
|
||||
for word, prob in reversed(sorted(list(probs.items()), key=lambda item: item[1])):
|
||||
lexeme = vocab[word]
|
||||
lexeme.prob = prob
|
||||
|
|
Loading…
Reference in New Issue
Block a user