Replace index2word with index_to_key

This commit is contained in:
Mike Clift 2023-06-19 17:20:10 +01:00
parent 9241533fe2
commit 4e8b11c2ce
1 changed files with 1 additions and 1 deletions

View File

@ -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]"
]
},
{