diff --git a/docs/07-route-conversations-by-topic.ipynb b/docs/07-route-conversations-by-topic.ipynb index 89b4a1745288f5c37c40b5bb9d55d36c165e887d..cf8763535d743420c48c2d633709e97db814aa42 100644 --- a/docs/07-route-conversations-by-topic.ipynb +++ b/docs/07-route-conversations-by-topic.ipynb @@ -88,7 +88,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -115,22 +115,20 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "All Topics:\n", - "Topic 2: - user: Hi, there, please can you confirm your full name\n", - "Topic 2: - user: Hi, my name is John Doe.\n", - "Topic 3: - bot: Okay, how can I help you today?\n", - "Topic 4: - user: My computer keeps crashing\n", - "Topic 4: - bot: Okay, is our software running when the computer crashes.\n", - "Topic 4: - user: Yeah, v.3.11.2 is running when it crashes.\n", - "\n", - "\n" + "No unclustered messages to process.\n", + "\u001b[31muser: Hi, there, please can you confirm your full name\u001b[0m\n", + "\u001b[31muser: Hi, my name is John Doe.\u001b[0m\n", + "\u001b[32mbot: Okay, how can I help you today?\u001b[0m\n", + "\u001b[33muser: My computer keeps crashing\u001b[0m\n", + "\u001b[33mbot: Okay, is our software running when the computer crashes.\u001b[0m\n", + "\u001b[33muser: Yeah, v.3.11.2 is running when it crashes.\u001b[0m\n" ] } ], @@ -144,10 +142,7 @@ "all_topics, new_topics = conversation.split_by_topic()\n", "\n", "# Display all topics\n", - "print(\"All Topics:\")\n", - "for i, (topic_id, doc) in enumerate(all_topics):\n", - " print(f\"Topic {topic_id + 1}: - {doc}\")\n", - "print(\"\\n\")" + "print(conversation)" ] }, { @@ -190,7 +185,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -207,25 +202,22 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "All Topics:\n", - "Topic 2: - user: Hi, there, please can you confirm your full name\n", - "Topic 2: - user: Hi, my name is John Doe.\n", - "Topic 3: - bot: Okay, how can I help you today?\n", - "Topic 4: - user: My computer keeps crashing\n", - "Topic 4: - bot: Okay, is our software running when the computer crashes.\n", - "Topic 4: - user: Yeah, v.3.11.2 is running when it crashes.\n", - "Topic 4: - user: What do the system logs say, right before the crash?\n", - "Topic 5: - user: I'll check soon, but first let's talk refund.\n", - "Topic 5: - bot: Okay let me sort out a refund.\n", - "\n", - "\n" + "\u001b[31muser: Hi, there, please can you confirm your full name\u001b[0m\n", + "\u001b[31muser: Hi, my name is John Doe.\u001b[0m\n", + "\u001b[32mbot: Okay, how can I help you today?\u001b[0m\n", + "\u001b[33muser: My computer keeps crashing\u001b[0m\n", + "\u001b[33mbot: Okay, is our software running when the computer crashes.\u001b[0m\n", + "\u001b[33muser: Yeah, v.3.11.2 is running when it crashes.\u001b[0m\n", + "\u001b[33muser: What do the system logs say, right before the crash?\u001b[0m\n", + "\u001b[34muser: I'll check soon, but first let's talk refund.\u001b[0m\n", + "\u001b[34mbot: Okay let me sort out a refund.\u001b[0m\n" ] } ], @@ -238,11 +230,7 @@ "\n", "all_topics, new_topics = conversation.split_by_topic()\n", "\n", - "# Display all topics\n", - "print(\"All Topics:\")\n", - "for i, (topic_id, doc) in enumerate(all_topics):\n", - " print(f\"Topic {topic_id + 1}: - {doc}\")\n", - "print(\"\\n\")" + "print(conversation)" ] }, {