From a035fe4c8416c182edd34edddf2371c13ab1c238 Mon Sep 17 00:00:00 2001 From: higepi Date: Tue, 4 Oct 2022 19:23:20 +0200 Subject: [PATCH] test question --- wordvec.ipynb | 9 +++++++++ wordvec.py | 1 + 2 files changed, 10 insertions(+) diff --git a/wordvec.ipynb b/wordvec.ipynb index cb60083..9acc2d7 100644 --- a/wordvec.ipynb +++ b/wordvec.ipynb @@ -255,6 +255,15 @@ "source": [ "print(wv.doesnt_match(['wood', 'oak', 'tree', 'iron', 'leaf']))" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(wv.most_similar(positive=['The largest country is']))" + ] } ], "metadata": { diff --git a/wordvec.py b/wordvec.py index 9d6a228..0165233 100644 --- a/wordvec.py +++ b/wordvec.py @@ -17,3 +17,4 @@ vec_woman = wv['woman'] result = wv.most_similar(positive=(vec_father - vec_man + vec_woman), topn=1) print(result) +print(wv.most_similar(positive=['The largest country is'])) \ No newline at end of file