mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
* Fix init_model
This commit is contained in:
parent
fd525f0675
commit
5c04dcd7c1
|
@ -80,13 +80,13 @@ def _read_clusters(loc):
|
|||
def _read_probs(loc):
|
||||
if not loc.exists():
|
||||
print("Warning: Probabilities file not found")
|
||||
return {}
|
||||
return {}, 0.0
|
||||
probs = {}
|
||||
for i, line in enumerate(codecs.open(str(loc), 'r', 'utf8')):
|
||||
prob, word = line.split()
|
||||
prob = float(prob)
|
||||
probs[word] = prob
|
||||
return probs
|
||||
return probs, probs['-OOV-']
|
||||
|
||||
|
||||
def _read_freqs(loc):
|
||||
|
|
Loading…
Reference in New Issue
Block a user