Replace index2word with index_to_key
This commit is contained in:
parent
9241533fe2
commit
4e8b11c2ce
|
|
@ -419,7 +419,7 @@
|
|||
"d = np.sum((w2v.vectors-qvec)**2,axis=1)\n",
|
||||
"min_idx = np.argmin(d)\n",
|
||||
"# find the corresponding word\n",
|
||||
"w2v.index2word[min_idx]"
|
||||
"w2v.index_to_key[min_idx]"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue