Skip to content

Commit 40b5e73

Browse files
authored
Add files via upload
1 parent 8a80ed4 commit 40b5e73

File tree

1 file changed

+167
-0
lines changed

1 file changed

+167
-0
lines changed

chatbot_code.ipynb

+167
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 0,
4+
"metadata": {
5+
"colab": {
6+
"name": "chatbot_code.ipynb",
7+
"provenance": []
8+
},
9+
"kernelspec": {
10+
"name": "python3",
11+
"display_name": "Python 3"
12+
},
13+
"language_info": {
14+
"name": "python"
15+
}
16+
},
17+
"cells": [
18+
{
19+
"cell_type": "markdown",
20+
"metadata": {
21+
"id": "I3_ReQCBpJwq"
22+
},
23+
"source": [
24+
"# ChatBot "
25+
]
26+
},
27+
{
28+
"cell_type": "markdown",
29+
"metadata": {
30+
"id": "xEOwAx3woO-5"
31+
},
32+
"source": [
33+
"A chatbot is an artificial intelligence (AI) software that can simulate a conversation (or a chat) with a user in natural language through messaging applications, websites, mobile apps or through the telephone.\n",
34+
"Why are chatbots important? A chatbot is often described as one of the most advanced and promising expressions of interaction between humans and machines. However, from a technological point of view, a chatbot only represents the natural evolution of a Question Answering system leveraging Natural Language Processing (NLP). Formulating responses to questions in natural language is one of the most typical Examples of Natural Language Processing applied in various enterprises’ end-use applications."
35+
]
36+
},
37+
{
38+
"cell_type": "markdown",
39+
"metadata": {
40+
"id": "YoPNsS0toacG"
41+
},
42+
"source": [
43+
"### Step1: Import Libraries"
44+
]
45+
},
46+
{
47+
"cell_type": "code",
48+
"metadata": {
49+
"id": "z-zQRd-Dl_-B"
50+
},
51+
"source": [
52+
"import io\n",
53+
"import random\n",
54+
"import string # to process standard python strings\n",
55+
"import warnings\n",
56+
"import numpy as np\n",
57+
"from sklearn.feature_extraction.text import TfidfVectorizer\n",
58+
"from sklearn.metrics.pairwise import cosine_similarity\n",
59+
"import warnings\n",
60+
"warnings.filterwarnings('ignore')"
61+
],
62+
"execution_count": 1,
63+
"outputs": []
64+
},
65+
{
66+
"cell_type": "markdown",
67+
"metadata": {
68+
"id": "07evoaRsoh3U"
69+
},
70+
"source": [
71+
"### Step2: Download and install NLTK"
72+
]
73+
},
74+
{
75+
"cell_type": "code",
76+
"metadata": {
77+
"colab": {
78+
"base_uri": "https://localhost:8080/"
79+
},
80+
"id": "qvOnv6RAogVS",
81+
"outputId": "17be472d-c3d5-4d1f-cea1-177c5620748e"
82+
},
83+
"source": [
84+
"pip install nltk"
85+
],
86+
"execution_count": 2,
87+
"outputs": [
88+
{
89+
"output_type": "stream",
90+
"name": "stdout",
91+
"text": [
92+
"Requirement already satisfied: nltk in /usr/local/lib/python3.7/dist-packages (3.2.5)\n",
93+
"Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from nltk) (1.15.0)\n"
94+
]
95+
}
96+
]
97+
},
98+
{
99+
"cell_type": "code",
100+
"metadata": {
101+
"colab": {
102+
"base_uri": "https://localhost:8080/"
103+
},
104+
"id": "2uwGZjWhoZWv",
105+
"outputId": "6cdb63eb-a704-476b-823c-e805cc6f9f20"
106+
},
107+
"source": [
108+
"# Importing libraries for chatbot\n",
109+
"\n",
110+
"\n",
111+
"import nltk\n",
112+
"from nltk.stem import WordNetLemmatizer\n",
113+
"nltk.download('popular', quiet=True) # for downloading packages\n",
114+
"#nltk.download('punkt') # first-time use only\n",
115+
"#nltk.download('wordnet') # first-time use only"
116+
],
117+
"execution_count": 4,
118+
"outputs": [
119+
{
120+
"output_type": "execute_result",
121+
"data": {
122+
"text/plain": [
123+
"True"
124+
]
125+
},
126+
"metadata": {},
127+
"execution_count": 4
128+
}
129+
]
130+
},
131+
{
132+
"cell_type": "code",
133+
"metadata": {
134+
"id": "j7Qi5Onlo18F"
135+
},
136+
"source": [
137+
""
138+
],
139+
"execution_count": null,
140+
"outputs": []
141+
},
142+
{
143+
"cell_type": "markdown",
144+
"metadata": {
145+
"id": "aS-zP0_Do5f8"
146+
},
147+
"source": [
148+
"I have made this Code Private.\n",
149+
"\n",
150+
"If you want this full project with explanation document.\n",
151+
"\n",
152+
"Then, Mail me Now at **[email protected]**"
153+
]
154+
},
155+
{
156+
"cell_type": "code",
157+
"metadata": {
158+
"id": "PzsSDye3pHZB"
159+
},
160+
"source": [
161+
""
162+
],
163+
"execution_count": null,
164+
"outputs": []
165+
}
166+
]
167+
}

0 commit comments

Comments
 (0)