From 4e8b11c2ce625d05f2865d2fa45121a8e7a0f7c5 Mon Sep 17 00:00:00 2001 From: Mike Clift Date: Mon, 19 Jun 2023 17:20:10 +0100 Subject: [PATCH] Replace index2word with index_to_key --- lessons/5-NLP/14-Embeddings/EmbeddingsTF.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lessons/5-NLP/14-Embeddings/EmbeddingsTF.ipynb b/lessons/5-NLP/14-Embeddings/EmbeddingsTF.ipynb index c8e9c49c..ccbecb75 100644 --- a/lessons/5-NLP/14-Embeddings/EmbeddingsTF.ipynb +++ b/lessons/5-NLP/14-Embeddings/EmbeddingsTF.ipynb @@ -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]" ] }, {