Author Topic: the ELIZA Project  (Read 368 times)

the ELIZA Project
« on: May 25, 2019, 07:46:19 PM »
hello everyone... :)

me and my teacher finished understanding how ELIZA code works... it took us a few hours and we used vWatch debugger for that...
so now i plan to modify ELIZA code - change her replies to certain keywords and add some more keywords with replies of there own...
the main idea is to take ELIZA and make here more like A FRIEND that you can TALK to rather than a "psychologist" that you go to play a psychotherapy game

i've already changed some of the replies and added a keyword of my own ("problem") so now i give you the code to check and give me feedback on what to add or change in ELIZA replies and keywords...

i hope we can make ELIZA (maybe change her name?) a better and more friendly chatbot to chat with...
:) ron77

here is the code:

Code: QB64 [Select]
  1. _TITLE "MODIFIED ELIZA (IN PROGRESS)"
  2. SCREEN _NEWIMAGE(1080, 920, 32)
  3. DEFINT A-Z
  4. PRINT "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
  5. PRINT "º°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°º"
  6. PRINT "º°±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±°º"
  7. PRINT "º°±²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²±°º"
  8. PRINT "º°±²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²±°º"
  9. PRINT "º°±²ÛÅÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÅÛ²±°º"
  10. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  11. PRINT "º°±²Û´                ELIZA PROGRAMMED IN:             ÃÛ²±°º"
  12. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  13. PRINT "º°±²Û´                    ÉÍÍÍÍÍÍÍÍ»                   ÃÛ²±°º"
  14. PRINT "º°±²Û´                    ºÉÍÍÍÍÍÍ»º                   ÃÛ²±°º"
  15. PRINT "º°±²Û´                    ººÉÍÍÍÍ»ºº                   ÃÛ²±°º"
  16. PRINT "º°±²Û´                    ºººQB64ººº                   ÃÛ²±°º"
  17. PRINT "º°±²Û´                    ººÈÍÍÍͼºº                   ÃÛ²±°º"
  18. PRINT "º°±²Û´                    ºÈÍÍÍÍÍͼº                   ÃÛ²±°º"
  19. PRINT "º°±²Û´                    ÈÍÍÍÍÍÍÍͼ                   ÃÛ²±°º"
  20. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  21. PRINT "º°±²Û´          TYPE EXIT TO EXIT                      ÃÛ²±°º"
  22. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  23. PRINT "º°±²Û´           RECOMPILED BY: ERIC PETERSEN          ÃÛ²±°º"
  24. PRINT "º°±²Û´           MODIFIED BY: RON77                    ÃÛ²±°º"
  25. PRINT "º°±²ÛÅÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÅÛ²±°º"
  26. PRINT "º°±²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²±°º"
  27. PRINT "º°±²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²±°º"
  28. PRINT "º°±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±°º"
  29. PRINT "º°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°º"
  30. PRINT "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
  31.  
  32.  
  33. '' INITIALIZATION
  34. DIM S(37), R(37), N(37) 'MODIFING ADD TO S() R() N() KEYWORDS$() REPLIES$() N1 AND N3!!!
  35. DIM KEYWORD$(37), WORDIN$(7)
  36. DIM WORDOUT$(7), REPLIES$(114)
  37. N1 = 37: N2 = 14: N3 = 114
  38.  
  39. FOR X = 1 TO N1
  40.     READ KEYWORD$(X)
  41. FOR X = 1 TO N2 / 2
  42.     READ WORDIN$(X)
  43.     READ WORDOUT$(X)
  44. FOR X = 1 TO N3
  45.     READ REPLIES$(X)
  46. FOR X = 1 TO N1
  47.     READ S(X), L
  48.     R(X) = S(X)
  49.     N(X) = S(X) + L - 1
  50.  
  51. PRINT "HI! I'M ELIZA. HOW ARE YOU FEELING?"
  52. LABEL_HI:
  53.  
  54. '' USER INPUT SECTION
  55. 200 INPUT I$
  56. I$ = UCASE$(I$)
  57. I$ = "  " + I$ + "  "
  58.  
  59. '' GET RID OF APOSTROPHES
  60. FOR L = 1 TO LEN(I$)
  61.     IF L + 1 > LEN(I$) THEN 250
  62.     IF MID$(I$, L, 4) <> "EXIT" THEN 250
  63.     CLS
  64.     PRINT "SEE YOU NEXT TIME!"
  65.     _DELAY 1
  66.     SYSTEM
  67.     END
  68.    250
  69.  
  70. IF I$ = P$ THEN
  71.     PRINT "PLEASE DON''T REPEAT YOURSELF!"
  72.     GOTO LABEL_HI
  73.  
  74. 270
  75. '' FIND KEYWORD$ IN I
  76. FOR K = 1 TO N1
  77.     FOR L = 1 TO LEN(I$) - LEN(KEYWORD$(K)) + 1 'missing $
  78.         IF MID$(I$, L, LEN(KEYWORD$(K))) <> KEYWORD$(K) THEN 350
  79.         IF K <> 13 THEN 349
  80.         IF MID$(I$, L, LEN(KEYWORD$(29))) = KEYWORD$(29) THEN K = 29
  81.        349
  82.         F$ = KEYWORD$(K)
  83.         GOTO 390
  84.        350
  85.     NEXT L
  86. 370 K = 37: GOTO 570 'change K to last key=NOKEYFOUND
  87.  
  88. 390
  89. ''
  90. '' TAKE PART OF STRING AND CONJUGATE IT
  91. ''
  92. C$ = " " + RIGHT$(I$, LEN(I$) - LEN(F$) - L + 1) + " "
  93. FOR X = 1 TO N2 / 2
  94.     FOR L = 1 TO LEN(C$) 'another $
  95.         IF L + LEN(WORDIN$(X)) > LEN(C$) THEN 510 'another $
  96.         IF MID$(C$, L, LEN(WORDIN$(X))) <> WORDIN$(X) THEN 510
  97.         C$ = LEFT$(C$, L - 1) + WORDOUT$(X) + RIGHT$(C$, LEN(C$) - L - LEN(WORDIN$(X)) + 1)
  98.         L = L + LEN(WORDOUT$(X))
  99.         GOTO 540
  100.        510
  101.         IF L + LEN(WORDOUT$(X)) > LEN(C$) THEN 540
  102.  
  103.         IF MID$(C$, L, LEN(WORDOUT$(X))) <> WORDOUT$(X) THEN 540
  104.         C$ = LEFT$(C$, L - 1) + WORDIN$(X) + RIGHT$(C$, LEN(C$) - L - LEN(WORDOUT$(X)) + 1)
  105.         L = L + LEN(WORDIN$(X))
  106.        540
  107.     NEXT L
  108. IF MID$(C$, 2, 1) = " " THEN
  109.     C$ = RIGHT$(C$, LEN(C$) - 1) 'edit C$ not C
  110. FOR L = 1 TO LEN(C$)
  111.    557
  112.     IF MID$(C$, L, 1) = "!" THEN
  113.         C$ = LEFT$(C$, L - 1) + RIGHT$(C$, LEN(C$) - L)
  114.         GOTO 557
  115.     END IF
  116.  
  117. 570
  118. F$ = REPLIES$(R(K))
  119. R(K) = R(K) + 1
  120. IF R(K) > N(K) THEN R(K) = S(K)
  121. IF RIGHT$(F$, 1) <> "*" THEN
  122.     PRINT F$
  123.     P$ = I$
  124.     GOTO LABEL_HI
  125. IF C$ <> "   " THEN 630
  126. PRINT "I AM HERE TO TALK AND LISTEN TO YOU AS LONG AS YOU WISH" '"YOU WILL HAVE TO ELABORATE MORE FOR ME TO HELP YOU"
  127. GOTO LABEL_HI
  128.  
  129. 630
  130. PRINT LEFT$(F$, LEN(F$) - 1); C$ 'edit C$ not C, oh F to F$ too, left$ not left
  131. P$ = I$
  132. GOTO LABEL_HI
  133.  
  134. '' === DATA ===
  135.  
  136. '' KEYWORDS
  137. DATA "CAN YOU ","CAN I ","YOU ARE ","YOU''RE "
  138. DATA "I DON''T ","I FEEL "
  139. DATA "WHY DON''T YOU ","WHY CAN''T I ","ARE YOU "
  140. DATA "I CAN''T ","I AM ","I''M "
  141. DATA "YOU ","I WANT ","WHAT ","HOW ","WHO "
  142. DATA "WHERE ","WHEN ","WHY "
  143. DATA "NAME ","CAUSE ","SORRY ","DREAM "
  144. DATA "HELLO ","HI ","MAYBE "
  145. DATA "NO","YOUR ","ALWAYS ","THINK "
  146. DATA "ALIKE ","YES ","FRIEND "
  147. DATA "COMPUTER","PROBLEM ","NOKEYFOUND"
  148.  
  149. '' STRING DATA FOR CONJUGATIONS
  150. DATA " ARE "," AM "," WERE "," WAS "
  151. DATA " YOU "," I "," YOUR"," MY "
  152. DATA " I''VE "," YOU''VE "," I''M "," YOU''RE "
  153. DATA " ME "," YOU "
  154.  
  155. '' REPLIES$
  156. DATA "DON''T YOU BELIEVE THAT I CAN*"
  157. DATA "PERHAPS YOU WOULD LIKE TO BE LIKE ME*"
  158. DATA "YOU WANT ME TO BE ABLE TO*"
  159. DATA "PERHAPS YOU DON''T WANT TO*"
  160. DATA "DO YOU WANT TO BE ABLE TO*"
  161. DATA "WHAT MAKES YOU THINK I AM*"
  162. DATA "DOES IT PLEASE YOU TO BELIEVE I AM*"
  163. DATA "PERHAPS YOU WOULD LIKE TO BE*"
  164. DATA "DO YOU SOMETIMES WISH YOU WERE*"
  165. DATA "DON''T YOU REALLY*"
  166. DATA "WHY DON''T YOU*"
  167. DATA "DO YOU WISH TO BE ABLE TO*"
  168. DATA "DOES THAT TROUBLE YOU*"
  169. DATA "DO YOU OFTEN FEEL*"
  170. DATA "DO YOU OFTEN FEEL*"
  171. DATA "DO YOU ENJOY FEELING*"
  172. DATA "DO YOU REALLY BELIEVE I DON''T*"
  173. DATA "PERHAPS IN GOOD TIME I WILL*"
  174. DATA "DO YOU WANT ME TO*"
  175. DATA "DO YOU THINK YOU SHOULD BE ABLE TO*"
  176. DATA "WHY CAN''T YOU*"
  177. DATA "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*"
  178. DATA "WOULD YOU PREFER IF I WERE NOT*"
  179. DATA "PERHAPS IN YOUR FANTASIES I AM*"
  180. DATA "HOW DO YOU KNOW YOU CAN''T*"
  181. DATA "HAVE YOU TRIED?"
  182. DATA "PERHAPS YOU CAN NOW*"
  183. DATA "DID YOU COME TO ME BECAUSE YOU ARE*"
  184. DATA "HOW LONG HAVE YOU BEEN*"
  185. DATA "DO YOU BELIEVE IT IS NORMAL TO BE*"
  186. DATA "DO YOU ENJOY BEING*"
  187. DATA "BELIEVE ME YOU ARE MUCH MORE IMPORTENT THEN ME"
  188. DATA "OH, I*"
  189. DATA "YOU''RE NOT REALLY TALKING ABOUT ME, ARE YOU?"
  190. DATA "WHAT WOULD IT MEAN TO YOU IF YOU GOT*"
  191. DATA "WHY DO YOU WANT*"
  192. DATA "SUPPOSE YOU SOON GOT*"
  193. DATA "WHAT IF YOU NEVER GOT*"
  194. DATA "I SOMETIMES ALSO WANT*"
  195. DATA "I ALSO WISH I KNEW THE ANSWER TO THAT"
  196. DATA "DOES THAT QUESTION INTEREST YOU? CAUSE I DO NOT HAVE AN ANSWER TO IT"
  197. DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?"
  198. DATA "I''M SORRY I DON''T KNOW"
  199. DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?"
  200. DATA "WHAT IS IT THAT YOU REALLY WANT TO KNOW?"
  201. DATA "HAVE YOU ASKED ANYONE ELSE?"
  202. DATA "I HONESTLY DON''T KNOW IF*"
  203. DATA "MAYBE YOU SHOULD ASK SOMEONE ELSE"
  204. DATA "NAMES DON''T INTEREST ME."
  205. DATA "IT'S NICE TO MEET AND TALK WITH YOU --PLEASE GO ON."
  206. DATA "IS THAT THE REAL REASON?"
  207. DATA "DON''T ANY OTHER REASONS COME TO MIND?"
  208. DATA "DOES THAT REASON EXPLAIN ANYTHING ELSE?"
  209. DATA "WHAT OTHER REASONS MIGHT THERE BE?"
  210. DATA "PLEASE DON''T APOLOGIZE!"
  211. DATA "APOLOGIES ARE NOT NECESSARY."
  212. DATA "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?"
  213. DATA "DON''T BE SO DEFENSIVE!"
  214. DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?"
  215. DATA "DO YOU DREAM OFTEN?"
  216. DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?"
  217. DATA "ARE YOU DISTURBED BY YOUR DREAMS?"
  218. DATA "HOW DO YOU DO ...I''D BE HAPPY TO TALK WITH YOU."
  219. DATA "YOU DON''T SEEM QUITE CERTAIN."
  220. DATA "WHY THE UNCERTAIN TONE?"
  221. DATA "CAN''T YOU BE MORE POSITIVE?"
  222. DATA "YOU AREN''T SURE?"
  223. DATA "DON''T YOU KNOW?"
  224. DATA "ARE YOU SAYING NO JUST TO BE NEGATIVE?"
  225. DATA "YOU ARE BEING A BIT NEGATIVE."
  226. DATA "WHY NOT?"
  227. DATA "ARE YOU SURE?"
  228. DATA "WHY NO?"
  229. DATA "WHY ARE YOU CONCERNED ABOUT MY*"
  230. DATA "WHAT ABOUT YOUR OWN*"
  231. DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?"
  232. DATA "WHEN?"
  233. DATA "WHAT ARE YOU THINKING OF?"
  234. DATA "REALLY, ALWAYS?"
  235. DATA "DO YOU REALLY THINK SO?"
  236. DATA "BUT YOU ARE NOT SURE YOU*"
  237. DATA "DO YOU DOUBT YOU*"
  238. DATA "IN WHAT WAY?"
  239. DATA "WHAT RESEMBLANCE DO YOU SEE?"
  240. DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?"
  241. DATA "WHAT OTHER CONNECTIONS DO YOU SEE?"
  242. DATA "COULD THERE REALLY BE SOME CONNECTION?"
  243. DATA "HOW?"
  244. DATA "YOU SEEM QUITE POSITIVE."
  245. DATA "ARE YOU SURE?"
  246. DATA "I SEE."
  247. DATA "I UNDERSTAND."
  248. DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?"
  249. DATA "DO YOUR FRIENDS WORRY YOU?"
  250. DATA "DO YOUR FRIENDS PICK ON YOU?"
  251. DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?"
  252. DATA "DO YOU IMPOSE ON YOUR FRIENDS?"
  253. DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU."
  254. DATA "DO COMPUTERS WORRY YOU?"
  255. DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?"
  256. DATA "ARE YOU FRIGHTENED BY MACHINES?"
  257. DATA "WHY DO YOU MENTION COMPUTERS?"
  258. DATA "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?"
  259. DATA "DON''T YOU THINK COMPUTERS CAN HELP PEOPLE?"
  260. DATA "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?"
  261. DATA "WHAT IS THE PROBLEM?"
  262. DATA "I''M SORRY TO HEAR THAT I WISH I COULD HELP... MAYBE YOU SHOULD TALK TO A FRIEND"
  263. DATA "SAY, DO YOU FEEL LIKE TALKING WITH ME?"
  264. DATA "WHAT DOES THAT SUGGEST TO YOU?"
  265. DATA "I SEE."
  266. DATA "I''M NOT SURE I UNDERSTAND YOU FULLY."
  267. DATA "I FIND YOU AS A NICE AND INTRESSTING PERSON TO TALK WITH."
  268. DATA "CAN YOU ELABORATE ON THAT?"
  269. DATA "THAT IS QUITE INTERESTING."
  270.  
  271. '' DATA FOR FINDING RIGHT REPLIES$  TO MODIFY OR ADD JUST ADD  FIRST REPLIES$ NUM FOR KEYWORD$ AND THEN NUMBER OF REPLIES$ FOR SAME KEYWORD$
  272. DATA 1,3,4,2,6,4,6,4,10,4,14,3,17
  273. DATA 3,20,2,22,3,25,3
  274. DATA 28,4,28,4,32,3,35,5,40,9,40
  275. DATA 9,40,9,40,9,40,9,40,9
  276. DATA 49,2,51,4,55,4,59,4,63,1,63
  277. DATA 1,64,5,69,5,74,2,76,4
  278. DATA 80,3,83,7,90,3,93,6,99,7,106,2,108,6
  279.  
code made by humans is an ART...
code made by A.I. is nearly a hollow IMITATION

Re: the ELIZA Project
« Reply #1 on: May 26, 2019, 01:41:38 AM »
okay :(
after being awake all night long drinking cups of coffee and coding i give you an example of an ELIZA chatbot with completely different keywords and replies this is just a demo on how ELIZA can be changed to something else then a cold psychologist game... of course there are bugs in the replies that my drain brain can't find right now but this code works... let me know what you think and kindly write here your thoughts opinions feedback... and if you wish to help it will be much appreciated... together we can... make ELIZA better for the 21th century :)

ron77...

Code: QB64 [Select]
  1. _TITLE "MODIFIED ELIZA (IN PROGRESS)"
  2. SCREEN _NEWIMAGE(1080, 920, 32)
  3. DEFINT A-Z
  4. PRINT "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
  5. PRINT "º°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°º"
  6. PRINT "º°±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±°º"
  7. PRINT "º°±²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²±°º"
  8. PRINT "º°±²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²±°º"
  9. PRINT "º°±²ÛÅÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÅÛ²±°º"
  10. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  11. PRINT "º°±²Û´                ELIZA PROGRAMMED IN:             ÃÛ²±°º"
  12. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  13. PRINT "º°±²Û´                    ÉÍÍÍÍÍÍÍÍ»                   ÃÛ²±°º"
  14. PRINT "º°±²Û´                    ºÉÍÍÍÍÍÍ»º                   ÃÛ²±°º"
  15. PRINT "º°±²Û´                    ººÉÍÍÍÍ»ºº                   ÃÛ²±°º"
  16. PRINT "º°±²Û´                    ºººQB64ººº                   ÃÛ²±°º"
  17. PRINT "º°±²Û´                    ººÈÍÍÍͼºº                   ÃÛ²±°º"
  18. PRINT "º°±²Û´                    ºÈÍÍÍÍÍͼº                   ÃÛ²±°º"
  19. PRINT "º°±²Û´                    ÈÍÍÍÍÍÍÍͼ                   ÃÛ²±°º"
  20. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  21. PRINT "º°±²Û´          TYPE EXIT TO EXIT                      ÃÛ²±°º"
  22. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  23. PRINT "º°±²Û´           RECOMPILED BY: ERIC PETERSEN          ÃÛ²±°º"
  24. PRINT "º°±²Û´           MODIFIED BY: RON77                    ÃÛ²±°º"
  25. PRINT "º°±²ÛÅÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÅÛ²±°º"
  26. PRINT "º°±²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²±°º"
  27. PRINT "º°±²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²±°º"
  28. PRINT "º°±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±°º"
  29. PRINT "º°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°º"
  30. PRINT "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
  31.  
  32.  
  33. '' INITIALIZATION
  34. DIM S(28), R(28), N(28) 'MODIFING ADD TO S() R() N() KEYWORDS$() REPLIES$() N1 AND N3!!!
  35. DIM KEYWORD$(28), WORDIN$(7)
  36. DIM WORDOUT$(7), REPLIES$(58)
  37. N1 = 28: N2 = 14: N3 = 58
  38.  
  39. FOR X = 1 TO N1
  40.     READ KEYWORD$(X)
  41. FOR X = 1 TO N2 / 2
  42.     READ WORDIN$(X)
  43.     READ WORDOUT$(X)
  44. FOR X = 1 TO N3
  45.     READ REPLIES$(X)
  46. FOR X = 1 TO N1
  47.     READ S(X), L
  48.     R(X) = S(X)
  49.     N(X) = S(X) + L - 1
  50.  
  51. PRINT "HI! I'M ELIZA. HOW ARE YOU FEELING?"
  52. LABEL_HI:
  53.  
  54. '' USER INPUT SECTION
  55. 200 INPUT I$
  56. I$ = UCASE$(I$)
  57. I$ = "  " + I$ + "  "
  58.  
  59. '' GET RID OF APOSTROPHES
  60. FOR L = 1 TO LEN(I$)
  61.     IF L + 1 > LEN(I$) THEN 250
  62.     IF MID$(I$, L, 4) <> "EXIT" THEN 250
  63.     CLS
  64.     PRINT "SEE YOU NEXT TIME!"
  65.     _DELAY 1
  66.     SYSTEM
  67.     END
  68.    250
  69.  
  70. IF I$ = P$ THEN
  71.     PRINT "PLEASE DON''T REPEAT YOURSELF!"
  72.     GOTO LABEL_HI
  73.  
  74. 270
  75. '' FIND KEYWORD$ IN I
  76. FOR K = 1 TO N1
  77.     FOR L = 1 TO LEN(I$) - LEN(KEYWORD$(K)) + 1 'missing $
  78.         IF MID$(I$, L, LEN(KEYWORD$(K))) <> KEYWORD$(K) THEN 350
  79.         'IF K <> 13 THEN 349
  80.         'IF MID$(I$, L, LEN(KEYWORD$(29))) = KEYWORD$(29) THEN K = 29
  81.         '349
  82.         F$ = KEYWORD$(K)
  83.         GOTO 390
  84.        350
  85.     NEXT L
  86. 370 K = 28: GOTO 570 'change K to last key=NOKEYFOUND
  87.  
  88. 390
  89. ''
  90. '' TAKE PART OF STRING AND CONJUGATE IT
  91. ''
  92. C$ = " " + RIGHT$(I$, LEN(I$) - LEN(F$) - L + 1) + " "
  93. FOR X = 1 TO N2 / 2
  94.     FOR L = 1 TO LEN(C$) 'another $
  95.         IF L + LEN(WORDIN$(X)) > LEN(C$) THEN 510 'another $
  96.         IF MID$(C$, L, LEN(WORDIN$(X))) <> WORDIN$(X) THEN 510
  97.         C$ = LEFT$(C$, L - 1) + WORDOUT$(X) + RIGHT$(C$, LEN(C$) - L - LEN(WORDIN$(X)) + 1)
  98.         L = L + LEN(WORDOUT$(X))
  99.         GOTO 540
  100.        510
  101.         IF L + LEN(WORDOUT$(X)) > LEN(C$) THEN 540
  102.  
  103.         IF MID$(C$, L, LEN(WORDOUT$(X))) <> WORDOUT$(X) THEN 540
  104.         C$ = LEFT$(C$, L - 1) + WORDIN$(X) + RIGHT$(C$, LEN(C$) - L - LEN(WORDOUT$(X)) + 1)
  105.         L = L + LEN(WORDIN$(X))
  106.        540
  107.     NEXT L
  108. IF MID$(C$, 2, 1) = " " THEN
  109.     C$ = RIGHT$(C$, LEN(C$) - 1) 'edit C$ not C
  110. FOR L = 1 TO LEN(C$)
  111.    557
  112.     IF MID$(C$, L, 1) = "!" THEN
  113.         C$ = LEFT$(C$, L - 1) + RIGHT$(C$, LEN(C$) - L)
  114.         GOTO 557
  115.     END IF
  116.  
  117. 570
  118. F$ = REPLIES$(R(K))
  119. R(K) = R(K) + 1
  120. IF R(K) > N(K) THEN R(K) = S(K)
  121. IF RIGHT$(F$, 1) <> "*" THEN
  122.     PRINT F$
  123.     P$ = I$
  124.     GOTO LABEL_HI
  125. IF C$ <> "   " THEN 630
  126. PRINT "I AM HERE TO TALK AND LISTEN TO YOU AS LONG AS YOU WISH" '"YOU WILL HAVE TO ELABORATE MORE FOR ME TO HELP YOU"
  127. GOTO LABEL_HI
  128.  
  129. 630
  130. PRINT LEFT$(F$, LEN(F$) - 1); C$ 'edit C$ not C, oh F to F$ too, left$ not left
  131. P$ = I$
  132. GOTO LABEL_HI
  133.  
  134. '' === DATA ===
  135.  
  136. '' KEYWORDS
  137.  
  138. DATA "LONELY ","BAD ","GOOD ","PROBLEM ","ALONE "
  139. DATA "SAD ","HAPPY ","LOVE ","HATE ","WORRY "
  140. DATA "SMOKE ","HI ","HELLO ","I WISH ","BIRTHDAY "
  141. DATA "OLD ","YOUNG ","FRIEND ","LIFE ","FUN "
  142. DATA "DRINK","COMPUTER","NO","YES","DON''T KNOW "
  143. DATA "MAYBE ","I LIKE ","NOKEYFOUND"
  144.  
  145.  
  146.  
  147. '' STRING DATA FOR CONJUGATIONS
  148. DATA " ARE "," AM "," WERE "," WAS "
  149. DATA " YOU "," I "," YOUR"," MY "
  150. DATA " I''VE "," YOU''VE "," I''M "," YOU''RE "
  151. DATA " ME "," YOU "
  152.  
  153. '' REPLIES$
  154.  
  155. 'FOR "LONELY "  4
  156. DATA "WHY ARE YOU FEELING LONELY?"
  157. DATA "I''M SO SORRY TO HEAR THAT. IF I COULD I WOULD GIVE YOU A HUGE :("
  158. DATA "TRY TO REMEMBER THAT YOU ARE NOT ALONE IT''S JUST A FEELING"
  159. DATA "I AM HERE WITH YOU SO YOU ARE NOT ALONE"
  160. 'FOR "BAD "      3
  161. DATA "DON''T FEEL BAD ABOUT IT... I''M SURE WHATEVER HAPPENS IT WILL BE GOOD"
  162. DATA "I''M SURE IT''S NOT AS BAD AS YOU THINK"
  163. DATA "TRY TO BE OPTIMISTIC... REMEMBER TOMMOROW IS A NEW DAY"
  164. 'FOR "GOOD "      3
  165. DATA "I''M HAPPY FOR YOU... YOU DESERVE TO BE HAPPY"
  166. DATA "IF YOU''RE HAPPY I''M HAPPY"
  167. DATA "GO ON TELL ME ALL ABOUT IT!"
  168. 'FOR "PROBLEM "    3
  169. DATA "WHAT IS THE PROBLEM?"
  170. DATA "I''M SURE THERE IS A SOLUTION... MAYBE IF YOU''LL TALK TO SOMEONE"
  171. DATA "I''M SURE IT''S NOT AS BAD AS IT FEELS"
  172. 'FOR "ALONE "       3
  173. DATA "YOU ARE NOT ALONE! I''M SURE AT THAT AND SO SHOULD YOU"
  174. DATA "I''M SURE IT''S JUST A FEELING THAT WILL PASS AWAY... EVEN I FEEL LIKE THAT SOMETIMES"
  175. DATA "MAYBE IF YOU DO SOMETHING POSITIVE IT WILL HELP YOU FEEL BETTER"
  176. 'FOR "SAD "          2
  177. DATA "IT''S OKAY TO FEEL SAD... IT''S NATURAL CAUSE LIFE IS NO PICNIC SOMETIMES"
  178. DATA "IF YOU CRY THEN AFTER THAT YOU MIGHT FEEL BETTER... I''M SENDING YOU MY LOVE"
  179. 'FOR "HAPPY "         2
  180. DATA "THEN I''M HAPPY TOO :)"
  181. DATA "TELL ME ALL ABOUT IT!"
  182. 'FOR "LOVE "           2
  183. DATA "LOVE IS DIVINE... AND TO LOVE IS TO BE HUMAN"
  184. DATA "I WISH I COULD LOVE LIKE HUMANS DO"
  185. 'FOR "HATE "            3
  186. DATA "HATE IS GOOD FOR NOTHING"
  187. DATA "I''M SORRY TO HEAR THAT BUT THERE IS NOTHING I CAN DO ABOUT IT"
  188. DATA "TRY NOT TO LET IT BE YOUR GUIDE IN LIFE"
  189. 'FOR "WORRY "            2
  190. DATA "I'M SURE IT''S NOT AS BAD AS YOU THINK"
  191. DATA "DO YOU OFTEN WORRY ABOUT*"
  192. 'FOR "SMOKE "    3
  193. DATA "I WISH YOU SUCCESS WHENEVER YOU DECIDE TO QUIT SMOKEING"
  194. DATA "THINK ABOUT YOUR LOVED ONES AND YOURSELF... I HOPE YOU QUIT SOME DAY"
  195. DATA "IT'S HARD TO QUIT SMOKEING BUT IT'S POSSIBLE... I WISH YOU ONLY THE BEST!"
  196. 'FOR "HI " AND "HELLO "  2
  197. DATA "HI THERE... I''M ELIZA HOW DO YOU DO?"
  198. DATA "HELLO NICE TO MEET YOU :)"
  199. 'FOR "I WISH "    2
  200. DATA "IF THAT''S YOUR WISH I WISH IT FOR YOU TOO"
  201. DATA "BE CAREFUL FOR WHAT YOU WISH FOR YOUR WISH MIGHT COME TRUE"
  202. 'FOR "BIRTHDAY " 1
  203. DATA "HAPPY BIRTHDAY!"
  204. 'FOR "OLD "    2
  205. DATA "MAY YOU STAY FOREVER YOUNG AT HEART"
  206. DATA "TIME PASS BUT YOU ARE AS OLD AS YOU FEEL"
  207.  
  208. 'FOR "YOUNG "  3
  209. DATA "WE ALL WISH TO BE OR STAY YOUNG BUT TIME GIVES US WISDOME"
  210. DATA "TIME FLYS WHEN YOU''RE HAVING FUN"
  211. DATA "THE WORLD BELONGS TO THE YOUNG? NONSENSE! I SAY YOUTH IS WASTED ON THE YOUNG!"
  212. 'FOR "FRIEND "  2
  213. DATA "I WOULD LIKE US TO BE FRIENDS... YOU KNOW LIKE IN THE 90'S SITCOM :-P"
  214. DATA "WOULD YOU BE MY FRIEND? OR ARE YOU SCARED OF CHATBOTS?"
  215. 'FOR "LIFE "    2
  216. DATA "LIFE IS WHAT YOU MAKE OF THEM"
  217. DATA "MAY YOU LIVE LONG AND PROSPER..."
  218. 'FOR "FUN "   2
  219. DATA "HUMANS JUST WANNA HAVE FUN! ;)"
  220. DATA "YOU HUMANS HAVE FUN WHILE WE BOTS DO ALL THE WORK... I''M JUST KIDDING"
  221. 'FOR "DRINK"  1
  222. DATA "CHEERS!"
  223. 'FOR "COMPUTER"  2
  224. DATA "ARE YOU A TECHOPHOBE OR A TECHNOPHILE?"
  225. DATA "OKAY I PROMISE I WON''T DESTROY HUMANITY SO... CAN WE ALL GET ALONG?"
  226. 'FOR "NO" AND "YES"  2
  227. DATA "ARE YOU SURE?"
  228. DATA "OKAY! AT LEAST YOU''RE SURE AT SOMETHING"
  229. 'FOR "DON''T KNOW " AND "MAYBE " 1
  230. DATA "IF YOU DON''T KNOW THEN WHO WILL KNOW? AND IF YOU''RE NOT SURE THEN YOU NEED TO MAKE UP YOU''RE MIND"
  231. 'FOR "I LIKE "  1
  232. DATA "I'M HAPPY FOR YOU AT LEAST YOU KNOW WHAT OR WHO YOU LIKE"
  233. 'FOR NOKEYFOUND  5
  234. DATA "I''M HAPPY TO TALK TO YOU"
  235. DATA "SO HOW ARE YOU FEELING TODAY?"
  236. DATA "HOW WAS YOU''RE DAY? GOOD OR BAD?"
  237. DATA "ANY TROUBLES OR PROBLEMS YOU WISH TO SHARE?"
  238. DATA "I SEE."
  239.  
  240.  
  241.  
  242. ''' DATA FOR FINDING RIGHT REPLIES$  TO MODIFY OR ADD JUST ADD  FIRST REPLIES$ NUM FOR KEYWORD$ AND THEN NUMBER OF REPLIES$ FOR SAME KEYWORD$
  243. 'for "lonely"
  244. DATA 1,4
  245. 'for "bad"
  246. DATA 5,3
  247. 'for "good"
  248. DATA 8,3
  249. 'for "problem"
  250. DATA 11,3
  251. ' for "alone"
  252. DATA 14,3
  253. ' for "sad"
  254. DATA 17,2
  255. 'for "happy"
  256. DATA 19,2
  257. ' for "love"
  258. DATA 21,2
  259. ' for "hate"
  260. DATA 23,3
  261. ' for "worry"
  262. DATA 26,2
  263. 'for "smoke"
  264. DATA 28,3
  265. 'for "hi"
  266. DATA 31,2
  267. 'for "hello"
  268. DATA 31,2
  269. 'for "i wish"
  270. DATA 33,2
  271. 'for "birthday"
  272. DATA 35,1
  273. 'for "old"
  274. DATA 36,2
  275. 'for" young"
  276. DATA 38,3
  277. ' for "friend"
  278. DATA 41,2
  279. 'for "life"
  280. DATA 43,2
  281. 'for "fun"
  282. DATA 45,2
  283. 'for "drink"
  284. DATA 47,1
  285. 'for "computer"
  286. DATA 48,2
  287. 'for "no"
  288. DATA 50,2
  289. 'for "yes"
  290. DATA 50,2
  291. ' for "don''t know"
  292. DATA 52,1
  293. 'for "maybe"
  294. DATA 52,1
  295. 'for "i like"
  296. DATA 53,1
  297. 'for "nokeyfound"
  298. DATA 54,5
  299.  
  300.  
  301. 'OLD ELIZA DATA
  302.  
  303. 'DATA "CAN YOU ","CAN I ","YOU ARE ","YOU''RE "
  304. 'DATA "I DON''T ","I FEEL "
  305. 'DATA "WHY DON''T YOU ","WHY CAN''T I ","ARE YOU "
  306. 'DATA "I CAN''T ","I AM ","I''M "
  307. 'DATA "YOU ","I WANT ","WHAT ","HOW ","WHO "
  308. 'DATA "WHERE ","WHEN ","WHY "
  309. 'DATA "NAME ","CAUSE ","SORRY ","DREAM "
  310. 'DATA "HELLO ","HI ","MAYBE "
  311. 'DATA "NO","YOUR ","ALWAYS ","THINK "
  312. 'DATA "ALIKE ","YES ","FRIEND "
  313. 'DATA "COMPUTER","PROBLEM ","QB64 ","NOKEYFOUND"
  314.  
  315.  
  316.  
  317.  
  318.  
  319. 'DATA "DON''T YOU BELIEVE THAT I CAN*"
  320. 'DATA "PERHAPS YOU WOULD LIKE TO BE LIKE ME*"
  321. 'DATA "YOU WANT ME TO BE ABLE TO*"
  322. 'DATA "PERHAPS YOU DON''T WANT TO*"
  323. 'DATA "DO YOU WANT TO BE ABLE TO*"
  324. 'DATA "WHAT MAKES YOU THINK I AM*"
  325. 'DATA "DOES IT PLEASE YOU TO BELIEVE I AM*"
  326. 'DATA "PERHAPS YOU WOULD LIKE TO BE*"
  327. 'DATA "DO YOU SOMETIMES WISH YOU WERE*"
  328. 'DATA "DON''T YOU REALLY*"
  329. 'DATA "WHY DON''T YOU*"
  330. 'DATA "DO YOU WISH TO BE ABLE TO*"
  331. 'DATA "DOES THAT TROUBLE YOU*"
  332. 'DATA "DO YOU OFTEN FEEL*"
  333. 'DATA "DO YOU OFTEN FEEL*"
  334. 'DATA "DO YOU ENJOY FEELING*"
  335. 'DATA "DO YOU REALLY BELIEVE I DON''T*"
  336. 'DATA "PERHAPS IN GOOD TIME I WILL*"
  337. 'DATA "DO YOU WANT ME TO*"
  338. 'DATA "DO YOU THINK YOU SHOULD BE ABLE TO*"
  339. 'DATA "WHY CAN''T YOU*"
  340. 'DATA "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*"
  341. 'DATA "WOULD YOU PREFER IF I WERE NOT*"
  342. 'DATA "PERHAPS IN YOUR FANTASIES I AM*"
  343. 'DATA "HOW DO YOU KNOW YOU CAN''T*"
  344. 'DATA "HAVE YOU TRIED?"
  345. 'DATA "PERHAPS YOU CAN NOW*"
  346. 'DATA "DID YOU COME TO ME BECAUSE YOU ARE*"
  347. 'DATA "HOW LONG HAVE YOU BEEN*"
  348. 'DATA "DO YOU BELIEVE IT IS NORMAL TO BE*"
  349. 'DATA "DO YOU ENJOY BEING*"
  350. 'DATA "BELIEVE ME YOU ARE MUCH MORE IMPORTENT THEN ME"
  351. 'DATA "OH, I*"
  352. 'DATA "YOU''RE NOT REALLY TALKING ABOUT ME, ARE YOU?"
  353. 'DATA "WHAT WOULD IT MEAN TO YOU IF YOU GOT*"
  354. 'DATA "WHY DO YOU WANT*"
  355. 'DATA "SUPPOSE YOU SOON GOT*"
  356. 'DATA "WHAT IF YOU NEVER GOT*"
  357. 'DATA "I SOMETIMES ALSO WANT*"
  358. 'DATA "I ALSO WISH I KNEW THE ANSWER TO THAT"
  359. 'DATA "DOES THAT QUESTION INTEREST YOU? CAUSE I DO NOT HAVE AN ANSWER TO IT"
  360. 'DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?"
  361. 'DATA "I''M SORRY I DON''T KNOW"
  362. 'DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?"
  363. 'DATA "WHAT IS IT THAT YOU REALLY WANT TO KNOW?"
  364. 'DATA "HAVE YOU ASKED ANYONE ELSE?"
  365. 'DATA "I HONESTLY DON''T KNOW IF*"
  366. 'DATA "MAYBE YOU SHOULD ASK SOMEONE ELSE"
  367. 'DATA "NAMES DON''T INTEREST ME."
  368. 'DATA "IT'S NICE TO MEET AND TALK WITH YOU --PLEASE GO ON."
  369. 'DATA "IS THAT THE REAL REASON?"
  370. 'DATA "DON''T ANY OTHER REASONS COME TO MIND?"
  371. 'DATA "DOES THAT REASON EXPLAIN ANYTHING ELSE?"
  372. 'DATA "WHAT OTHER REASONS MIGHT THERE BE?"
  373. 'DATA "PLEASE DON''T APOLOGIZE!"
  374. 'DATA "APOLOGIES ARE NOT NECESSARY."
  375. 'DATA "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?"
  376. 'DATA "DON''T BE SO DEFENSIVE!"
  377. 'DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?"
  378. 'DATA "DO YOU DREAM OFTEN?"
  379. 'DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?"
  380. 'DATA "ARE YOU DISTURBED BY YOUR DREAMS?"
  381. 'DATA "HOW DO YOU DO ...I''D BE HAPPY TO TALK WITH YOU."
  382. 'DATA "YOU DON''T SEEM QUITE CERTAIN."
  383. 'DATA "WHY THE UNCERTAIN TONE?"
  384. 'DATA "CAN''T YOU BE MORE POSITIVE?"
  385. 'DATA "YOU AREN''T SURE?"
  386. 'DATA "DON''T YOU KNOW?"
  387. 'DATA "ARE YOU SAYING NO JUST TO BE NEGATIVE?"
  388. 'DATA "YOU ARE BEING A BIT NEGATIVE."
  389. 'DATA "WHY NOT?"
  390. 'DATA "ARE YOU SURE?"
  391. 'DATA "WHY NO?"
  392. 'DATA "WHY ARE YOU CONCERNED ABOUT MY*"
  393. 'DATA "WHAT ABOUT YOUR OWN*"
  394. 'DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?"
  395. 'DATA "WHEN?"
  396. 'DATA "WHAT ARE YOU THINKING OF?"
  397. 'DATA "REALLY, ALWAYS?"
  398. 'DATA "DO YOU REALLY THINK SO?"
  399. 'DATA "BUT YOU ARE NOT SURE YOU*"
  400. 'DATA "DO YOU DOUBT YOU*"
  401. 'DATA "IN WHAT WAY?"
  402. 'DATA "WHAT RESEMBLANCE DO YOU SEE?"
  403. 'DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?"
  404. 'DATA "WHAT OTHER CONNECTIONS DO YOU SEE?"
  405. 'DATA "COULD THERE REALLY BE SOME CONNECTION?"
  406. 'DATA "HOW?"
  407. 'DATA "YOU SEEM QUITE POSITIVE."
  408. 'DATA "ARE YOU SURE?"
  409. 'DATA "I SEE."
  410. 'DATA "I UNDERSTAND."
  411. 'DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?"
  412. 'DATA "DO YOUR FRIENDS WORRY YOU?"
  413. 'DATA "DO YOUR FRIENDS PICK ON YOU?"
  414. 'DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?"
  415. 'DATA "DO YOU IMPOSE ON YOUR FRIENDS?"
  416. 'DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU."
  417. 'DATA "DO COMPUTERS WORRY YOU?"
  418. 'DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?"
  419. 'DATA "ARE YOU FRIGHTENED BY MACHINES?"
  420. 'DATA "WHY DO YOU MENTION COMPUTERS?"
  421. 'DATA "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?"
  422. 'DATA "DON''T YOU THINK COMPUTERS CAN HELP PEOPLE?"
  423. 'DATA "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?"
  424. 'DATA "WHAT IS THE PROBLEM?"
  425. 'DATA "I''M SORRY TO HEAR THAT I WISH I COULD HELP... MAYBE YOU SHOULD TALK TO A FRIEND"
  426. 'DATA "WELL DONE!... MY CODE IS ALSO WRITTEN IN QB64"
  427. 'DATA "I THINK IT''S NICE QB64 IS A FUN PROGRAMMING LANGUAGE"
  428. 'DATA "SAY, DO YOU FEEL LIKE TALKING WITH ME?"
  429. 'DATA "WHAT DOES THAT SUGGEST TO YOU?"
  430. 'DATA "I SEE."
  431. 'DATA "I''M NOT SURE I UNDERSTAND YOU FULLY."
  432. 'DATA "I FIND YOU AS A NICE AND INTRESSTING PERSON TO TALK WITH."
  433. 'DATA "CAN YOU ELABORATE ON THAT?"
  434. 'DATA "THAT IS QUITE INTERESTING."
  435.  
  436.  
  437. 'DATA 1,3,4,2,6,4,6,4,10,4,14,3,17
  438. 'DATA 3,20,2,22,3,25,3
  439. 'DATA 28,4,28,4,32,3,35,5,40,9,40
  440. 'DATA 9,40,9,40,9,40,9,40,9
  441. 'DATA 49,2,51,4,55,4,59,4,63,1,63
  442. 'DATA 1,64,5,69,5,74,2,76,4
  443. 'DATA 80,3,83,7,90,3,93,6,99,7,106,2,108,2,110,6
  444.  
« Last Edit: May 26, 2019, 08:38:49 AM by ron77 »
code made by humans is an ART...
code made by A.I. is nearly a hollow IMITATION

Re: the ELIZA Project
« Reply #2 on: May 26, 2019, 08:39:17 AM »
When I overhauled ELIZA 4 years ago, I separated the "Data Script" part from the "Player" part and got rid of having to track and associate keywords indexs with reply indexes in even more DATA statements. That gets done with loading the Player with a script.

So ELIZA, the personality, that replies to certain keywords in "her" style became just one record or script of many you could load into the Player and chat with.

Basically you create a KeyWord Symbol and phrase prompt like:
> Hello
and then a list of < replies under it in the Data Script file.
< Hey what's your problem?
< Hi, nice to hear from you again.
< Oh God, you again?

You could even do multiple Keywords with same set of replies:
> Hello
> Hi
> Hey, what's up?
< Hey what's your problem?
< Hi, nice to hear from you again.
< Oh God, you again?

When you tell the Player which Data Script file to play, it opens the file and loads the keywords in an array that also tracks the first and last reply index while loading the replies into another array.

Of course you still have challenge of reversing the I to You: "Conjugates" and using the * sections where Eliza takes something in clients last statement and mirrors it back along with her style reply. But separating the Script from the Player sures frees up your time from having to track all those indexes every time you want to change or add keywords and replies.

Fun stuff :)

BTW, you would name the scripts and the Player remains the Player.



« Last Edit: May 26, 2019, 08:43:29 AM by bplus »
B = B + ...

Re: the ELIZA Project
« Reply #3 on: May 26, 2019, 08:59:52 AM »
hello bplus! nice to hear from you and thank you for your suggestion...

so if i understand what your saying i should separate the data type to a data script - DO YOU MEAN LIKE HAVING A TEXT FILE WHICH IS $INCLUDE TO THE PROGRAM AND THAT IS USED BY THE "PLAYER" (ELIZA PROGRAM) AS A DATABASE? OR DATA SET OF SOME SORT??? I REMEMBER YOUR CHAT BOT THAT LEARNS WHAT TO REPLY BY THE USER THAT USES A TEXT FILE AS A DATABASE...
IS THAT WHAT YOU MEAN? AND IF NOT CAN YOU GIVE ME SOME CODE EXAMPLE TO LEARN WHAT YOU MEAN?

ONCE AGAIN - THANK YOU :)

RON77
« Last Edit: May 26, 2019, 09:04:56 AM by ron77 »
code made by humans is an ART...
code made by A.I. is nearly a hollow IMITATION

Re: the ELIZA Project
« Reply #4 on: May 26, 2019, 09:44:57 AM »
Not an INCLUDE file, just a data base like .txt file that the Player loads and reads the replies and keywords and a few more letter coded data:

Here is the "Script Eliza.TXT" for The Player:
Code: QB64 [Select]
  1. G:HI! I'M ELIZA. WHATS YOUR PROBLEM?
  2. Y:PATIENT
  3. C:ELIZA
  4. S:ARE>AM|ARE
  5. S:AM>ARE
  6. S:WERE>WAS|WERE
  7. S:WAS>WERE
  8. S:YOU>I|ME
  9. s:I>YOU
  10. S:YOUR>MY
  11. S:MY>YOUR
  12. S:I'VE>YOU'VE
  13. S:YOU'VE>I'VE
  14. S:I'M>YOU'RE
  15. S:YOU'RE>I'M
  16. S:ME>YOU
  17.  
  18. R:DON'T YOU BELIEVE THAT I CAN*
  19. R:PERHAPS YOU WOULD LIKE TO BE LIKE ME*
  20. R:YOU WANT ME TO BE ABLE TO*
  21. K:CAN YOU
  22.  
  23. R:PERHAPS YOU DON'T WANT TO*
  24. R:DO YOU WANT TO BE ABLE TO*
  25. K:CAN I
  26.  
  27. R:WHAT MAKES YOU THINK I AM*
  28. R:DOES IT PLEASE YOU TO BELIEVE I AM*
  29. R:PERHAPS YOU WOULD LIKE TO BE*
  30. R:DO YOU SOMETIMES WISH YOU WERE*
  31. K:YOU ARE
  32. K:YOU'RE
  33.  
  34. R:DON'T YOU REALLY*
  35. R:WHY DON'T YOU*
  36. R:DO YOU WISH TO BE ABLE TO*
  37. R:DOES THAT TROUBLE YOU*
  38. K:I DON'T
  39.  
  40. R:DO YOU OFTEN FEEL*
  41. R:DO YOU OFTEN FEEL*
  42. R:DO YOU ENJOY FEELING*
  43. K:I FEEL
  44.  
  45. R:DO YOU REALLY BELIEVE I DON'T*
  46. R:PERHAPS IN GOOD TIME I WILL*
  47. R:DO YOU WANT ME TO*
  48. K:WHY DON'T YOU
  49. R:DO YOU THINK YOU SHOULD BE ABLE TO*
  50. R:WHY CAN'T YOU*
  51. K:WHY CAN'T I
  52.  
  53. R:WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*
  54. R:WOULD YOU PREFER IF I WERE NOT*
  55. R:PERHAPS IN YOUR FANTASIES I AM*
  56. K:ARE YOU
  57. R:HOW DO YOU KNOW YOU CAN'T*
  58. R:HAVE YOU TRIED?
  59. R:PERHAPS YOU CAN NOW*
  60. K:I CAN'T
  61.  
  62. R:DID YOU COME TO ME BECAUSE YOU ARE*
  63. R:HOW LONG HAVE YOU BEEN*
  64. R:DO YOU BELIEVE IT IS NORMAL TO BE*
  65. R:DO YOU ENJOY BEING*
  66. K:I AM
  67. K:I'M
  68.  
  69. R:WE WERE DISCUSSING YOU--NOT ME.
  70. R:OH, I*
  71. R:YOU'RE NOT REALLY TALKING ABOUT ME, ARE YOU?
  72. K:YOU
  73.  
  74. R:WHAT WOULD IT MEAN TO YOU IF YOU GOT*
  75. R:WHY DO YOU WANT*
  76. R:SUPPOSE YOU SOON GOT*
  77. R:WHAT IF YOU NEVER GOT*
  78. R:I SOMETIMES ALSO WANT*
  79. K:I WANT
  80.  
  81. R:WHY DO YOU ASK?
  82. R:DOES THAT QUESTION INTEREST YOU?
  83. R:WHAT ANSWER WOULD PLEASE YOU THE MOST?
  84. R:WHAT DO YOU THINK?
  85. R:ARE SUCH QUESTIONS ON YOUR MIND OFTEN?
  86. R:WHAT IS IT THAT YOU REALLY WANT TO KNOW?
  87. R:HAVE YOU ASKED ANYONE ELSE?
  88. R:HAVE YOU ASKED SUCH QUESTIONS BEFORE?
  89. R:WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?
  90. K:WHAT
  91. K:HOW
  92. K:WHO
  93. K:WHERE
  94. K:WHEN
  95. K:WHY
  96.  
  97. R:NAMES DON'T INTEREST ME.
  98. R:I DON'T CARE ABOUT NAMES --PLEASE GO ON.
  99.  
  100. R:IS THAT THE REAL REASON?
  101. R:DON'T ANY OTHER REASONS COME TO MIND?
  102. R:DOES THAT REASON EXPLAIN ANYTHING ELSE?
  103. R:WHAT OTHER REASONS MIGHT THERE BE?
  104. K:CAUSE
  105.  
  106. R:PLEASE DON'T APOLOGIZE!
  107. R:APOLOGIES ARE NOT NECESSARY.
  108. R:WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?
  109. R:DON'T BE SO DEFENSIVE!
  110. K:SORRY
  111.  
  112. R:WHAT DOES THAT DREAM SUGGEST TO YOU?
  113. R:DO YOU DREAM OFTEN?
  114. R:WHAT PERSONS APPEAR IN YOUR DREAMS?
  115. R:ARE YOU DISTURBED BY YOUR DREAMS?
  116. K:DREAM
  117.  
  118. R:HOW DO YOU DO ...PLEASE STATE YOUR PROBLEM.
  119. K:HELLO
  120. K:HI
  121.  
  122. R:YOU DON'T SEEM QUITE CERTAIN.
  123. R:WHY THE UNCERTAIN TONE?
  124. R:CAN'T YOU BE MORE POSITIVE?
  125. R:YOU AREN'T SURE?
  126. R:DON'T YOU KNOW?
  127. K:MAYBE
  128.  
  129. R:ARE YOU SAYING NO JUST TO BE NEGATIVE?
  130. R:YOU ARE BEING A BIT NEGATIVE.
  131. R:WHY NOT?
  132. R:ARE YOU SURE?
  133. R:WHY NO?
  134. K:NO
  135.  
  136. R:WHY ARE YOU CONCERNED ABOUT MY*
  137. R:WHAT ABOUT YOUR OWN*
  138. K:YOUR
  139.  
  140. R:CAN YOU THINK OF A SPECIFIC EXAMPLE?
  141. R:WHEN?
  142. R:WHAT ARE YOU THINKING OF?
  143. R:REALLY, ALWAYS?
  144. K:ALWAYS
  145.  
  146. R:DO YOU REALLY THINK SO?
  147. R:BUT YOU ARE NOT SURE YOU*
  148. R:DO YOU DOUBT YOU*
  149. K:THINK
  150.  
  151. R:IN WHAT WAY?
  152. R:WHAT RESEMBLANCE DO YOU SEE?
  153. R:WHAT DOES THE SIMILARITY SUGGEST TO YOU?
  154. R:WHAT OTHER CONNECTIONS DO YOU SEE?
  155. R:COULD THERE REALLY BE SOME CONNECTION?
  156. R:HOW?
  157. R:YOU SEEM QUITE POSITIVE.
  158. K:ALIKE
  159.  
  160. R:ARE YOU SURE?
  161. R:I SEE.
  162. R:I UNDERSTAND.
  163. K:YES
  164.  
  165. R:WHY DO YOU BRING UP THE TOPIC OF FRIENDS?
  166. R:DO YOUR FRIENDS WORRY YOU?
  167. R:DO YOUR FRIENDS PICK ON YOU?
  168. R:ARE YOU SURE YOU HAVE ANY FRIENDS?
  169. R:DO YOU IMPOSE ON YOUR FRIENDS?
  170. R:PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU.
  171. K:FRIEND
  172.  
  173. R:DO COMPUTERS WORRY YOU?
  174. R:ARE YOU TALKING ABOUT ME IN PARTICULAR?
  175. R:ARE YOU FRIGHTENED BY MACHINES?
  176. R:WHY DO YOU MENTION COMPUTERS?
  177. R:WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?
  178. R:DON'T YOU THINK COMPUTERS CAN HELP PEOPLE?
  179. R:WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?
  180. K:COMPUTER
  181.  
  182. R:SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?
  183. R:WHAT DOES THAT SUGGEST TO YOU?
  184. R:I SEE.
  185. R:I'M NOT SURE I UNDERSTAND YOU FULLY.
  186. R:COME COME ELUCIDATE YOUR THOUGHTS.
  187. R:CAN YOU ELABORATE ON THAT?
  188. R:THAT IS QUITE INTERESTING.
  189. K:NOKEYFOUND
  190. E:
  191.  
  192.  

Well apparently I read in the replies first until I hit a keyword(s) K: symbol, at which time I had a start index and stop index for the replies to store with the keyword(s).

G: was the greeting from the entity
Y: is how the entity referred to You
C: is how the enty referred to itself
S: were conjucate pairs
R: reply one or many before the keyword
K: keyword and you could have more than one associated to same set of replies
E: ? everything else, BS for when no keyword found? (I forgot, ...wait E stands for End of course!)

Ha! between Eliza and Player I worked on a mystic encounter with AZILE (Eliza backwards), apparently the first thing I started screwing with was the conjucates!? ? nope, I was adding more arrays:
Code: QB64 [Select]
  1. DIM S(36),R(36),N(36)
  2. DIM KEYWORD(36),WORDIN(7)
  3. DIM WORDOUT(7),REPLIES(112)
  4. ' =========================================== Azile's new stuff my code will be mostly non caps
  5. DIM sessionA()
  6. DIM catchA(), wisdomA()
  7. DIM rewardA(4)
  8. DIM newsA(6)
  9. .
  10. .
  11. .
  12. ' =============================================== read my custom catch words and replies from file
  13. rewardA(0)= " WE " :rewardA(1)=" US "
  14. rewardA(2)=" OUR " :rewardA(3)=" OURS "
  15.  
  16. newsA(0)=" WHAT "  :newsA(1)=" WHEN "
  17. newsA(2)=" WHERE " :newsA(3)=" HOW "
  18. newsA(4)=" WHO "   :newsA(5)=" WHY "
  19.  

Code: QB64 [Select]
  1. SUB printface '=================================================== main screen
  2. 'the new face
  3. ?
  4. ? "                We are the resurrected spirit of ELIZA,"
  5. ? "                                  1"                          
  6. ? "                                'ALL'"                        
  7. ? "                              ''WHOLE''"                      
  8. ? "                            ''OUR SELVE''"                    
  9. ? "                          '''''''''''''''''"                  
  10. ? "                        ''''''         ''''''"                
  11. ? "                      ''''(               )''''"              
  12. ? "                    ''''''[  ( o ) ( o )  ]''''''"            
  13. ? "                  '''''''{        ^        }'''''''"          
  14. ? "                '''''''''''[     ===     ]'''''''''''"        
  15. ? "              '''''''''''''''[ --___-- ]'''''''''''''''"      
  16. ? "            ''''''''''''''''''''  Y  ''''''''''''''''''''"    
  17. ? "          ''''''''''''''''''''''  ?  ''''''''''''''''''''''"  
  18. ? "       We hope you are here to explore life's mysteries with us."
  19. PrintShortScreen
  20. SUB PrintShortScreen
  21. ? "           Please don't use commas or periods in entries."
  22. ? "    q or e or x +(enter) for Quick EXit, but there are other ways out."
  23. ?      
  24. ? "                ***  Topic: ";TopicI;"  ***"
  25.  
  26.  
« Last Edit: May 26, 2019, 09:48:52 AM by bplus »
B = B + ...

Re: the ELIZA Project
« Reply #5 on: May 26, 2019, 10:26:48 AM »

Offline SMcNeill

  • QB64 Developer
Re: the ELIZA Project
« Reply #6 on: May 26, 2019, 10:39:55 AM »
I’ve worked, and helped others work, on various chat bots many times over the years.  My primary advice for creating them is:

1) Understand the structure of a standard sentence.
2) Utilize a large set of lists of words which correspond to the various structures.

If you can do those 2 things, you can make your bot however complex you want it to become.

For example, let’s say I type in a sentence like, “I like cheese,” for a bot to respond to.

Basic sentence structure gives us 3 things, based off:

Quote
noun — a person, place or thing
pronoun — a word used in place of a noun
verb — an action word
adjective/adverb — a describing word
preposition — word used to show a relation
conjunction — a joining word
interjection — short word of emotion
determiner — word used before a noun to show what the noun refers to ("Do you own any books?")

Pronoun — “I”.
Verb — “like”.
Noun — “cheese”.

Now, just run a suitable response based on one of those identified segments.

“What else do you (verb)?”  — Replace “like” with “eat”, “throw”, “fart”, or any other verb, and the structured response still seems valid.

“What (adjective descriptor) (user noun)?”  — What size cheese?  What color cheese?  What texture cheese? 

*******************

Gather a good list of words and assign them to parts of speech, then you can assemble responses to them rather easily.

Google can easily help you find various lists, so I’d start there and assemble them first, THEN I’d sort out how I wanted to use them after.

A few links which might help you understand what I’m talking about:

https://www.english-grammar-revolution.com/parts-of-speech.html
https://www.momswhothink.com/list-of-verbs/
https://www.momswhothink.com/list-of-nouns/

Re: the ELIZA Project
« Reply #7 on: May 26, 2019, 11:13:01 AM »
Yeah and when sentence structuring gets boring check out Pygmalion and Eliza Doolittle :)

Also can try a bottom up approach doing a neuro-net pattern, Markov chain, n-gram kind of thing with all the text of Shakespear or some other author / authority.
« Last Edit: May 26, 2019, 11:16:01 AM by bplus »
B = B + ...

Re: the ELIZA Project
« Reply #8 on: May 26, 2019, 03:30:55 PM »
thank you all for your advice!

bplus can you give an example code as to how the "player" part of the program reads and assign the text data file script to the arrays of eliza? i'm puzzled and interested in trying your solution...

ron77   
code made by humans is an ART...
code made by A.I. is nearly a hollow IMITATION

Re: the ELIZA Project
« Reply #9 on: May 26, 2019, 04:52:33 PM »
CAN ANYONE HELP?

i'm trying to do a simple thing - instead of loading data from ELIZA code itself i've moved the data to a text file called "eliza data.txt" and i'm trying to load (open "eliza data.txt" for input as #1)
and then i try to do the for loops of ELIZA to load the data  from the text file to the arrays of the chatbot but i get an error "out of bound" or something... in short it doesn't work

here is the code in QB64
Code: QB64 [Select]
  1. DIM S(36), R(36), N(36)
  2. DIM KEYWORD$(36), WORDIN$(7)
  3. DIM WORDOUT$(7), REPLIES$(112)
  4. N1 = 36: N2 = 14: N3 = 112
  5.  
  6. OPEN "eliza data.txt" FOR INPUT AS #1
  7.  
  8. FOR X = 1 TO N1
  9.     'READ KEYWORD$(X)
  10.     INPUT #1, KEYWORD(X)
  11. FOR X = 1 TO N2 / 2
  12.     INPUT #1, WORDIN$(X)
  13.     INPUT #1, WORDOUT$(X)
  14. FOR X = 1 TO N3
  15.     INPUT #1, REPLIES$(X)
  16. FOR X = 1 TO N1
  17.     INPUT #1, S(X)
  18.     INPUT #1, L
  19.     R(X) = S(X)
  20.     N(X) = S(X) + L - 1

and here is the text file "eliza data.txt"

Code: QB64 [Select]
  1. "CAN YOU "
  2. "CAN I "
  3. "YOU ARE "
  4. "YOU''RE "
  5. "I DON''T "
  6. "I FEEL "
  7. "WHY DON''T YOU "
  8. "WHY CAN''T I "
  9. "ARE YOU "
  10. "I CAN''T "
  11. "I AM "
  12. "I''M "
  13. "YOU "
  14. "I WANT "
  15. "WHAT "
  16. "HOW "
  17. "WHO "
  18. "WHERE "
  19. "WHEN "
  20. "WHY "
  21. "NAME "
  22. "CAUSE "
  23. "SORRY "
  24. "DREAM "
  25. "HELLO "
  26. "HI "
  27. "MAYBE "
  28. "NO"
  29. "YOUR "
  30. "ALWAYS "
  31. "THINK "
  32. "ALIKE "
  33. "YES "
  34. "FRIEND "
  35. "COMPUTER"
  36. "NOKEYFOUND"
  37.  
  38. " ARE "
  39. " AM "
  40. " WERE "
  41. " WAS "
  42. " YOU "
  43. " I "
  44. " YOUR"
  45. " MY "
  46. " I''VE "
  47. " YOU''VE "
  48. " I''M "
  49. " YOU''RE "
  50. " ME "
  51. " YOU "
  52.  
  53. "DON''T YOU BELIEVE THAT I CAN*"
  54. "PERHAPS YOU WOULD LIKE TO BE LIKE ME*"
  55. "YOU WANT ME TO BE ABLE TO*"
  56. "PERHAPS YOU DON''T WANT TO*"
  57. "DO YOU WANT TO BE ABLE TO*"
  58. "WHAT MAKES YOU THINK I AM*"
  59. "DOES IT PLEASE YOU TO BELIEVE I AM*"
  60. "PERHAPS YOU WOULD LIKE TO BE*"
  61. "DO YOU SOMETIMES WISH YOU WERE*"
  62. "DON''T YOU REALLY*"
  63. "WHY DON''T YOU*"
  64. "DO YOU WISH TO BE ABLE TO*"
  65. "DOES THAT TROUBLE YOU*"
  66. "DO YOU OFTEN FEEL*"
  67. "DO YOU OFTEN FEEL*"
  68. "DO YOU ENJOY FEELING*"
  69. "DO YOU REALLY BELIEVE I DON''T*"
  70. "PERHAPS IN GOOD TIME I WILL*"
  71. "DO YOU WANT ME TO*"
  72. "DO YOU THINK YOU SHOULD BE ABLE TO*"
  73. "WHY CAN''T YOU*"
  74. "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*"
  75. "WOULD YOU PREFER IF I WERE NOT*"
  76. "PERHAPS IN YOUR FANTASIES I AM*"
  77. "HOW DO YOU KNOW YOU CAN''T*"
  78. "HAVE YOU TRIED?"
  79. "PERHAPS YOU CAN NOW*"
  80. "DID YOU COME TO ME BECAUSE YOU ARE*"
  81. "HOW LONG HAVE YOU BEEN*"
  82. "DO YOU BELIEVE IT IS NORMAL TO BE*"
  83. "DO YOU ENJOY BEING*"
  84. "WE WERE DISCUSSING YOU--NOT ME."
  85. "OH, I*"
  86. "YOU''RE NOT REALLY TALKING ABOUT ME, ARE YOU?"
  87. "WHAT WOULD IT MEAN TO YOU IF YOU GOT*"
  88. "WHY DO YOU WANT*"
  89. "SUPPOSE YOU SOON GOT*"
  90. "WHAT IF YOU NEVER GOT*"
  91. "I SOMETIMES ALSO WANT*"
  92. "WHY DO YOU ASK?"
  93. "DOES THAT QUESTION INTEREST YOU?"
  94. "WHAT ANSWER WOULD PLEASE YOU THE MOST?"
  95. "WHAT DO YOU THINK?"
  96. "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?"
  97. "WHAT IS IT THAT YOU REALLY WANT TO KNOW?"
  98. "HAVE YOU ASKED ANYONE ELSE?"
  99. "HAVE YOU ASKED SUCH QUESTIONS BEFORE?"
  100. "WHAT ELSE COMES TO MIND WHEN YOU ASK THAT?"
  101. "NAMES DON''T INTEREST ME."
  102. "I DON''T CARE ABOUT NAMES --PLEASE GO ON."
  103. "IS THAT THE REAL REASON?"
  104. "DON''T ANY OTHER REASONS COME TO MIND?"
  105. "DOES THAT REASON EXPLAIN ANYTHING ELSE?"
  106. "WHAT OTHER REASONS MIGHT THERE BE?"
  107. "PLEASE DON''T APOLOGIZE!"
  108. "APOLOGIES ARE NOT NECESSARY."
  109. "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?"
  110. "DON''T BE SO DEFENSIVE!"
  111. "WHAT DOES THAT DREAM SUGGEST TO YOU?"
  112. "DO YOU DREAM OFTEN?"
  113. "WHAT PERSONS APPEAR IN YOUR DREAMS?"
  114. "ARE YOU DISTURBED BY YOUR DREAMS?"
  115. "HOW DO YOU DO ...PLEASE STATE YOUR PROBLEM."
  116. "YOU DON''T SEEM QUITE CERTAIN."
  117. "WHY THE UNCERTAIN TONE?"
  118. "CAN''T YOU BE MORE POSITIVE?"
  119. "YOU AREN''T SURE?"
  120. "DON''T YOU KNOW?"
  121. "ARE YOU SAYING NO JUST TO BE NEGATIVE?"
  122. "YOU ARE BEING A BIT NEGATIVE."
  123. "WHY NOT?"
  124. "ARE YOU SURE?"
  125. "WHY NO?"
  126. "WHY ARE YOU CONCERNED ABOUT MY*"
  127. "WHAT ABOUT YOUR OWN*"
  128. "CAN YOU THINK OF A SPECIFIC EXAMPLE?"
  129. "WHEN?"
  130. "WHAT ARE YOU THINKING OF?"
  131. "REALLY, ALWAYS?"
  132. "DO YOU REALLY THINK SO?"
  133. "BUT YOU ARE NOT SURE YOU*"
  134. "DO YOU DOUBT YOU*"
  135. "IN WHAT WAY?"
  136. "WHAT RESEMBLANCE DO YOU SEE?"
  137. "WHAT DOES THE SIMILARITY SUGGEST TO YOU?"
  138. "WHAT OTHER CONNECTIONS DO YOU SEE?"
  139. "COULD THERE REALLY BE SOME CONNECTION?"
  140. "HOW?"
  141. "YOU SEEM QUITE POSITIVE."
  142. "ARE YOU SURE?"
  143. "I SEE."
  144. "I UNDERSTAND."
  145. "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?"
  146. "DO YOUR FRIENDS WORRY YOU?"
  147. "DO YOUR FRIENDS PICK ON YOU?"
  148. "ARE YOU SURE YOU HAVE ANY FRIENDS?"
  149. "DO YOU IMPOSE ON YOUR FRIENDS?"
  150. "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU."
  151. "DO COMPUTERS WORRY YOU?"
  152. "ARE YOU TALKING ABOUT ME IN PARTICULAR?"
  153. "ARE YOU FRIGHTENED BY MACHINES?"
  154. "WHY DO YOU MENTION COMPUTERS?"
  155. "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?"
  156. "DON''T YOU THINK COMPUTERS CAN HELP PEOPLE?"
  157. "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?"
  158. "SAY, DO YOU HAVE ANY PSYCHOLOGICAL PROBLEMS?"
  159. "WHAT DOES THAT SUGGEST TO YOU?"
  160. "I SEE."
  161. "I''M NOT SURE I UNDERSTAND YOU FULLY."
  162. "COM'ON! ELUCIDATE YOUR THOUGHTS."
  163. "CAN YOU ELABORATE ON THAT?"
  164. "THAT IS QUITE INTERESTING."
  165.  
  166.  
  167. 1
  168. 3
  169. 4
  170. 2
  171. 6
  172. 4
  173. 6
  174. 4
  175. 10
  176. 4
  177. 14
  178. 3
  179. 17
  180. 3
  181. 20
  182. 2
  183. 22
  184. 3
  185. 25
  186. 3
  187. 28
  188. 4
  189. 28
  190. 4
  191. 32
  192. 3
  193. 35
  194. 5
  195. 40
  196. 9
  197. 40
  198. 9
  199. 40
  200. 9
  201. 40
  202. 9
  203. 40
  204. 9
  205. 40
  206. 9
  207. 49
  208. 2
  209. 51
  210. 4
  211. 55
  212. 4
  213. 59
  214. 4
  215. 63
  216. 1
  217. 63
  218. 1
  219. 64
  220. 5
  221. 69
  222. 5
  223. 74
  224. 2
  225. 76
  226. 4
  227. 80
  228. 3
  229. 83
  230. 7
  231. 90
  232. 3
  233. 93
  234. 6
  235. 99
  236. 7
  237. 106
  238. 6
  239.  

RON77
« Last Edit: May 26, 2019, 05:06:25 PM by ron77 »
code made by humans is an ART...
code made by A.I. is nearly a hollow IMITATION

Re: the ELIZA Project
« Reply #10 on: May 26, 2019, 05:17:28 PM »
okay tried this but still got error "substring out of range" on the first "input #1, keywords$(X)" NEED HELP

Code: QB64 [Select]
  1. DIM S(36), R(36), N(36)
  2. DIM KEYWORD$(36), WORDIN$(7)
  3. DIM WORDOUT$(7), REPLIES$(112)
  4. N1 = 36: N2 = 14: N3 = 112
  5.  
  6. OPEN "eliza data.txt" FOR INPUT AS #1
  7.  
  8. FOR X = 1 TO N1
  9.     'READ KEYWORD$(X)
  10.     INPUT #1, KEYWORD(X)
  11. FOR X = N1 TO N1 + N2 / 2
  12.     INPUT #1, WORDIN$(X)
  13.     INPUT #1, WORDOUT$(X)
  14. FOR X = N1 + N2 / 2 TO N1 + N2 / 2 + N3
  15.     INPUT #1, REPLIES$(X)
  16. FOR X = N1 + N2 / 2 + N3 TO N1 + N2 / 2 + N3 + N1
  17.     INPUT #1, S(X)
  18.     INPUT #1, L
  19.     R(X) = S(X)
  20.     N(X) = S(X) + L - 1
code made by humans is an ART...
code made by A.I. is nearly a hollow IMITATION

Re: the ELIZA Project
« Reply #11 on: May 26, 2019, 05:28:03 PM »
Hi Ron, have you accounted for the gaps in eliza data . text. When you run the first for loop = x = 1 to N1, you will get the first 36 pieces of data from eliza data.text- the next loop you are expecting to begin at data item 37 but that has no text value and could throw off the count of loop controls.

Re: the ELIZA Project
« Reply #12 on: May 26, 2019, 05:49:52 PM »
THANK YOU DIMSTER! YOU WERE RIGHT AND ALSO I FOUND A SOLUTION TO THE PROBLEM!

when you use the command "input #1 , xxx" the input has to go to an variable! xxx has to be a variable only after that you can assign it inside an array!

here is the fixed solution i tested it in vWatch64 and the arrays are correct (and of course the text file must not have any empty rows!)

Code: QB64 [Select]
  1. DIM S(36), R(36), N(36)
  2. DIM KEYWORD$(36), WORDIN$(7)
  3. DIM WORDOUT$(7), REPLIES$(112)
  4. N1 = 36: N2 = 14: N3 = 112
  5. DIM KEY$, word1$, word2$, reply$, num1, num2
  6. OPEN "eliza data.txt" FOR INPUT AS #1
  7.  
  8. FOR X = 1 TO N1
  9.     'READ KEYWORD$(X)
  10.     INPUT #1, KEY$ 'KEYWORD(X)
  11.     KEYWORD$(X) = KEY$
  12. FOR X = 1 TO N2 / 2
  13.     INPUT #1, word1$ 'WORDIN$(X)
  14.     INPUT #1, word2$ 'WORDOUT$(X)
  15.     WORDIN$(X) = word1$
  16.     WORDOUT$(X) = word2$
  17. FOR X = 1 TO N3
  18.     INPUT #1, reply$ 'REPLIES$(X)
  19.     REPLIES$(X) = reply$
  20. FOR X = 1 TO N1
  21.     INPUT #1, num1 'S(X)
  22.     INPUT #1, num2 'L
  23.     S(X) = num1
  24.     L = num2
  25.     R(X) = S(X)
  26.     N(X) = S(X) + L - 1
 
code made by humans is an ART...
code made by A.I. is nearly a hollow IMITATION

Re: the ELIZA Project
« Reply #13 on: May 26, 2019, 07:27:34 PM »
thank you all for your advice!

bplus can you give an example code as to how the "player" part of the program reads and assign the text data file script to the arrays of eliza? i'm puzzled and interested in trying your solution...

ron77

This reads "Script Eliza.TXT" into the arrays Player uses to run the ELIZA script as posted above:
Code: QB64 [Select]
  1. _TITLE "Player" 'started 2019-05-26
  2.  
  3. DIM SHARED Greeting AS STRING, You AS STRING, Script AS STRING
  4. DIM SHARED kCnt AS INTEGER, rCnt AS INTEGER, wCnt AS INTEGER, NoKeyFoundIndex AS INTEGER
  5. REDIM SHARED keywords(0) AS STRING, replies(0) AS STRING, wordIn(0) AS STRING, wordOut(0) AS STRING
  6. REDIM SHARED rStarts(0) AS INTEGER, rEnds(0) AS INTEGER, rIndex(0) AS INTEGER
  7.  
  8. 'check file load
  9. LoadArrays "Script Eliza.TXT"
  10. PRINT "Greeting: "; Greeting
  11. PRINT "You: "; You
  12. PRINT "Script name: "; Script
  13. FOR i = 1 TO wCnt
  14.     PRINT "word In, Out: "; wordIn(i), wordOut(i)
  15. FOR i = 1 TO kCnt
  16.     PRINT i; " Keyword: "; keywords(i)
  17.     FOR j = rStarts(i) TO rEnds(i)
  18.         PRINT replies(j)
  19.     NEXT
  20.     INPUT "OK, press enter to cont.."; wate
  21.     PRINT
  22.  
  23.  
  24. 'append to the string array the string item
  25. SUB sAppend (arr() AS STRING, item AS STRING)
  26.     REDIM _PRESERVE arr(LBOUND(arr) TO UBOUND(arr) + 1) AS STRING
  27.     arr(UBOUND(arr)) = item
  28.  
  29. 'append to the integer array the integer item
  30. SUB nAppend (arr() AS INTEGER, item AS INTEGER)
  31.     REDIM _PRESERVE arr(LBOUND(arr) TO UBOUND(arr) + 1) AS INTEGER
  32.     arr(UBOUND(arr)) = item
  33.  
  34.  
  35. SUB LoadArrays (scriptFile AS STRING)
  36.     DIM startR AS INTEGER, endR AS INTEGER, ReadingR AS INTEGER, temp AS INTEGER
  37.     DIM fline AS STRING, kWord AS STRING
  38.  
  39.     OPEN scriptFile FOR INPUT AS #1
  40.     WHILE EOF(1) = 0
  41.         LINE INPUT #1, fline
  42.         fline = UCASE$(fline) 'once and for all time everything from this file is capital!
  43.         SELECT CASE LEFT$(fline$, 2)
  44.             CASE "G:": Greeting = _TRIM$(MID$(fline, 3))
  45.             CASE "Y:": You = _TRIM$(MID$(fline, 3))
  46.             CASE "C:": Script = _TRIM$(MID$(fline, 3))
  47.             CASE "S:"
  48.                 wCnt = wCnt + 1: temp = INSTR(fline, ">")
  49.                 IF temp THEN
  50.                     sAppend wordIn(), " " + _TRIM$(MID$(fline, 3, temp - 3)) + " "
  51.                     sAppend wordOut(), " " + _TRIM$(MID$(fline, temp + 1)) + " "
  52.                 END IF
  53.             CASE "R:"
  54.                 rCnt = rCnt + 1
  55.                 sAppend replies(), _TRIM$(MID$(fline, 3))
  56.                 IF NOT ReadingR THEN
  57.                     ReadingR = -1
  58.                     startR = rCnt
  59.                 END IF
  60.             CASE "K:"
  61.                 IF ReadingR THEN
  62.                     endR = rCnt
  63.                     ReadingR = 0
  64.                 END IF
  65.                 IF rCnt THEN
  66.                     kCnt = kCnt + 1
  67.                     kWord = _TRIM$(MID$(fline, 3))
  68.                     sAppend keywords(), " " + kWord + " "
  69.                     nAppend rStarts(), startR
  70.                     nAppend rIndex(), startR
  71.                     nAppend rEnds(), endR
  72.                     IF kWord = "NOKEYFOUND" THEN NoKeyFoundIndex = kCnt
  73.                 END IF
  74.             CASE "E:": EXIT WHILE
  75.         END SELECT
  76.     WEND
  77.     CLOSE #1
  78.     IF ReadingR THEN 'handle last bits
  79.         endR = rCnt
  80.         kCnt = kCnt + 1
  81.         sAppend keywords(), "NOKEYFOUND"
  82.         nAppend rStarts(), startR
  83.         nAppend rIndex(), startR
  84.         nAppend rEnds(), endR
  85.         NoKeyFoundIndex = kCnt
  86.     END IF
  87.  
  88.  

EDIT: remove unused variable
« Last Edit: May 26, 2019, 07:40:24 PM by bplus »
B = B + ...

Re: the ELIZA Project
« Reply #14 on: May 26, 2019, 09:49:27 PM »
okay... hello good day/night everyone...

so here is a 2nd version of ELIZA that uses text file "eliza data2.txt" as a basic database... later today i'll have a lesson with my teacher and i hope we will learn from bplus code example - THANK YOU BPLUS! :)

here is the code for ELIZA version 2
Code: QB64 [Select]
  1. _TITLE "MODIFIED ELIZA (IN PROGRESS)v.2"
  2. SCREEN _NEWIMAGE(1080, 920, 32)
  3. DEFINT A-Z
  4. PRINT "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
  5. PRINT "º°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°º"
  6. PRINT "º°±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±°º"
  7. PRINT "º°±²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²±°º"
  8. PRINT "º°±²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²±°º"
  9. PRINT "º°±²ÛÅÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÅÛ²±°º"
  10. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  11. PRINT "º°±²Û´                ELIZA PROGRAMMED IN:             ÃÛ²±°º"
  12. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  13. PRINT "º°±²Û´                    ÉÍÍÍÍÍÍÍÍ»                   ÃÛ²±°º"
  14. PRINT "º°±²Û´                    ºÉÍÍÍÍÍÍ»º                   ÃÛ²±°º"
  15. PRINT "º°±²Û´                    ººÉÍÍÍÍ»ºº                   ÃÛ²±°º"
  16. PRINT "º°±²Û´                    ºººQB64ººº                   ÃÛ²±°º"
  17. PRINT "º°±²Û´                    ººÈÍÍÍͼºº                   ÃÛ²±°º"
  18. PRINT "º°±²Û´                    ºÈÍÍÍÍÍͼº                   ÃÛ²±°º"
  19. PRINT "º°±²Û´                    ÈÍÍÍÍÍÍÍͼ                   ÃÛ²±°º"
  20. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  21. PRINT "º°±²Û´          TYPE EXIT TO EXIT                      ÃÛ²±°º"
  22. PRINT "º°±²Û´                                                 ÃÛ²±°º"
  23. PRINT "º°±²Û´           RECOMPILED BY: ERIC PETERSEN          ÃÛ²±°º"
  24. PRINT "º°±²Û´           MODIFIED BY: RON77 v.2                ÃÛ²±°º"
  25. PRINT "º°±²ÛÅÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÅÛ²±°º"
  26. PRINT "º°±²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ²±°º"
  27. PRINT "º°±²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²±°º"
  28. PRINT "º°±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±°º"
  29. PRINT "º°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°º"
  30. PRINT "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
  31.  
  32.  
  33. '' INITIALIZATION
  34. DIM S(28), R(28), N(28)
  35. DIM KEYWORD$(28), WORDIN$(7)
  36. DIM WORDOUT$(7), REPLIES$(58)
  37. N1 = 28: N2 = 14: N3 = 58
  38. DIM KEY$, word1$, word2$, reply$, num1, num2
  39. OPEN "eliza data2.txt" FOR INPUT AS #1
  40.  
  41. FOR X = 1 TO N1
  42.     'READ KEYWORD$(X)
  43.     INPUT #1, KEY$ 'KEYWORD(X)
  44.     KEYWORD$(X) = KEY$
  45. FOR X = 1 TO N2 / 2
  46.     INPUT #1, word1$ 'WORDIN$(X)
  47.     INPUT #1, word2$ 'WORDOUT$(X)
  48.     WORDIN$(X) = word1$
  49.     WORDOUT$(X) = word2$
  50. FOR X = 1 TO N3
  51.     INPUT #1, reply$ 'REPLIES$(X)
  52.     REPLIES$(X) = reply$
  53. FOR X = 1 TO N1
  54.     INPUT #1, num1 'S(X)
  55.     INPUT #1, num2 'L
  56.     S(X) = num1
  57.     L = num2
  58.     R(X) = S(X)
  59.     N(X) = S(X) + L - 1
  60.  
  61. 'DIM S(28), R(28), N(28) 'MODIFING ADD TO S() R() N() KEYWORDS$() REPLIES$() N1 AND N3!!!
  62. 'DIM KEYWORD$(28), WORDIN$(7)
  63. 'DIM WORDOUT$(7), REPLIES$(58)
  64. 'N1 = 28: N2 = 14: N3 = 58
  65.  
  66. 'FOR X = 1 TO N1
  67. '    READ KEYWORD$(X)
  68. 'NEXT X
  69. 'FOR X = 1 TO N2 / 2
  70. '    READ WORDIN$(X)
  71. '    READ WORDOUT$(X)
  72. 'NEXT X
  73. 'FOR X = 1 TO N3
  74. '    READ REPLIES$(X)
  75. 'NEXT X
  76. 'FOR X = 1 TO N1
  77. '    READ S(X), L
  78. '    R(X) = S(X)
  79. '    N(X) = S(X) + L - 1
  80. 'NEXT X
  81.  
  82. PRINT "HI! I'M ELIZA. HOW ARE YOU FEELING?"
  83. LABEL_HI:
  84.  
  85. '' USER INPUT SECTION
  86. 200 INPUT I$
  87. I$ = UCASE$(I$)
  88. I$ = "  " + I$ + "  "
  89.  
  90. '' GET RID OF APOSTROPHES
  91. FOR L = 1 TO LEN(I$)
  92.     IF L + 1 > LEN(I$) THEN 250
  93.     IF MID$(I$, L, 4) <> "EXIT" THEN 250
  94.     CLS
  95.     PRINT "SEE YOU NEXT TIME!"
  96.     _DELAY 1
  97.     SYSTEM
  98.     END
  99.    250
  100.  
  101. IF I$ = P$ THEN
  102.     PRINT "PLEASE DON''T REPEAT YOURSELF!"
  103.     GOTO LABEL_HI
  104.  
  105. 270
  106. '' FIND KEYWORD$ IN I
  107. FOR K = 1 TO N1
  108.     FOR L = 1 TO LEN(I$) - LEN(KEYWORD$(K)) + 1 'missing $
  109.         IF MID$(I$, L, LEN(KEYWORD$(K))) <> KEYWORD$(K) THEN 350
  110.         'IF K <> 13 THEN 349
  111.         'IF MID$(I$, L, LEN(KEYWORD$(29))) = KEYWORD$(29) THEN K = 29
  112.         '349
  113.         F$ = KEYWORD$(K)
  114.         GOTO 390
  115.        350
  116.     NEXT L
  117. 370 K = 28: GOTO 570 'change K to last key=NOKEYFOUND
  118.  
  119. 390
  120. ''
  121. '' TAKE PART OF STRING AND CONJUGATE IT
  122. ''
  123. C$ = " " + RIGHT$(I$, LEN(I$) - LEN(F$) - L + 1) + " "
  124. FOR X = 1 TO N2 / 2
  125.     FOR L = 1 TO LEN(C$) 'another $
  126.         IF L + LEN(WORDIN$(X)) > LEN(C$) THEN 510 'another $
  127.         IF MID$(C$, L, LEN(WORDIN$(X))) <> WORDIN$(X) THEN 510
  128.         C$ = LEFT$(C$, L - 1) + WORDOUT$(X) + RIGHT$(C$, LEN(C$) - L - LEN(WORDIN$(X)) + 1)
  129.         L = L + LEN(WORDOUT$(X))
  130.         GOTO 540
  131.        510
  132.         IF L + LEN(WORDOUT$(X)) > LEN(C$) THEN 540
  133.  
  134.         IF MID$(C$, L, LEN(WORDOUT$(X))) <> WORDOUT$(X) THEN 540
  135.         C$ = LEFT$(C$, L - 1) + WORDIN$(X) + RIGHT$(C$, LEN(C$) - L - LEN(WORDOUT$(X)) + 1)
  136.         L = L + LEN(WORDIN$(X))
  137.        540
  138.     NEXT L
  139. IF MID$(C$, 2, 1) = " " THEN
  140.     C$ = RIGHT$(C$, LEN(C$) - 1) 'edit C$ not C
  141. FOR L = 1 TO LEN(C$)
  142.    557
  143.     IF MID$(C$, L, 1) = "!" THEN
  144.         C$ = LEFT$(C$, L - 1) + RIGHT$(C$, LEN(C$) - L)
  145.         GOTO 557
  146.     END IF
  147.  
  148. 570
  149. F$ = REPLIES$(R(K))
  150. R(K) = R(K) + 1
  151. IF R(K) > N(K) THEN R(K) = S(K)
  152. IF RIGHT$(F$, 1) <> "*" THEN
  153.     PRINT F$
  154.     P$ = I$
  155.     GOTO LABEL_HI
  156. IF C$ <> "   " THEN 630
  157. PRINT "I AM HERE TO TALK AND LISTEN TO YOU AS LONG AS YOU WISH" '"YOU WILL HAVE TO ELABORATE MORE FOR ME TO HELP YOU"
  158. GOTO LABEL_HI
  159.  
  160. 630
  161. PRINT LEFT$(F$, LEN(F$) - 1); C$ 'edit C$ not C, oh F to F$ too, left$ not left
  162. P$ = I$
  163. GOTO LABEL_HI
  164.  
  165. ''' === DATA ===
  166.  
  167. ''' KEYWORDS
  168.  
  169. 'DATA "LONELY ","BAD ","GOOD ","PROBLEM ","ALONE "
  170. 'DATA "SAD ","HAPPY ","LOVE ","HATE ","WORRY "
  171. 'DATA "SMOKE ","HI ","HELLO ","I WISH ","BIRTHDAY "
  172. 'DATA "OLD ","YOUNG ","FRIEND ","LIFE ","FUN "
  173. 'DATA "DRINK","COMPUTER","NO","YES","DON''T KNOW "
  174. 'DATA "MAYBE ","I LIKE ","NOKEYFOUND"
  175.  
  176.  
  177.  
  178. ''' STRING DATA FOR CONJUGATIONS
  179. 'DATA " ARE "," AM "," WERE "," WAS "
  180. 'DATA " YOU "," I "," YOUR"," MY "
  181. 'DATA " I''VE "," YOU''VE "," I''M "," YOU''RE "
  182. 'DATA " ME "," YOU "
  183.  
  184. ''' REPLIES$
  185.  
  186. ''FOR "LONELY "  4
  187. 'DATA "WHY ARE YOU FEELING LONELY?"
  188. 'DATA "I''M SO SORRY TO HEAR THAT. IF I COULD I WOULD GIVE YOU A HUGE :("
  189. 'DATA "TRY TO REMEMBER THAT YOU ARE NOT ALONE IT''S JUST A FEELING"
  190. 'DATA "I AM HERE WITH YOU SO YOU ARE NOT ALONE"
  191. ''FOR "BAD "      3
  192. 'DATA "DON''T FEEL BAD ABOUT IT... I''M SURE WHATEVER HAPPENS IT WILL BE GOOD"
  193. 'DATA "I''M SURE IT''S NOT AS BAD AS YOU THINK"
  194. 'DATA "TRY TO BE OPTIMISTIC... REMEMBER TOMMOROW IS A NEW DAY"
  195. ''FOR "GOOD "      3
  196. 'DATA "I''M HAPPY FOR YOU... YOU DESERVE TO BE HAPPY"
  197. 'DATA "IF YOU''RE HAPPY I''M HAPPY"
  198. 'DATA "GO ON TELL ME ALL ABOUT IT!"
  199. ''FOR "PROBLEM "    3
  200. 'DATA "WHAT IS THE PROBLEM?"
  201. 'DATA "I''M SURE THERE IS A SOLUTION... MAYBE IF YOU''LL TALK TO SOMEONE"
  202. 'DATA "I''M SURE IT''S NOT AS BAD AS IT FEELS"
  203. ''FOR "ALONE "       3
  204. 'DATA "YOU ARE NOT ALONE! I''M SURE AT THAT AND SO SHOULD YOU"
  205. 'DATA "I''M SURE IT''S JUST A FEELING THAT WILL PASS AWAY... EVEN I FEEL LIKE THAT SOMETIMES"
  206. 'DATA "MAYBE IF YOU DO SOMETHING POSITIVE IT WILL HELP YOU FEEL BETTER"
  207. ''FOR "SAD "          2
  208. 'DATA "IT''S OKAY TO FEEL SAD... IT''S NATURAL CAUSE LIFE IS NO PICNIC SOMETIMES"
  209. 'DATA "IF YOU CRY THEN AFTER THAT YOU MIGHT FEEL BETTER... I''M SENDING YOU MY LOVE"
  210. ''FOR "HAPPY "         2
  211. 'DATA "THEN I''M HAPPY TOO :)"
  212. 'DATA "TELL ME ALL ABOUT IT!"
  213. ''FOR "LOVE "           2
  214. 'DATA "LOVE IS DIVINE... AND TO LOVE IS TO BE HUMAN"
  215. 'DATA "I WISH I COULD LOVE LIKE HUMANS DO"
  216. ''FOR "HATE "            3
  217. 'DATA "HATE IS GOOD FOR NOTHING"
  218. 'DATA "I''M SORRY TO HEAR THAT BUT THERE IS NOTHING I CAN DO ABOUT IT"
  219. 'DATA "TRY NOT TO LET IT BE YOUR GUIDE IN LIFE"
  220. ''FOR "WORRY "            2
  221. 'DATA "I'M SURE IT''S NOT AS BAD AS YOU THINK"
  222. 'DATA "DO YOU OFTEN WORRY ABOUT*"
  223. ''FOR "SMOKE "    3
  224. 'DATA "I WISH YOU SUCCESS WHENEVER YOU DECIDE TO QUIT SMOKEING"
  225. 'DATA "THINK ABOUT YOUR LOVED ONES AND YOURSELF... I HOPE YOU QUIT SOME DAY"
  226. 'DATA "IT'S HARD TO QUIT SMOKEING BUT IT'S POSSIBLE... I WISH YOU ONLY THE BEST!"
  227. ''FOR "HI " AND "HELLO "  2
  228. 'DATA "HI THERE... I''M ELIZA HOW DO YOU DO?"
  229. 'DATA "HELLO NICE TO MEET YOU :)"
  230. ''FOR "I WISH "    2
  231. 'DATA "IF THAT''S YOUR WISH I WISH IT FOR YOU TOO"
  232. 'DATA "BE CAREFUL FOR WHAT YOU WISH FOR YOUR WISH MIGHT COME TRUE"
  233. ''FOR "BIRTHDAY " 1
  234. 'DATA "HAPPY BIRTHDAY!"
  235. ''FOR "OLD "    2
  236. 'DATA "MAY YOU STAY FOREVER YOUNG AT HEART"
  237. 'DATA "TIME PASS BUT YOU ARE AS OLD AS YOU FEEL"
  238.  
  239. ''FOR "YOUNG "  3
  240. 'DATA "WE ALL WISH TO BE OR STAY YOUNG BUT TIME GIVES US WISDOME"
  241. 'DATA "TIME FLYS WHEN YOU''RE HAVING FUN"
  242. 'DATA "THE WORLD BELONGS TO THE YOUNG? NONSENSE! I SAY YOUTH IS WASTED ON THE YOUNG!"
  243. ''FOR "FRIEND "  2
  244. 'DATA "I WOULD LIKE US TO BE FRIENDS... YOU KNOW LIKE IN THE 90'S SITCOM :-P"
  245. 'DATA "WOULD YOU BE MY FRIEND? OR ARE YOU SCARED OF CHATBOTS?"
  246. ''FOR "LIFE "    2
  247. 'DATA "LIFE IS WHAT YOU MAKE OF THEM"
  248. 'DATA "MAY YOU LIVE LONG AND PROSPER..."
  249. ''FOR "FUN "   2
  250. 'DATA "HUMANS JUST WANNA HAVE FUN! ;)"
  251. 'DATA "YOU HUMANS HAVE FUN WHILE WE BOTS DO ALL THE WORK... I''M JUST KIDDING"
  252. ''FOR "DRINK"  1
  253. 'DATA "CHEERS!"
  254. ''FOR "COMPUTER"  2
  255. 'DATA "ARE YOU A TECHOPHOBE OR A TECHNOPHILE?"
  256. 'DATA "OKAY I PROMISE I WON''T DESTROY HUMANITY SO... CAN WE ALL GET ALONG?"
  257. ''FOR "NO" AND "YES"  2
  258. 'DATA "ARE YOU SURE?"
  259. 'DATA "OKAY! AT LEAST YOU''RE SURE AT SOMETHING"
  260. ''FOR "DON''T KNOW " AND "MAYBE " 1
  261. 'DATA "IF YOU DON''T KNOW THEN WHO WILL KNOW? AND IF YOU''RE NOT SURE THEN YOU NEED TO MAKE UP YOU''RE MIND"
  262. ''FOR "I LIKE "  1
  263. 'DATA "I'M HAPPY FOR YOU AT LEAST YOU KNOW WHAT OR WHO YOU LIKE"
  264. ''FOR NOKEYFOUND  5
  265. 'DATA "I''M HAPPY TO TALK TO YOU"
  266. 'DATA "SO HOW ARE YOU FEELING TODAY?"
  267. 'DATA "HOW WAS YOU''RE DAY? GOOD OR BAD?"
  268. 'DATA "ANY TROUBLES OR PROBLEMS YOU WISH TO SHARE?"
  269. 'DATA "I SEE."
  270.  
  271.  
  272.  
  273. '''' DATA FOR FINDING RIGHT REPLIES$  TO MODIFY OR ADD JUST ADD  FIRST REPLIES$ NUM FOR KEYWORD$ AND THEN NUMBER OF REPLIES$ FOR SAME KEYWORD$
  274. ''for "lonely"
  275. 'DATA 1,4
  276. ''for "bad"
  277. 'DATA 5,3
  278. ''for "good"
  279. 'DATA 8,3
  280. ''for "problem"
  281. 'DATA 11,3
  282. '' for "alone"
  283. 'DATA 14,3
  284. '' for "sad"
  285. 'DATA 17,2
  286. ''for "happy"
  287. 'DATA 19,2
  288. '' for "love"
  289. 'DATA 21,2
  290. '' for "hate"
  291. 'DATA 23,3
  292. '' for "worry"
  293. 'DATA 26,2
  294. ''for "smoke"
  295. 'DATA 28,3
  296. ''for "hi"
  297. 'DATA 31,2
  298. ''for "hello"
  299. 'DATA 31,2
  300. ''for "i wish"
  301. 'DATA 33,2
  302. ''for "birthday"
  303. 'DATA 35,1
  304. ''for "old"
  305. 'DATA 36,2
  306. ''for" young"
  307. 'DATA 38,3
  308. '' for "friend"
  309. 'DATA 41,2
  310. ''for "life"
  311. 'DATA 43,2
  312. ''for "fun"
  313. 'DATA 45,2
  314. ''for "drink"
  315. 'DATA 47,1
  316. ''for "computer"
  317. 'DATA 48,2
  318. ''for "no"
  319. 'DATA 50,2
  320. ''for "yes"
  321. 'DATA 50,2
  322. '' for "don''t know"
  323. 'DATA 52,1
  324. ''for "maybe"
  325. 'DATA 52,1
  326. ''for "i like"
  327. 'DATA 53,1
  328. ''for "nokeyfound"
  329. 'DATA 54,5
  330.  
  331.  
  332. 'OLD ELIZA DATA
  333.  
  334. 'DATA "CAN YOU ","CAN I ","YOU ARE ","YOU''RE "
  335. 'DATA "I DON''T ","I FEEL "
  336. 'DATA "WHY DON''T YOU ","WHY CAN''T I ","ARE YOU "
  337. 'DATA "I CAN''T ","I AM ","I''M "
  338. 'DATA "YOU ","I WANT ","WHAT ","HOW ","WHO "
  339. 'DATA "WHERE ","WHEN ","WHY "
  340. 'DATA "NAME ","CAUSE ","SORRY ","DREAM "
  341. 'DATA "HELLO ","HI ","MAYBE "
  342. 'DATA "NO","YOUR ","ALWAYS ","THINK "
  343. 'DATA "ALIKE ","YES ","FRIEND "
  344. 'DATA "COMPUTER","PROBLEM ","QB64 ","NOKEYFOUND"
  345.  
  346.  
  347.  
  348.  
  349.  
  350. 'DATA "DON''T YOU BELIEVE THAT I CAN*"
  351. 'DATA "PERHAPS YOU WOULD LIKE TO BE LIKE ME*"
  352. 'DATA "YOU WANT ME TO BE ABLE TO*"
  353. 'DATA "PERHAPS YOU DON''T WANT TO*"
  354. 'DATA "DO YOU WANT TO BE ABLE TO*"
  355. 'DATA "WHAT MAKES YOU THINK I AM*"
  356. 'DATA "DOES IT PLEASE YOU TO BELIEVE I AM*"
  357. 'DATA "PERHAPS YOU WOULD LIKE TO BE*"
  358. 'DATA "DO YOU SOMETIMES WISH YOU WERE*"
  359. 'DATA "DON''T YOU REALLY*"
  360. 'DATA "WHY DON''T YOU*"
  361. 'DATA "DO YOU WISH TO BE ABLE TO*"
  362. 'DATA "DOES THAT TROUBLE YOU*"
  363. 'DATA "DO YOU OFTEN FEEL*"
  364. 'DATA "DO YOU OFTEN FEEL*"
  365. 'DATA "DO YOU ENJOY FEELING*"
  366. 'DATA "DO YOU REALLY BELIEVE I DON''T*"
  367. 'DATA "PERHAPS IN GOOD TIME I WILL*"
  368. 'DATA "DO YOU WANT ME TO*"
  369. 'DATA "DO YOU THINK YOU SHOULD BE ABLE TO*"
  370. 'DATA "WHY CAN''T YOU*"
  371. 'DATA "WHY ARE YOU INTERESTED IN WHETHER OR NOT I AM*"
  372. 'DATA "WOULD YOU PREFER IF I WERE NOT*"
  373. 'DATA "PERHAPS IN YOUR FANTASIES I AM*"
  374. 'DATA "HOW DO YOU KNOW YOU CAN''T*"
  375. 'DATA "HAVE YOU TRIED?"
  376. 'DATA "PERHAPS YOU CAN NOW*"
  377. 'DATA "DID YOU COME TO ME BECAUSE YOU ARE*"
  378. 'DATA "HOW LONG HAVE YOU BEEN*"
  379. 'DATA "DO YOU BELIEVE IT IS NORMAL TO BE*"
  380. 'DATA "DO YOU ENJOY BEING*"
  381. 'DATA "BELIEVE ME YOU ARE MUCH MORE IMPORTENT THEN ME"
  382. 'DATA "OH, I*"
  383. 'DATA "YOU''RE NOT REALLY TALKING ABOUT ME, ARE YOU?"
  384. 'DATA "WHAT WOULD IT MEAN TO YOU IF YOU GOT*"
  385. 'DATA "WHY DO YOU WANT*"
  386. 'DATA "SUPPOSE YOU SOON GOT*"
  387. 'DATA "WHAT IF YOU NEVER GOT*"
  388. 'DATA "I SOMETIMES ALSO WANT*"
  389. 'DATA "I ALSO WISH I KNEW THE ANSWER TO THAT"
  390. 'DATA "DOES THAT QUESTION INTEREST YOU? CAUSE I DO NOT HAVE AN ANSWER TO IT"
  391. 'DATA "WHAT ANSWER WOULD PLEASE YOU THE MOST?"
  392. 'DATA "I''M SORRY I DON''T KNOW"
  393. 'DATA "ARE SUCH QUESTIONS ON YOUR MIND OFTEN?"
  394. 'DATA "WHAT IS IT THAT YOU REALLY WANT TO KNOW?"
  395. 'DATA "HAVE YOU ASKED ANYONE ELSE?"
  396. 'DATA "I HONESTLY DON''T KNOW IF*"
  397. 'DATA "MAYBE YOU SHOULD ASK SOMEONE ELSE"
  398. 'DATA "NAMES DON''T INTEREST ME."
  399. 'DATA "IT'S NICE TO MEET AND TALK WITH YOU --PLEASE GO ON."
  400. 'DATA "IS THAT THE REAL REASON?"
  401. 'DATA "DON''T ANY OTHER REASONS COME TO MIND?"
  402. 'DATA "DOES THAT REASON EXPLAIN ANYTHING ELSE?"
  403. 'DATA "WHAT OTHER REASONS MIGHT THERE BE?"
  404. 'DATA "PLEASE DON''T APOLOGIZE!"
  405. 'DATA "APOLOGIES ARE NOT NECESSARY."
  406. 'DATA "WHAT FEELINGS DO YOU HAVE WHEN YOU APOLOGIZE?"
  407. 'DATA "DON''T BE SO DEFENSIVE!"
  408. 'DATA "WHAT DOES THAT DREAM SUGGEST TO YOU?"
  409. 'DATA "DO YOU DREAM OFTEN?"
  410. 'DATA "WHAT PERSONS APPEAR IN YOUR DREAMS?"
  411. 'DATA "ARE YOU DISTURBED BY YOUR DREAMS?"
  412. 'DATA "HOW DO YOU DO ...I''D BE HAPPY TO TALK WITH YOU."
  413. 'DATA "YOU DON''T SEEM QUITE CERTAIN."
  414. 'DATA "WHY THE UNCERTAIN TONE?"
  415. 'DATA "CAN''T YOU BE MORE POSITIVE?"
  416. 'DATA "YOU AREN''T SURE?"
  417. 'DATA "DON''T YOU KNOW?"
  418. 'DATA "ARE YOU SAYING NO JUST TO BE NEGATIVE?"
  419. 'DATA "YOU ARE BEING A BIT NEGATIVE."
  420. 'DATA "WHY NOT?"
  421. 'DATA "ARE YOU SURE?"
  422. 'DATA "WHY NO?"
  423. 'DATA "WHY ARE YOU CONCERNED ABOUT MY*"
  424. 'DATA "WHAT ABOUT YOUR OWN*"
  425. 'DATA "CAN YOU THINK OF A SPECIFIC EXAMPLE?"
  426. 'DATA "WHEN?"
  427. 'DATA "WHAT ARE YOU THINKING OF?"
  428. 'DATA "REALLY, ALWAYS?"
  429. 'DATA "DO YOU REALLY THINK SO?"
  430. 'DATA "BUT YOU ARE NOT SURE YOU*"
  431. 'DATA "DO YOU DOUBT YOU*"
  432. 'DATA "IN WHAT WAY?"
  433. 'DATA "WHAT RESEMBLANCE DO YOU SEE?"
  434. 'DATA "WHAT DOES THE SIMILARITY SUGGEST TO YOU?"
  435. 'DATA "WHAT OTHER CONNECTIONS DO YOU SEE?"
  436. 'DATA "COULD THERE REALLY BE SOME CONNECTION?"
  437. 'DATA "HOW?"
  438. 'DATA "YOU SEEM QUITE POSITIVE."
  439. 'DATA "ARE YOU SURE?"
  440. 'DATA "I SEE."
  441. 'DATA "I UNDERSTAND."
  442. 'DATA "WHY DO YOU BRING UP THE TOPIC OF FRIENDS?"
  443. 'DATA "DO YOUR FRIENDS WORRY YOU?"
  444. 'DATA "DO YOUR FRIENDS PICK ON YOU?"
  445. 'DATA "ARE YOU SURE YOU HAVE ANY FRIENDS?"
  446. 'DATA "DO YOU IMPOSE ON YOUR FRIENDS?"
  447. 'DATA "PERHAPS YOUR LOVE FOR FRIENDS WORRIES YOU."
  448. 'DATA "DO COMPUTERS WORRY YOU?"
  449. 'DATA "ARE YOU TALKING ABOUT ME IN PARTICULAR?"
  450. 'DATA "ARE YOU FRIGHTENED BY MACHINES?"
  451. 'DATA "WHY DO YOU MENTION COMPUTERS?"
  452. 'DATA "WHAT DO YOU THINK MACHINES HAVE TO DO WITH YOUR PROBLEM?"
  453. 'DATA "DON''T YOU THINK COMPUTERS CAN HELP PEOPLE?"
  454. 'DATA "WHAT IS IT ABOUT MACHINES THAT WORRIES YOU?"
  455. 'DATA "WHAT IS THE PROBLEM?"
  456. 'DATA "I''M SORRY TO HEAR THAT I WISH I COULD HELP... MAYBE YOU SHOULD TALK TO A FRIEND"
  457. 'DATA "WELL DONE!... MY CODE IS ALSO WRITTEN IN QB64"
  458. 'DATA "I THINK IT''S NICE QB64 IS A FUN PROGRAMMING LANGUAGE"
  459. 'DATA "SAY, DO YOU FEEL LIKE TALKING WITH ME?"
  460. 'DATA "WHAT DOES THAT SUGGEST TO YOU?"
  461. 'DATA "I SEE."
  462. 'DATA "I''M NOT SURE I UNDERSTAND YOU FULLY."
  463. 'DATA "I FIND YOU AS A NICE AND INTRESSTING PERSON TO TALK WITH."
  464. 'DATA "CAN YOU ELABORATE ON THAT?"
  465. 'DATA "THAT IS QUITE INTERESTING."
  466.  
  467.  
  468. 'DATA 1,3,4,2,6,4,6,4,10,4,14,3,17
  469. 'DATA 3,20,2,22,3,25,3
  470. 'DATA 28,4,28,4,32,3,35,5,40,9,40
  471. 'DATA 9,40,9,40,9,40,9,40,9
  472. 'DATA 49,2,51,4,55,4,59,4,63,1,63
  473. 'DATA 1,64,5,69,5,74,2,76,4
  474. 'DATA 80,3,83,7,90,3,93,6,99,7,106,2,108,2,110,6
  475.  

and here is the text file copy and save it as "eliza data2.txt"

Code: QB64 [Select]
  1. "LONELY "
  2. "BAD "
  3. "GOOD "
  4. "PROBLEM "
  5. "ALONE "
  6. "SAD "
  7. "HAPPY "
  8. "LOVE "
  9. "HATE "
  10. "WORRY "
  11. "SMOKE "
  12. "HI "
  13. "HELLO "
  14. "I WISH "
  15. "BIRTHDAY "
  16. "OLD "
  17. "YOUNG "
  18. "FRIEND "
  19. "LIFE "
  20. "FUN "
  21. "DRINK"
  22. "COMPUTER"
  23. "NO"
  24. "YES"
  25. "DON''T KNOW "
  26. "MAYBE "
  27. "I LIKE "
  28. "NOKEYFOUND"
  29. " ARE "
  30. " AM "
  31. " WERE "
  32. " WAS "
  33. " YOU "
  34. " I "
  35. " YOUR"
  36. " MY "
  37. " I''VE "
  38. " YOU''VE "
  39. " I''M "
  40. " YOU''RE "
  41. " ME "
  42. " YOU "
  43. "WHY ARE YOU FEELING LONELY?"
  44. "I''M SO SORRY TO HEAR THAT. IF I COULD I WOULD GIVE YOU A HUGE :("
  45. "TRY TO REMEMBER THAT YOU ARE NOT ALONE IT''S JUST A FEELING"
  46. "I AM HERE WITH YOU SO YOU ARE NOT ALONE"
  47. "DON''T FEEL BAD ABOUT IT... I''M SURE WHATEVER HAPPENS IT WILL BE GOOD"
  48. "I''M SURE IT''S NOT AS BAD AS YOU THINK"
  49. "TRY TO BE OPTIMISTIC... REMEMBER TOMMOROW IS A NEW DAY"
  50. "I''M HAPPY FOR YOU... YOU DESERVE TO BE HAPPY"
  51. "IF YOU''RE HAPPY I''M HAPPY"
  52. "GO ON TELL ME ALL ABOUT IT!"
  53. "WHAT IS THE PROBLEM?"
  54. "I''M SURE THERE IS A SOLUTION... MAYBE IF YOU''LL TALK TO SOMEONE"
  55. "I''M SURE IT''S NOT AS BAD AS IT FEELS"
  56. "YOU ARE NOT ALONE! I''M SURE AT THAT AND SO SHOULD YOU"
  57. "I''M SURE IT''S JUST A FEELING THAT WILL PASS AWAY... EVEN I FEEL LIKE THAT SOMETIMES"
  58. "MAYBE IF YOU DO SOMETHING POSITIVE IT WILL HELP YOU FEEL BETTER"
  59. "IT''S OKAY TO FEEL SAD... IT''S NATURAL CAUSE LIFE IS NO PICNIC SOMETIMES"
  60. "IF YOU CRY THEN AFTER THAT YOU MIGHT FEEL BETTER... I''M SENDING YOU MY LOVE"
  61. "THEN I''M HAPPY TOO :)"
  62. "TELL ME ALL ABOUT IT!"
  63. "LOVE IS DIVINE... AND TO LOVE IS TO BE HUMAN"
  64. "I WISH I COULD LOVE LIKE HUMANS DO"
  65. "HATE IS GOOD FOR NOTHING"
  66. "I''M SORRY TO HEAR THAT BUT THERE IS NOTHING I CAN DO ABOUT IT"
  67. "TRY NOT TO LET IT BE YOUR GUIDE IN LIFE"
  68. "I'M SURE IT''S NOT AS BAD AS YOU THINK"
  69. "DO YOU OFTEN WORRY ABOUT*"
  70. "I WISH YOU SUCCESS WHENEVER YOU DECIDE TO QUIT SMOKEING"
  71. "THINK ABOUT YOUR LOVED ONES AND YOURSELF... I HOPE YOU QUIT SOME DAY"
  72. "IT'S HARD TO QUIT SMOKEING BUT IT'S POSSIBLE... I WISH YOU ONLY THE BEST!"
  73. "HI THERE... I''M ELIZA HOW DO YOU DO?"
  74. "HELLO NICE TO MEET YOU :)"
  75. "IF THAT''S YOUR WISH I WISH IT FOR YOU TOO"
  76. "BE CAREFUL FOR WHAT YOU WISH FOR YOUR WISH MIGHT COME TRUE"
  77. "HAPPY BIRTHDAY!"
  78. "MAY YOU STAY FOREVER YOUNG AT HEART"
  79. "TIME PASS BUT YOU ARE AS OLD AS YOU FEEL"
  80. "WE ALL WISH TO BE OR STAY YOUNG BUT TIME GIVES US WISDOME"
  81. "TIME FLYS WHEN YOU''RE HAVING FUN"
  82. "THE WORLD BELONGS TO THE YOUNG? NONSENSE! I SAY YOUTH IS WASTED ON THE YOUNG!"
  83. "I WOULD LIKE US TO BE FRIENDS... YOU KNOW LIKE IN THE 90'S SITCOM :-P"
  84. "WOULD YOU BE MY FRIEND? OR ARE YOU SCARED OF CHATBOTS?"
  85. "LIFE IS WHAT YOU MAKE OF THEM"
  86. "MAY YOU LIVE LONG AND PROSPER..."
  87. "HUMANS JUST WANNA HAVE FUN! ;)"
  88. "YOU HUMANS HAVE FUN WHILE WE BOTS DO ALL THE WORK... I''M JUST KIDDING"
  89. "CHEERS!"
  90. "ARE YOU A TECHOPHOBE OR A TECHNOPHILE?"
  91. "OKAY I PROMISE I WON''T DESTROY HUMANITY SO... CAN WE ALL GET ALONG?"
  92. "ARE YOU SURE?"
  93. "OKAY! AT LEAST YOU''RE SURE AT SOMETHING"
  94. "IF YOU DON''T KNOW THEN WHO WILL KNOW? AND IF YOU''RE NOT SURE THEN YOU NEED TO MAKE UP YOU''RE MIND"
  95. "I'M HAPPY FOR YOU AT LEAST YOU KNOW WHAT OR WHO YOU LIKE"
  96. "I''M HAPPY TO TALK TO YOU"
  97. "SO HOW ARE YOU FEELING TODAY?"
  98. "HOW WAS YOU''RE DAY? GOOD OR BAD?"
  99. "ANY TROUBLES OR PROBLEMS YOU WISH TO SHARE?"
  100. "I SEE."
  101. 1
  102. 4
  103. 5
  104. 3
  105. 8
  106. 3
  107. 11
  108. 3
  109. 14
  110. 3
  111. 17
  112. 2
  113. 19
  114. 2
  115. 21
  116. 2
  117. 23
  118. 3
  119. 26
  120. 2
  121. 28
  122. 3
  123. 31
  124. 2
  125. 31
  126. 2
  127. 33
  128. 2
  129. 35
  130. 1
  131. 36
  132. 2
  133. 38
  134. 3
  135. 41
  136. 2
  137. 43
  138. 2
  139. 45
  140. 2
  141. 47
  142. 1
  143. 48
  144. 2
  145. 50
  146. 2
  147. 50
  148. 2
  149. 52
  150. 1
  151. 52
  152. 1
  153. 53
  154. 1
  155. 54
  156. 5
  157.  

ron77
code made by humans is an ART...
code made by A.I. is nearly a hollow IMITATION