Older Version Newer Version

bluatigro bluatigro Apr 4, 2010

''this stop when no answer is fount why ? DIM a$( 20 ) , b$( 20 ) , zin$( 50 , 3 ) CLS PRINT "Blua Tigro" PRINT "presents :" PRINT "Dr. Eliza ." PRINT "A.I. simulation of a psychiatrist ." print "[ type without .,!?;: ]" maxwoord = 1 WHILE a$( maxwoord - 1 ) <> "=" 'spiegeldata inlezen ''read mirror data READ a$ , b$ a$( maxwoord ) = a$ b$( maxwoord ) = b$ maxwoord = maxwoord + 1 WEND maxzin = 1 WHILE zin$( maxzin - 1 , 0 ) <> "=" 'sleutels en reactie zinnen inlezen ''read keys and reaction FOR t = 0 TO 3 READ z$ zin$( maxzin , t ) = z$ NEXT t maxzin = maxzin + 1 WEND zin$ = "qq" PRINT "Dokter Eliza is there ." while zin$ <> "" INPUT zin$ z$ = zin$ a = 0 zin$ = Lower$( zin$ + " " ) FOR t = 1 TO maxzin - 1 'alle sleutels langslopen 'loop al keys IF INSTR( zin$ , zin$( t, 0 ) ) <> 0 THEN 'sleutel gevonden ? 'key fount ? antwoord$ = zin$( t , INT( RND * 2.99 + 1 ) ) a = t END IF NEXT t IF a = 0 THEN 'geen sleutel gevonden ? 'no key fount ? IF mijn$ = "" THEN 'geen vorig bezit ? 'no item stored ? t = 1 while word$( zin , t ) <> "" t = t + 1 wend IF word$( zin$ , t - 1 ) = "mijn" THEN 'bezit in zin ? 'item in sentence ? mijn$ = word$( zin$ , t ) 'sla bezit op END IF SELECT CASE INT(RND * 4) 'reageer als niets is gevonden 'react when nothing fount CASE IS = 0 PRINT "can you tel me more ?" CASE IS = 1 PRINT "that is verry intresting ." CASE IS = 2 PRINT "plaese eleborate on that ." CASE IS = 3 PRINT "that is not seldom ." END SELECT ELSE 'reageer op laatste bezit en vergeet bezit 'react on last item and forget last item PRINT "Before you told me about your "; mijn$ ; " ." PRINT "Can you tel me more about your "; mijn$ ; " ?" mijn$ = "" END IF else IF RIGHT$( antwoord$ , 1 ) = "=" THEN 'reactiezin heeft aanhangsel 'reaction has mirror-part antwoord$ = LEFT$( antwoord$ , LEN( antwoord$ ) - 1 ) 'verwijder sleutel van zin 'remove key from sentence zin$ = RIGHT$( zin$ , LEN( zin$ ) - LEN( zin$( a , 0 ) ) ) PRINT antwoord$; 'plak spiegel worden achter reactiezin 'te gebruiken voor vertaler 'paste mirror after reaction 'can be used for translator t = 1 while word$( zin$ , t ) <> "" 'alle woorden uit zin 'al words out sentence qq = 0 FOR e = 0 TO maxwoord IF word$( zin$ , t ) = a$( e ) THEN 'is woord een spiegelwoord ? 'is word a mirror-word ? PRINT b$( e ) + " "; qq = 1 END IF NEXT e IF qq = 0 THEN PRINT word$( zin$ , t ) + " "; t = t + 1 wend PRINT "?" ELSE PRINT antwoord$ END IF end if wend print "Bey bey ." END ' mirror-data 'het is zeer warschijnlijk 'dat ik hier wat vergeten ben 'aub uitbreiden . 'it is posible that i forgot 'somthing here 'please expand DATA "i" , "you" , "you" , "i" DATA "mine","your","your","mine" DATA "am","are","are","am" DATA "=","=" ' sleutel en zinnen data ' key and reaction data 'dit is het interesantste gedeelte 'this is the most intresting part 'en voor uitbreidig en verbetering vatbaar 'and must be expand en inproved 'een sleutel bestaat uit een of meer woorden 'a key exist out one or two words 'en heeft 3 reactie zinnen . 'and has 3 reaction sentences . 'als je de reactie zin met = laat eindigen 'if you end the sentence with a = 'plakt het progamma het 'the program wil paste 'gespiegelde gedeelte erachter 'the mirrored part behind it 'dan moet de sleutel wel in t begin 'then the key must be at the beginining 'van de zin staan 'of the sentence DATA "naturly" DATA "Are you always so sure ?" DATA "Do you know for sure ?" DATA "You are verry sure ." DATA "computers" DATA "Do you meen me too ?" DATA "Do you have that more with computers ?" DATA "All computers ?" DATA "i have" DATA "Why you have =" DATA "Howlong you have =" DATA "Do you often have =" DATA "i am" DATA "Are you often =" DATA "Why you are =" DATA "Howlong you are =" DATA "i wish that" DATA "Does it make a difference if =" DATA "Why you wish that =" DATA "Wish you often that =" DATA "i think that" DATA "Do you doubt that =" DATA "Think you often that =" DATA "Why you think that =" DATA "i want" DATA "Why you want =" DATA "Do you often want =" DATA "Howlong do you want =" DATA "i hate" DATA "Do you often hate =" DATA "Why you hate =" DATA "When you hate =" DATA "i love" DATA "Do you muth love =" DATA "Why you love =" DATA "Do you often love =" DATA "=","=","=","="