Skip to content

Commit 57e262a

Browse files
author
Frankie Robertson
committed
Fixup train_sif
1 parent 700fa53 commit 57e262a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

train_sif.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ def train_one_sif(inf, vec):
2323
ctx = norm_wf_lemma_of_tokens(be + af)
2424
if not ctx:
2525
continue
26-
mat[idx] = apply_vec(pre_sif_mean, space, ctx, "fi")
26+
vec = apply_vec(pre_sif_mean, space, ctx, "fi")
27+
if vec is None:
28+
continue
29+
mat[idx] = vec
2730
return compute_pc(mat)
2831

2932

0 commit comments

Comments
 (0)