-
Notifications
You must be signed in to change notification settings - Fork 0
/
Basic_AI_1.cpp
398 lines (203 loc) · 14.5 KB
/
Basic_AI_1.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
// Function to speak text using eSpeak
void speakText(const string& text) {
string command = "espeak \"" + text + "\"";
system(command.c_str());
}
// Function to display and speak a text
void displayAndSpeak(const string& text) {
cout << text << endl; // Display text
speakText(text); // Speak text
}
int main() {
string a;
// Welcome message
cout<<"===================={ [[ ANONYMOUS 'AI' ]] }==================\n";
cout<<" ______________ ________________ \n";
cout<<" || || || || \n";
cout<<" || || || || \n";
cout<<" || || || || \n";
cout<<" ||__________|| / ||__________|| \n\n";
cout<<" /__| \n\n";
cout<<" [----------------] \n";
cout<<" |___👅_____| \n\n\n";
displayAndSpeak("Hello sir. WhatsApp ");
while(1){
cout<<"__________"<<endl;
cout<<" [ YOU ] --==> ";
getline(cin,a);
if ((a=="hi" || a=="Hi") || (a=="hii" || a=="Hii") || (a=="hiii" || a=="Hiii") || (a=="hiiii" || a=="Hiiii"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
displayAndSpeak(" Hii sir. if you need. any help. \n then tell me\n__________________________________\n\n");
}
if ((a == "let's chat" || a == "Let's chat") ||( a == "let's a chat" || a == "Let's a chat") || (a == "can you do the chat" || a == "Can you do the chat") ||( a == "let's do a chat" || a == "Let's do a chat") || (a == "chat me" || a == "Chat me") || ( a == "can you chat me" || a == "Can you chat me ") || (a=="open chat" || a=="Open chat") || (a=="anonymous open chat" || a=="Anonymous open chat")) // this is many type asking question options
{ string name;
// Welcome message
displayAndSpeak("Of course. Let's do chat\n\n");
// Ask for the user's name
displayAndSpeak("What's your name?");
// Get the user's input
cin >> name;
// Greet the user
string greeting = "\n\nNice to meet you, " + name + ". Sir";
displayAndSpeak(greeting);
string chat;
while(true){
cout<<"Say anything--->> ";
getline(cin,chat);
if ((chat == "Oh hello" || chat == "oh hello") || ( chat == "hello" || chat == "Hello ") ||(chat=="Hi" || chat=="hi") || (chat=="hii" || chat=="Hii"))
{
cout<<"\n Chat_BOT--------------------"<<endl;
displayAndSpeak(" Hello sir i'm Good. and ,You ??\n\n\n ");
}
else if ((chat == "what are you doing" || chat == "What are you doing"))
{
cout<<"\n Chat_BOT--------------------"<<endl;
displayAndSpeak(" Sir. I'm chatting with you \n\n\n ");
}
else if ((chat == "they call every week" || chat == "They call every week"))
{
cout<<"\n Chat_BOT--------------------"<<endl;
displayAndSpeak(" Who call every week ? \n\n\n");
}
else if ((chat == "I work with my father too" || chat == "i work with my father too"))
{
cout<<"\n Chat_BOT--------------------"<<endl;
displayAndSpeak(" Sir. you are a Jeenious. parson \n Because you wor with. your father. too\n\n\n");
}
else if ((chat == "what is my name" || chat == "What is my name") || (chat=="who am i" || chat=="Who am i"))
{
cout<<"\n Chat_BOT--------------------"<<endl;
displayAndSpeak(" I know Sir. Your name is " + name + ". Right\n\n\n");
}
else if ((chat == "are you busy" || chat == "Are you busy") || (chat=="you are busy" || chat=="You are busy"))
{
cout<<"\n Chat_BOT--------------------"<<endl;
displayAndSpeak(" No. I'm always free. for your help \n\n\n ");
}
else if ((chat=="exit" || chat=="Exit") || (chat=="Exit" || chat=="ExiT"))
{
cout<<"\n Chat_BOT--------------------"<<endl;
displayAndSpeak(" Thanks for chatting. Sir \n\n\n ");
break;
}
/*
else{
cout<<"\n\n\t 🤖💬---👇--------------📜"<<endl;
displayAndSpeak(" Oh. i don't know. can you tell me. again \n\n ");
}
*/
}
}
else if ((a=="whatsapp" || a=="Whatsapp") || (a=="WhatsApp" || a=="whatsapp bro") || (a=="Whatsapp bro" || a=="WhatsApp bro") || (a=="whatsapp ai" || a=="Whatsapp ai") || (a=="WhatsApp ai" || a=="whatsapp Ai") || (a=="whatsapp AI" || a=="Whatsapp Ai") || (a=="Whatsapp AI" || a=="WhatsApp Ai") || (a=="WhatsApp AI" || a=="WHATSAPP"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
displayAndSpeak("WhatsApp. Brother How can I help you \n__________________________________\n\n");
}
else if ((a=="give any idea" || a=="Give any idea") || (a=="give me any idea" || a=="Giv me any idea") || (a=="can you give an idea" || a=="Can you give an idea") || (a=="can you give me an idea" || a=="Can you give me an idea") || (a=="give idea" || a=="Give idea") || (a=="give an idea" || a=="Give an idea") || (a=="give me idea" || a=="Give me idea") || (a=="give me an idea" || a=="Give me an idea") || (a=="i want an idea" || a=="I want an idea"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
displayAndSpeak("Ok,. Which topic you need a Idea. Tell me \n__________________________________\n\n");
}
else if ((a=="who created you" || a=="Who created you") || (a=="who was creating you" || a=="Who was creating you") || (a=="when you both" || a=="When you both") || (a=="when your both" || a=="When your both") || (a=="which day are you create" || a=="Which day are you create") || (a=="who is create you" || a=="How is create you") || (a=="who create you" || a=="Who create you"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
cout<<" I have some data to Releted me.\n I Created by Mr.Megaton \n When i created Then Day is 'Sunday' and Date is 26/2/2024. \n__________________________________\n\n"<<endl<<endl;
speakText("I have some data to Releted me. I Created by Mr.Megaton. When i created Then Day is Sunday and Date is 26/2/2024. ");
}
else if ((a=="what is the tense" || a=="What is the tense") || (a=="kind of tense" || a=="Kind of tense") || (a=="tell me about tense" || a=="Tell me about tense") || (a=="type of tense" || a=="Type of tense") || (a=="tell me about the tense" || a=="Tell me about the tense") || (a=="How many type of tense" || a=="how many type of tense") || (a=="how many types the tense" || a=="How many types the tense") || (a=="how many types the tenses" || a=="how many types the tenses") || (a=="how many types tense" || a=="How many types tense") || (a=="tell me how many types the tense" || a=="Tell me how many types the tense") || (a=="tell me how many types tense" || a=="Tell me how many types tense"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
cout<<"Tense तीन प्रकार के होते है--- \n1. Present Tense ( वर्तमान काल ) \n2. Past Tense ( भूतकाल ) \n3. Future Tense ( भविष्यत् काल) \nप्रत्येक Tenses में चार उप-विभाग हैं--- \n(i) Indefinite (Simple) \n(ii) Continuous \n(iii) Perfect \n(iv)। Perfect Continuous \n__________________________________\n\n"<<endl<<endl;
speakText(" Vikky peediyaa ke anusaar. Tense तीन प्रकार के होते है. \n1. Present Tense. ( वर्तमान काल ). \n2. Past Tense. ( भूतकाल ). \n3. Future Tense. ( भविष्यत् काल). \nप्रत्येक Tenses में चार उप-विभाग हैं. \n1. Indefinite. Simple. \n2. Continuous. \n3. Perfect. \n4. Perfect Continuous ");
}
else if ((a=="a thing of beauty" || a=="A thing of beauty") || (a=="central idea" || a=="Central idea") || (a=="tell me central idea" || a=="Tell me central idea") || (a=="tell me a central idea" || a=="Tell me a central idea"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
cout<<" 'A Thing of Beauty' is an excerpt from 'Keats' first epic poem Endymion: A Poetic Romance. The poem is based on a Greek legend in which Endymion a young shepherd and a poet who lived in mount Latmos, had a Vision of Cynthia the Moon Goddess. The enchanted youth resolved to seek her out and wandered through forest and sea. The theme of the poem is nature, beauty and youth. This excerpt voices the poet's eternal love for beauty where the poet says that the happiness provided by a beautiful object never fades but multiplies manifords when it comes to our mind. Therefore, a thing of beauty is a joy forever.\n__________________________________"<<endl<<endl<<endl;
/* speakText(" 'A Thing of Beauty' is an. excerpt from 'Keats' first epic poem Endymion:. A Poetic Romance. The poem is based. on a Greek legend in which Endymion. a young shepherd and a poet. who lived in mount Latmos,. had a Vision of Cynthia. the Moon Goddess. The enchanted youth. resolved to seek her out. and wandered through. forest and sea. The theme of the poem. is nature, beauty. and youth. This excerpt. voices the poet's eternal. love for beauty where the poet says. that the happiness provided. by a beautiful object never fades. but multiplies manifords. when it comes to our mind. Therefore, a thing of beauty. is a joy forever.\n");
*/
}
else if ((a=="open calculator" || a=="Open calculator") || (a=="you have calculator" || a=="You have calculator") || (a=="please open calculator" || a=="Please open calculator") || (a=="do you have calculator" || a=="Do you have calculator"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
displayAndSpeak(" I'm so. sorry Sir. This time. i have not any Calculator. \n You can Try your mobile calculator\n__________________________________\n\n");
}
else if ((a=="help" || a=="Help") || (a=="help me" || a=="Help me") || ( a=="can you help me" || a=="Can you help me"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
displayAndSpeak("Ok,. Tell me. I can help you. Sir \n__________________________________\n\n");
}
else if ((a=="who you" || a=="Who you") || (a=="who are you" || a=="Who are you"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
displayAndSpeak("I'm a Little. AI. Program \n__________________________________\n\n");
}
else if ((a=="what's your name" || a=="what is your name") || (a=="What's your name" || a=="What is your name") || (a=="your name" || a=="Your name"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
displayAndSpeak(" My name is. ANONYMOUS Ai Prograam \n__________________________________\n\n");
}
else if ((a=="hello" || a=="Hello") || (a=="how are you" || a=="How are you") || (a=="hello sir" || a=="Hello sir") || (a=="how are you sir" || a=="How are you sir") || (a=="hello ai" || a=="Hello Ai") || (a=="how are you ai" || a=="How are you Ai"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
cout<<" I'm good Sir and you 😊❤️\n__________________________________\n\n"<<endl<<endl;
speakText(" I'm good Sir. and you 😊❤️");
}
else if ((a=="time" || a=="Time") || (a=="what is the time" || a=="What is the time") || (a=="what's the time" || a=="What's the time") || (a=="sow time" || a=="Sow time") || (a=="tell me time" || a=="Tell me time"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
speakText("Now. Time is ");
// Use system command to get the current time
system("date '+\tNow Time is %l:%M %p\n__________________________________\n\n'");
}
else if ((a=="i'm fine" || a=="I'm fine") || (a=="I am fine" || a=="i am fine") || (a== "fine" || a=="Fine") || (a=="Good" || a=="good") || (a=="i'm good" || a=="I'm good") || (a=="I am good" || a=="i am good") || (a=="ok" || a=="Ok") || (a=="nice" || a=="Nice"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
displayAndSpeak("Ok,. You are fine. Good injoy \n__________________________________\n\n");
}
else if ((a=="thank" || a=="Thank") || (a=="thanks" || a=="Thanks") || (a=="thankyou" || a=="Thankyou") || (a=="thank you" || a=="Thank you") || (a=="thanks ai" || a=="Thanks Ai") || (a=="thank you ai" || a=="Thank you Ai") || (a=="thankyou ai" || a=="Thankyou Ai"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
displayAndSpeak("Your Welcome Sir. it's my work \n__________________________________\n\n");
}
else if ((a=="who is the king of jungle" || a=="Who is the king of jungle") || (a=="which animal is the king of jungle") || (a=="Which animal is the king of jungle") || (a=="king of jungle" || a=="King of jungle"))
{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
cout<<"The Lion is the King of the jungle \n__________________________________\n\n";
speakText("The Lion is the King of the jungle");
}
else if ((a=="EXIT" || a=="Exit") || (a=="exit" || a=="stop") || (a=="Stop" || a=="Close") || (a=="close" || a=="x") || (a=="X" || a=="bye") || (a=="Bye" || a=="bye bye") || (a=="Bye bye" || a=="good bye") || (a=="Good bye" || a=="off") || (a=="Off" || a=="back") || (a=="Back" || a=="back"))
{
cout<<"•••••••••••••Thanks👁️👁️ for Chating 💞💓••••••••••••\n 💋 "<<endl;
speakText("Bye bye. sir. have you a. nice day");
break;
}
else{
cout<<" ANONYMOUS Ai\n";
cout<<"->>------------>>\n";
cout<<"🤔🚫I don't Know what are you 🗣️ saying !!\n__________________________________\n\n";
speakText(" I don't Know. please tell me Clearly ");
}
}
return 0;
}