diff --git a/tutorial/sentence_sim.ipynb b/tutorial/sentence_sim.ipynb index 46653d66317c08cda3e53a671e61baf8e7670ed8..797c53f10540c911fbfe71b1b873310f04d07d28 100644 --- a/tutorial/sentence_sim.ipynb +++ b/tutorial/sentence_sim.ipynb @@ -65,7 +65,7 @@ " results = lac.lexical_analysis(data=inputs, use_gpu=True, batch_size=2)\n", " data = []\n", " for result in results:\n", - " data.append(\" \".join(result[\"word\"])\n", + " data.append(\" \".join(result[\"word\"]))\n", " processed_data.append(data)\n", "\n", "processed_data" @@ -103,6 +103,7 @@ "metadata": {}, "outputs": [], "source": [ + "module = hub.Module(name=\"word2vec_skipgram\")\n", "inputs, outputs, program = module.context(trainable=False)\n", "vocab = load_vocab(module.get_vocab_path())\n", "\n", @@ -137,6 +138,13 @@ " print(\"text_a: %s; text_b: %s; cosine_similarity: %.5f\" %\n", " (item[0], item[1], cos_sim))" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": {