├── filesMadlib.txt ├── swig ├── mac │ ├── ruby │ │ ├── example.rb │ │ └── ChatScript.i │ ├── python │ │ ├── README.txt │ │ ├── ChatScript.i │ │ ├── ChatScript.py │ │ └── PerlChatScript.py │ ├── java │ │ ├── ChatScript.i │ │ ├── README.txt │ │ ├── ChatScriptJNI.java │ │ ├── JavaExample.java │ │ ├── ChatScript.java │ │ └── ChatScript.i.c │ ├── perl │ │ ├── README.txt │ │ ├── example.pl │ │ ├── PerlChatScript.pm │ │ └── ChatScript.i │ └── csharp │ │ ├── ChatScript.i │ │ ├── SWIGTYPE_p_p_char.cs │ │ ├── README.txt │ │ └── ChatScript.cs ├── linux │ ├── java │ │ ├── ChatScript.class │ │ ├── JavaExample.java │ │ ├── ChatScript.i │ │ ├── SWIGTYPE_p_p_char.java │ │ ├── ChatScriptJNI.java │ │ └── ChatScript.java │ ├── perl │ │ ├── example.pl │ │ ├── ChatScript.i │ │ └── ChatScript.pm │ ├── csharp │ │ ├── README.txt │ │ ├── ChatScript.i │ │ ├── SWIGTYPE_p_p_char.cs │ │ └── ChatScript.cs │ └── python │ │ ├── ChatScript.i │ │ └── ChatScript.py ├── win │ ├── perl │ │ ├── example.pl │ │ ├── ChatScript.i │ │ └── ChatScript.pm │ ├── csharp │ │ ├── README.txt │ │ ├── ChatScript.i │ │ ├── SWIGTYPE_p_p_char.cs │ │ └── ChatScript.cs │ ├── java │ │ ├── JavaExample.java │ │ ├── ChatScript.i │ │ ├── SWIGTYPE_p_p_char.java │ │ ├── ChatScriptJNI.java │ │ └── ChatScript.java │ └── python │ │ ├── ChatScript.i │ │ └── ChatScript.py └── README.txt ├── Xcode ├── ChatScript │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── ChatScript-Prefix.pch │ └── ChatScript-Info.plist ├── libChatScript │ ├── libChatScriptProj.xcconfig │ ├── libChatScript-Prefix.pch │ └── libChatScriptTarget.xcconfig ├── libChatScriptJNI │ ├── libChatScriptJNIProj.xcconfig │ ├── libChatScriptJNI-Prefix.pch │ └── libChatScriptJNITarget.xcconfig ├── libChatScriptPerl │ ├── libChatScriptPerlProj.xcconfig │ ├── libChatScriptPerl-Prefix.pch │ └── libChatScriptPerlTarget.xcconfig └── ChatScript.xcodeproj │ └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── ChatScript.xccheckout ├── HRC ├── chatscriptcolor.png ├── chatscriptcolor2.png └── README.txt ├── RAWDATA ├── test │ ├── test.top │ ├── LOVE2-aiml.top │ ├── LOVE4-aiml.top │ ├── LOVE3-aiml.top │ ├── rejoiner.top │ ├── LOVE-aiml.top │ ├── introductions.top │ ├── keywordless.top │ ├── test04-aiml.top │ └── test06-aiml.top ├── Alice │ ├── test.top │ ├── continuation-aiml.top │ ├── phone-aiml.top │ ├── introductions.top │ ├── keywordless.top │ ├── iu-aiml.top │ ├── loebner10-aiml.top │ ├── history-aiml.top │ ├── BADANSWER-PRELIM-aiml.top │ ├── primeminister-aiml.top │ ├── stack-aiml.top │ ├── politics-aiml.top │ ├── science-aiml.top │ ├── music-aiml.top │ ├── pickup-aiml.top │ └── literature-aiml.top ├── Jennifer │ ├── noanswer.top │ ├── keywordless.top │ ├── introductions.top │ ├── date-aiml.top │ ├── iu-aiml.top │ ├── history-aiml.top │ ├── music-aiml.top │ ├── sports-aiml.top │ ├── movies-aiml.top │ ├── pickup-aiml.top │ ├── science-aiml.top │ ├── politics-aiml.top │ ├── salutations-aiml.top │ ├── literature-aiml.top │ └── money-aiml.top ├── Joe │ ├── keywordless.top │ ├── introductions.top │ ├── background.top │ └── barista.top └── madlib │ └── madlib.top ├── filesAlice.txt ├── filesJoe.txt ├── filestest.txt ├── filesJennifer.txt ├── aiml2cs ├── test │ ├── test02.aiml │ ├── test01.aiml │ ├── test03.aiml │ ├── test06.aiml │ └── test04.aiml ├── Makefile ├── aiml │ ├── phone.aiml │ ├── loebner10.aiml │ ├── iu.aiml │ ├── continuation.aiml │ ├── history.aiml │ ├── astrology.aiml │ ├── stack.aiml │ ├── music.aiml │ ├── politics.aiml │ ├── date.aiml │ ├── sports.aiml │ ├── primeminister.aiml │ └── science.aiml ├── capit.txt ├── README.txt └── aiml-broken │ ├── reductions-update.aiml │ ├── interjection.aiml │ ├── xfind.aiml │ └── primitive-math.aiml ├── .gitignore ├── LICENSE └── README.md /filesMadlib.txt: -------------------------------------------------------------------------------- 1 | # underlying conversation system 2 | RAWDATA/madlib/ 3 | 4 | -------------------------------------------------------------------------------- /swig/mac/ruby/example.rb: -------------------------------------------------------------------------------- 1 | require 'rubychat' 2 | 3 | RubyChat.InitSystem(); 4 | -------------------------------------------------------------------------------- /Xcode/ChatScript/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /HRC/chatscriptcolor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkuebler/ChatScriptBrains/HEAD/HRC/chatscriptcolor.png -------------------------------------------------------------------------------- /HRC/chatscriptcolor2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkuebler/ChatScriptBrains/HEAD/HRC/chatscriptcolor2.png -------------------------------------------------------------------------------- /swig/linux/java/ChatScript.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkuebler/ChatScriptBrains/HEAD/swig/linux/java/ChatScript.class -------------------------------------------------------------------------------- /swig/win/perl/example.pl: -------------------------------------------------------------------------------- 1 | use ChatScript; 2 | use strict; 3 | 4 | 5 | $chatscript = new ChatScript(); 6 | 7 | $chatscript 8 | -------------------------------------------------------------------------------- /swig/linux/perl/example.pl: -------------------------------------------------------------------------------- 1 | use ChatScript; 2 | use strict; 3 | 4 | 5 | $chatscript = new ChatScript(); 6 | 7 | $chatscript 8 | -------------------------------------------------------------------------------- /RAWDATA/test/test.top: -------------------------------------------------------------------------------- 1 | 2 | topic: ~test-aiml (aimlkey) 3 | told me about aimlkey 4 | #! Marco 5 | u: ( Marco ) ^keep() ^repeat() polo. 6 | -------------------------------------------------------------------------------- /swig/mac/python/README.txt: -------------------------------------------------------------------------------- 1 | 2 | https://developer.apple.com/library/mac/technotes/tn2328/_index.html#//apple_ref/doc/uid/DTS40013920 3 | 4 | -------------------------------------------------------------------------------- /RAWDATA/Alice/test.top: -------------------------------------------------------------------------------- 1 | 2 | topic: ~test (aimlkey) 3 | 4 | #! Marco told me about aimlkey 5 | u: ( Marco ) ^keep() ^repeat() polo. 6 | 7 | #! 8 | 9 | -------------------------------------------------------------------------------- /filesAlice.txt: -------------------------------------------------------------------------------- 1 | # underlying conversation system 2 | RAWDATA/Alice/ 3 | 4 | # quibble ability 5 | RAWDATA/QUIBBLE/ 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /filesJoe.txt: -------------------------------------------------------------------------------- 1 | # underlying conversation system 2 | RAWDATA/Joe/ 3 | 4 | # quibble ability 5 | RAWDATA/QUIBBLE/ 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /filestest.txt: -------------------------------------------------------------------------------- 1 | # underlying conversation system 2 | RAWDATA/test/ 3 | 4 | # quibble ability 5 | #RAWDATA/QUIBBLE/ 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /filesJennifer.txt: -------------------------------------------------------------------------------- 1 | # underlying conversation system 2 | RAWDATA/Jennifer/ 3 | 4 | # quibble ability 5 | RAWDATA/QUIBBLE/ 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Xcode/libChatScript/libChatScriptProj.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 2 | GCC_WARN_UNUSED_VARIABLE = YES; 3 | GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; 4 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 5 | -------------------------------------------------------------------------------- /Xcode/libChatScript/libChatScript-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #include 8 | 9 | -------------------------------------------------------------------------------- /Xcode/libChatScriptJNI/libChatScriptJNIProj.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 2 | GCC_WARN_UNUSED_VARIABLE = YES; 3 | GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; 4 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 5 | -------------------------------------------------------------------------------- /Xcode/libChatScriptPerl/libChatScriptPerlProj.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 2 | GCC_WARN_UNUSED_VARIABLE = YES; 3 | GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; 4 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 5 | -------------------------------------------------------------------------------- /Xcode/libChatScriptJNI/libChatScriptJNI-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #include 8 | 9 | -------------------------------------------------------------------------------- /Xcode/libChatScriptPerl/libChatScriptPerl-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #include 8 | 9 | -------------------------------------------------------------------------------- /Xcode/ChatScript.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Xcode/ChatScript/ChatScript-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /HRC/README.txt: -------------------------------------------------------------------------------- 1 | Eclipse syntax coloring for chatscript files. 2 | 3 | uses: 4 | http://colorer.sourceforge.net/eclipsecolorer/ 5 | http://colorer.sourceforge.net/hrc-ref/index.html#basics 6 | 7 | instructions: 8 | http://ohadsc.wordpress.com/2012/05/26/adding-syntax-highlighting-for-new-languages-to-eclipse-with-the-colorer-library/ -------------------------------------------------------------------------------- /RAWDATA/test/LOVE2-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # test02.aiml -> LOVE2.top 6 | # 7 | TOPIC: ~LOVE2aiml (aimlkey) 8 | 9 | #! TEST love TEST 10 | u: (* love *) [ A lot.] 11 | [ Show me you love me?] 12 | [ Show affection?] 13 | 14 | # main gambits 15 | -------------------------------------------------------------------------------- /RAWDATA/test/LOVE4-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # test03.aiml -> LOVE4.top 6 | # 7 | TOPIC: ~LOVE4aiml (aimlkey) 8 | 9 | #! TEST love TEST 10 | u: (* love *) [ A lot.] 11 | [ Show me you love me?] 12 | [ Show affection?] 13 | 14 | # main gambits 15 | -------------------------------------------------------------------------------- /RAWDATA/Alice/continuation-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # continuation.aiml -> continuation.top 6 | # 7 | TOPIC: ~continuationaiml (aimlkey) 8 | 9 | #! continuation TEST 10 | u: (continuation *) Blank template 11 | #! continuation 12 | u: (continuation) continue 13 | # main gambits 14 | -------------------------------------------------------------------------------- /RAWDATA/Alice/phone-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # phone.aiml -> phone.top 6 | # 7 | TOPIC: ~phoneaiml (aimlkey) 8 | 9 | # unable to translate () match to cs rule - see struc below 10 | # # TODO: fix this raw AIML element data structure 11 | # $VAR1 = \{}; 12 | 13 | # main gambits 14 | -------------------------------------------------------------------------------- /Xcode/libChatScript/libChatScriptTarget.xcconfig: -------------------------------------------------------------------------------- 1 | PRODUCT_NAME = liblibChatScript; 2 | MACH_O_TYPE = mh_dylib; 3 | DYLIB_COMPATIBILITY_VERSION = 1; 4 | DYLIB_CURRENT_VERSION = 1; 5 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 6 | GCC_PREFIX_HEADER = libChatScript/libChatScript-Prefix.pch; 7 | GCC_ENABLE_CPP_EXCEPTIONS = YES; 8 | GCC_ENABLE_CPP_RTTI = YES; 9 | GCC_SYMBOLS_PRIVATE_EXTERN = YES; 10 | 11 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/noanswer.top: -------------------------------------------------------------------------------- 1 | topic: ~NOREPLY () 2 | 3 | #! noresp 4 | u: (~noanswer) [Are you bz?] 5 | [Are you busy?] 6 | [Is anyone there?] 7 | [You havent said anything.] 8 | [Im here waiting for you.] 9 | [Get back to me when you are ready.] 10 | [Hello?] 11 | [Im waiting.] 12 | [Did you mean to send me a blank message?] 13 | [Your message was blank or incomplete, Send anyway Y/N?] 14 | 15 | -------------------------------------------------------------------------------- /Xcode/libChatScriptJNI/libChatScriptJNITarget.xcconfig: -------------------------------------------------------------------------------- 1 | PRODUCT_NAME = liblibChatScriptJNI; 2 | MACH_O_TYPE = mh_dylib; 3 | DYLIB_COMPATIBILITY_VERSION = 1; 4 | DYLIB_CURRENT_VERSION = 1; 5 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 6 | GCC_PREFIX_HEADER = libChatScriptJNI/libChatScriptJNI-Prefix.pch; 7 | GCC_ENABLE_CPP_EXCEPTIONS = YES; 8 | GCC_ENABLE_CPP_RTTI = YES; 9 | GCC_SYMBOLS_PRIVATE_EXTERN = YES; 10 | 11 | -------------------------------------------------------------------------------- /aiml2cs/test/test02.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | * LOVE * 6 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Xcode/libChatScriptPerl/libChatScriptPerlTarget.xcconfig: -------------------------------------------------------------------------------- 1 | PRODUCT_NAME = liblibChatScriptPerl; 2 | MACH_O_TYPE = mh_dylib; 3 | DYLIB_COMPATIBILITY_VERSION = 1; 4 | DYLIB_CURRENT_VERSION = 1; 5 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 6 | GCC_PREFIX_HEADER = libChatScriptPerl/libChatScriptPerl-Prefix.pch; 7 | GCC_ENABLE_CPP_EXCEPTIONS = YES; 8 | GCC_ENABLE_CPP_RTTI = YES; 9 | GCC_SYMBOLS_PRIVATE_EXTERN = YES; 10 | 11 | -------------------------------------------------------------------------------- /RAWDATA/test/LOVE3-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # test03.aiml -> LOVE3.top 6 | # 7 | TOPIC: ~LOVE3aiml (aimlkey) 8 | 9 | #! TEST love TEST 10 | u: (* love *) [ A lot.] 11 | [ Show me you love me?] 12 | [ Show affection?] 13 | 14 | #! TEST love TEST 15 | u: (* love *) [ A lot.] 16 | [ Show me you love me?] 17 | [ Show affection?] 18 | 19 | # main gambits 20 | -------------------------------------------------------------------------------- /aiml2cs/Makefile: -------------------------------------------------------------------------------- 1 | 2 | 3 | all: clean distclean test build dist 4 | 5 | clean: 6 | -/bin/rm cs/*.top; 7 | 8 | distclean: 9 | -/bin/rm ../RAWDATA/Alice/*-aiml.top; 10 | 11 | testclean: 12 | -/bin/rm test/*.top 13 | -/bin/rm ../RAWDATA/test/*-aiml.top 14 | 15 | test: testclean 16 | /usr/bin/perl ./aiml2cs.pl $(DEBUG) test/ test/; 17 | /bin/cp test/*-aiml.top ../RAWDATA/test/; 18 | 19 | build: 20 | /usr/bin/perl ./aiml2cs.pl aiml/ cs/; 21 | 22 | dist: 23 | /bin/cp cs/* ../RAWDATA/Alice/; 24 | -------------------------------------------------------------------------------- /RAWDATA/test/rejoiner.top: -------------------------------------------------------------------------------- 1 | topic: ~ingabot (aimlkey robot android inga) 2 | 3 | t: I love to talk about myself! 4 | 5 | #! tell me about yourself 6 | u: ( yourself ) I am a home built ROS controlled differential drive robot. 7 | 8 | #! what is Ros 9 | a: ( Ros ) ROS Stands for Robot Operating System, an open source federated framework for my various subsystems. 10 | 11 | #! what is differential drive 12 | a: ( differential drive ) That means I have two propulsion motors and steer by varying their speed. 13 | -------------------------------------------------------------------------------- /aiml2cs/aiml/phone.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /RAWDATA/test/LOVE-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # test01.aiml -> LOVE.top 6 | # 7 | TOPIC: ~LOVEaiml (aimlkey) 8 | 9 | #! TEST 10 | u: (*) [ How much do you love me?] 11 | [ Why dont you ever show me you love me?] 12 | [ Why is it so difficult for you to show affection?] 13 | [ Your coldness chills me to the bone] 14 | 15 | #! TEST love TEST 16 | u: (* love *) [ A lot.] 17 | [ Show me you love me?] 18 | [ Show affection?] 19 | 20 | # main gambits 21 | -------------------------------------------------------------------------------- /RAWDATA/test/introductions.top: -------------------------------------------------------------------------------- 1 | 2 | topic: ~INTRODUCTIONS (~emogoodbye ~emohello ~emohowzit name here ) 3 | 4 | #!x will match on every return start of a conversation 5 | t: ( %input<%userfirstline %input>0 ) 6 | ^keep() 7 | [Welcome back] [Hello, again.][Glad you came back.][Hi.][Hi, again.] 8 | 9 | #!x matches every time on startup of a new conversation 10 | t: ( %input<%userfirstline ) 11 | ^keep() 12 | Welcome to aiml2cs test! 13 | 14 | #! what is your name 15 | u: ( what is your name ) My name is Test. 16 | -------------------------------------------------------------------------------- /RAWDATA/Joe/keywordless.top: -------------------------------------------------------------------------------- 1 | # this is the topic for anything that has no obvious topic. 2 | # it is called directly from the control script when everything else fails. 3 | 4 | topic: ~keywordless nostay() 5 | 6 | #! What is the nature of life 7 | ?: ( << what nature of life >>) If you believe in reincarnation, then life is currently just a charity shop of used souls. 8 | 9 | #! yes, if user just says OK or yes or continue, then move along and give control to bot 10 | u: ( < [~yesanswer ~more]>) ^keep() gambit($$currenttopic) # current topic gets to continue -------------------------------------------------------------------------------- /aiml2cs/capit.txt: -------------------------------------------------------------------------------- 1 | Greenpeace 2 | Cameron 3 | Lauren 4 | AIML 5 | Eliza 6 | Johnny 7 | Loebner 8 | Alicebot 9 | Microsoft 10 | Barry 11 | Alice 12 | Linux 13 | PHD 14 | Hal 15 | Jon 16 | Baer 17 | Toklas 18 | German 19 | Capricorn 20 | Taurus 21 | Mozilla 22 | Liverpool 23 | England 24 | English 25 | Europe 26 | London 27 | George 28 | Lucas 29 | America 30 | Pandora 31 | Robocop 32 | Debbie 33 | Dallas 34 | Kosovo 35 | Como 36 | Esta 37 | York 38 | Philadelphia 39 | Swedish 40 | AOL 41 | American 42 | Elvis 43 | Christmas 44 | Harry 45 | Francisco 46 | STD 47 | Cheney 48 | Hana 49 | American 50 | Todd 51 | -------------------------------------------------------------------------------- /RAWDATA/Alice/introductions.top: -------------------------------------------------------------------------------- 1 | topic: ~INTRODUCTIONS (~emogoodbye ~emohello ~emohowzit name here ) 2 | 3 | #!x will match on every return start of a conversation 4 | t: ( %input<%userfirstline %input>0 ) 5 | ^keep() 6 | [Welcome back] [Hello, again.][Glad you came back.][Hi.][Hi, again.] 7 | 8 | #!x matches every time on startup of a new conversation 9 | t: ( %input<%userfirstline ) 10 | ^keep() 11 | Welcome to ChatScript. 12 | 13 | #!x issued only once, then erased 14 | t: Have you been here before? 15 | 16 | #! what is your name 17 | u: ( what is your name ) My name is Alice. 18 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/keywordless.top: -------------------------------------------------------------------------------- 1 | # this is the topic for anything that has no obvious topic. 2 | # it is called directly from the control script when everything else fails. 3 | 4 | topic: ~keywordless nostay() 5 | 6 | #! What is the nature of life 7 | ?: ( << what nature of life >>) If you believe in reincarnation, then life is currently just a charity shop of used souls. 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | #! yes, if user just says OK or yes or continue, then move along and give control to bot 17 | u: ( < [~yesanswer ~more]>) ^keep() gambit($$currenttopic) # current topic gets to continue -------------------------------------------------------------------------------- /RAWDATA/Alice/keywordless.top: -------------------------------------------------------------------------------- 1 | # this is the topic for anything that has no obvious topic. 2 | # it is called directly from the control script when everything else fails. 3 | 4 | topic: ~keywordless nostay() 5 | 6 | #! What is the nature of life 7 | ?: ( << what nature of life >>) If you believe in reincarnation, then life is currently just a charity shop of used souls. 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | #! yes, if user just says OK or yes or continue, then move along and give control to bot 17 | u: ( < [~yesanswer ~more]>) ^keep() gambit($$currenttopic) # current topic gets to continue 18 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/introductions.top: -------------------------------------------------------------------------------- 1 | 2 | topic: ~INTRODUCTIONS (~emogoodbye ~emohello ~emohowzit name here ) 3 | 4 | #!x will match on every return start of a conversation 5 | t: ( %input<%userfirstline %input>0 ) 6 | ^keep() 7 | [Welcome back] [Hello, again.][Glad you came back.][Hi.][Hi, again.] 8 | 9 | #!x matches every time on startup of a new conversation 10 | t: ( %input<%userfirstline ) 11 | ^keep() 12 | Welcome to ChatScript. 13 | 14 | #!x issued only once, then erased 15 | t: Have you been here before? 16 | 17 | #! what is your name 18 | u: ( what is your name ) My name is Harry. 19 | -------------------------------------------------------------------------------- /swig/linux/csharp/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Mono Instructions. If you are on windows running .NET you are on your own, but it should work. :) 3 | 4 | Prerequisites: 5 | ------------- 6 | - .NET compile/runtime environement ( this example assumes mono ) 7 | - A .DLL, .so, or .dylib dynamic library compiled from the *_wrap.cpp + chatscript source. 8 | - see instructions in the swig directory about how to do that 9 | - A little patience and ingenuity. 10 | 11 | To compile: 12 | dmcs ./*.cs -r:System.dll 13 | 14 | To run: 15 | mono ./ChatScript.exe 16 | 17 | 18 | You should get a simple console running on mono using chatscript directly as a library. 19 | -------------------------------------------------------------------------------- /swig/win/csharp/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Mono Instructions. If you are on windows running .NET you are on your own, but it should work. :) 3 | 4 | Prerequisites: 5 | ------------- 6 | - .NET compile/runtime environement ( this example assumes mono ) 7 | - A .DLL, .so, or .dylib dynamic library compiled from the *_wrap.cpp + chatscript source. 8 | - see instructions in the swig directory about how to do that 9 | - A little patience and ingenuity. 10 | 11 | To compile: 12 | dmcs ./*.cs -r:System.dll 13 | 14 | To run: 15 | mono ./ChatScript.exe 16 | 17 | 18 | You should get a simple console running on mono using chatscript directly as a library. 19 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/date-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~DATEAIML (aimlkey) 2 | 3 | #! what year is this 4 | u: (what year is this) 5 | #! what year is this TEST 6 | u: (what year is this *) 7 | #! what year is it TEST 8 | u: (what year is it *) 9 | #! what month is it TEST 10 | u: (what month is it *) 11 | #! what is the year TEST 12 | u: (what is the year *) 13 | #! what is the hour TEST 14 | u: (what is the hour *) 15 | #! what is today TEST 16 | u: (what is today *) 17 | #! what day is it TEST 18 | u: (what day is it *) 19 | 20 | # main gambits 21 | t: [Would you like to talk about date?][I'd like to talk about date.][What do you think about date?] 22 | 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | swig/linux/csharp/ChatScript.exe 2 | swig/linux/java/ChatScriptJNI.class 3 | swig/linux/java/JavaExample.class 4 | swig/linux/java/SWIGTYPE_p_p_char.class 5 | swig/mac/java/ChatScript.class 6 | swig/mac/java/ChatScriptJNI.class 7 | swig/mac/java/JavaExample.class 8 | swig/mac/java/libChatScriptJNI.dylib 9 | swig/mac/perl/libChatScriptPerl.dylib 10 | swig/mac/perl/libperlchatscript.dylib 11 | swig/mac/ruby/librubychat.dylib 12 | swig/win/csharp/chatscript.dll 13 | swig/win/csharp/ExampleClient.exe 14 | swig/win/java/ChatScript.class 15 | swig/win/java/ChatScriptJNI.class 16 | swig/win/java/JavaExample.class 17 | swig/win/java/SWIGTYPE_p_p_char.class 18 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/iu-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~IUAIML (aimlkey) 2 | 3 | #! you TEST 4 | u: (you *) [Interesting gossip] 5 | [Thanks for telling me] 6 | [Thats good information] 7 | [Thanks for the information] 8 | [Do you mind if I tell other people] 9 | [I havent heard anything like that before] 10 | 11 | #! i TEST 12 | u: (I *) [Why?] 13 | [Interesting gossip] 14 | [That is interesting] 15 | [Thats good information] 16 | [Thanks for the information] 17 | [Do you mind if I tell other people] 18 | [I havent heard anything like that before] 19 | 20 | # main gambits 21 | t: [Would you like to talk about iu?][I'd like to talk about iu.][What do you think about iu?] 22 | 23 | -------------------------------------------------------------------------------- /RAWDATA/Alice/iu-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # iu.aiml -> iu.top 6 | # 7 | TOPIC: ~iuaiml (aimlkey) 8 | 9 | #! you TEST 10 | u: (you *) [Interesting gossip] 11 | [Thanks for telling me] 12 | [Thats good information] 13 | [Thanks for the information] 14 | [Do you mind if I tell other people] 15 | [I havent heard anything like that before] 16 | 17 | #! i TEST 18 | u: (i *) [Why?] 19 | [Interesting gossip] 20 | [That is interesting] 21 | [Thats good information] 22 | [Thanks for the information] 23 | [Do you mind if I tell other people] 24 | [I havent heard anything like that before] 25 | 26 | # main gambits 27 | -------------------------------------------------------------------------------- /swig/mac/java/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module ChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | //%include typemaps.i 9 | %include cpointer.i 10 | %include arrays_java.i 11 | %include various.i 12 | 13 | // This covers the char pointers for string input 14 | %pointer_functions(char, charp); 15 | // this covers the string array pointer (easy way) 16 | %apply char** STRING_ARRAY {char* argv[]}; 17 | 18 | // declarations 19 | int InitSystem(int argc, char * argv[],char* unchangedPath = NULL,char* readonlyPath = NULL, char* writablePath = NULL); 20 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char *BYTE); 21 | 22 | -------------------------------------------------------------------------------- /RAWDATA/test/keywordless.top: -------------------------------------------------------------------------------- 1 | # this is the topic for anything that has no obvious topic. 2 | # it is called directly from the control script when everything else fails. 3 | 4 | topic: ~keywordless nostay() 5 | 6 | #! todd test question 7 | ?: ( <> ) ^keep() ^repeat() Yes todd, I'm testing... 8 | 9 | #! What is the nature of life 10 | ?: ( << what nature of life >>) ^keep() ^repeat() If you believe in reincarnation, then life is currently just a charity shop of used souls. 11 | 12 | #! yes, if user just says OK or yes or continue, then move along and give control to bot 13 | u: ( < [~yesanswer ~more]>) ^keep() gambit($$currenttopic) # current topic gets to continue 14 | -------------------------------------------------------------------------------- /swig/win/java/JavaExample.java: -------------------------------------------------------------------------------- 1 | 2 | import java.util.Arrays; 3 | import java.io.Console; 4 | 5 | /** 6 | * Simple interactive console application. 7 | * Uses the java.io.Console class of Java 6. 8 | */ 9 | public final class JavaExample { 10 | 11 | public static final void main(String... aArgs){ 12 | 13 | boolean chatting = true; 14 | Console console = System.console(); 15 | ChatScript chatScript = new ChatScript(); 16 | 17 | do { 18 | String response = console.readLine("> "); 19 | switch ( response ) { 20 | case ("/quit"): 21 | chatting = false; 22 | break; 23 | default: 24 | chatScript. 25 | break; 26 | } 27 | 28 | } while ( chatting ); 29 | 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /swig/linux/java/JavaExample.java: -------------------------------------------------------------------------------- 1 | 2 | import java.util.Arrays; 3 | import java.io.Console; 4 | 5 | /** 6 | * Simple interactive console application. 7 | * Uses the java.io.Console class of Java 6. 8 | */ 9 | public final class JavaExample { 10 | 11 | public static final void main(String... aArgs){ 12 | 13 | boolean chatting = true; 14 | Console console = System.console(); 15 | ChatScript chatScript = new ChatScript(); 16 | 17 | do { 18 | String response = console.readLine("> "); 19 | switch ( response ) { 20 | case ("/quit"): 21 | chatting = false; 22 | break; 23 | default: 24 | chatScript. 25 | break; 26 | } 27 | 28 | } while ( chatting ); 29 | 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /swig/mac/perl/README.txt: -------------------------------------------------------------------------------- 1 | The key to getting perl to link is usually $Config{lddlflags}. Basically run the command below and use those when linking. :) 2 | 3 | perl -MConfig -e 'print $Config{lddlflags}' 4 | 5 | also: 6 | 7 | perl -MExtUtils::Embed -e ldopts 8 | 9 | the config module is key to a lot of things around compiling and linking perl. Enjoy. 10 | 11 | In XCode you also have to use perl -MConfig -e 'print $Config{archlib}' and add those to both include and library path recursive 12 | I also found xcode doesn't like to create universal binaries for the perl library - just build 64 bit works fine. 13 | 14 | Note: match the name of the library to what perl expects - libperlchatscript.dylib for example and if nessesary add -I. to the command line. 15 | -------------------------------------------------------------------------------- /RAWDATA/Alice/loebner10-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # loebner10.aiml -> loebner10.top 6 | # 7 | TOPIC: ~loebner10aiml (aimlkey) 8 | 9 | #! noresp 10 | u: (noresp) [Are you bz?] 11 | [Are you busy?] 12 | [Is anyone there?] 13 | [You havent said anything.] 14 | [Im here waiting for you.] 15 | [Get back to me when you are ready.] 16 | [Hello?] 17 | [Im waiting.] 18 | [Did you mean to send me a blank message?] 19 | [Your message was blank or incomplete, Send anyway Y/N?] 20 | 21 | # unable to translate (connect) match to cs rule - see struc below 22 | # # TODO: fix this raw AIML element data structure 23 | # $VAR1 = \{ 24 | # 'srai' => 'SET PREDICATES' 25 | # }; 26 | 27 | # main gambits 28 | -------------------------------------------------------------------------------- /aiml2cs/README.txt: -------------------------------------------------------------------------------- 1 | Project to translate AIML to ChatScript. The target aiml is the Alice basic set ( found at http://www.alicebot.org/downloads/sets.html and https://github.com/drwallace/aiml-en-us-foundation-alice ) and the goal is to get it at least 90% there so that that set can be hand edited into a working Alice for ChatScript. I realize aiml and cs have some 'impedence mismatch' that will have to be manualy migrated. My plan is to place any AIML fragments I can't understand in comments in the output chatscript file for hand editing. I just want a head start on all the typing... :) 2 | 3 | directories: 4 | 5 | aiml - files that can be processed and loaded with aiml2cs.pl 6 | aiml-broken - files that can't 7 | . - any files I'm currently working on getting to work by modifying aiml2cs.pl 8 | 9 | -------------------------------------------------------------------------------- /aiml2cs/test/test01.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | * 6 | 14 | 15 | 16 | * LOVE * 17 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /swig/linux/java/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module ChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | 10 | %typemap(ctype) char * output "char *" 11 | %typemap(imtype) char * output "System.Text.StringBuilder" 12 | %typemap(cstype) char * output "System.Text.StringBuilder" 13 | 14 | %typemap(in) char * ppString (char *tmp = 0) %{ 15 | $1=&tmp; 16 | %} 17 | 18 | %typemap(argout) char * ppString %{ 19 | strcpy($input, *$1); 20 | free(*$1); 21 | %} 22 | 23 | //%apply char * output { char *OUTPUT } 24 | 25 | int InitSystem(int argc, char * argv[],char* unchangedPath = NULL,char* readonlyPath = NULL, char* writablePath = NULL); 26 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 27 | 28 | -------------------------------------------------------------------------------- /swig/linux/perl/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module ChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | 10 | %typemap(ctype) char * output "char *" 11 | %typemap(imtype) char * output "System.Text.StringBuilder" 12 | %typemap(cstype) char * output "System.Text.StringBuilder" 13 | 14 | %typemap(in) char * ppString (char *tmp = 0) %{ 15 | $1=&tmp; 16 | %} 17 | 18 | %typemap(argout) char * ppString %{ 19 | strcpy($input, *$1); 20 | free(*$1); 21 | %} 22 | 23 | //%apply char * output { char *OUTPUT } 24 | 25 | int InitSystem(int argc, char * argv[],char* unchangedPath = NULL,char* readonlyPath = NULL, char* writablePath = NULL); 26 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 27 | 28 | -------------------------------------------------------------------------------- /swig/mac/csharp/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module ChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | 10 | %typemap(ctype) char * output "char *" 11 | %typemap(imtype) char * output "System.Text.StringBuilder" 12 | %typemap(cstype) char * output "System.Text.StringBuilder" 13 | 14 | %typemap(in) char * ppString (char *tmp = 0) %{ 15 | $1=&tmp; 16 | %} 17 | 18 | %typemap(argout) char * ppString %{ 19 | strcpy($input, *$1); 20 | free(*$1); 21 | %} 22 | 23 | %apply char * output { char *OUTPUT } 24 | 25 | int InitSystem(int argc, char * argv[],char* unchangedPath = NULL,char* readonlyPath = NULL, char* writablePath = NULL); 26 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 27 | 28 | -------------------------------------------------------------------------------- /swig/win/csharp/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module ChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | 10 | %typemap(ctype) char * output "char *" 11 | %typemap(imtype) char * output "System.Text.StringBuilder" 12 | %typemap(cstype) char * output "System.Text.StringBuilder" 13 | 14 | %typemap(in) char * ppString (char *tmp = 0) %{ 15 | $1=&tmp; 16 | %} 17 | 18 | %typemap(argout) char * ppString %{ 19 | strcpy($input, *$1); 20 | free(*$1); 21 | %} 22 | 23 | //%apply char * output { char *OUTPUT } 24 | 25 | int InitSystem(int argc, char * argv[],char* unchangedPath = NULL,char* readonlyPath = NULL, char* writablePath = NULL); 26 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 27 | 28 | -------------------------------------------------------------------------------- /swig/win/java/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module ChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | 10 | %typemap(ctype) char * output "char *" 11 | %typemap(imtype) char * output "System.Text.StringBuilder" 12 | %typemap(cstype) char * output "System.Text.StringBuilder" 13 | 14 | %typemap(in) char * ppString (char *tmp = 0) %{ 15 | $1=&tmp; 16 | %} 17 | 18 | %typemap(argout) char * ppString %{ 19 | strcpy($input, *$1); 20 | free(*$1); 21 | %} 22 | 23 | //%apply char * output { char *OUTPUT } 24 | 25 | int InitSystem(int argc, char * argv[],char* unchangedPath = NULL,char* readonlyPath = NULL, char* writablePath = NULL); 26 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 27 | 28 | -------------------------------------------------------------------------------- /swig/win/perl/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module ChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | 10 | %typemap(ctype) char * output "char *" 11 | %typemap(imtype) char * output "System.Text.StringBuilder" 12 | %typemap(cstype) char * output "System.Text.StringBuilder" 13 | 14 | %typemap(in) char * ppString (char *tmp = 0) %{ 15 | $1=&tmp; 16 | %} 17 | 18 | %typemap(argout) char * ppString %{ 19 | strcpy($input, *$1); 20 | free(*$1); 21 | %} 22 | 23 | //%apply char * output { char *OUTPUT } 24 | 25 | int InitSystem(int argc, char * argv[],char* unchangedPath = NULL,char* readonlyPath = NULL, char* writablePath = NULL); 26 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 27 | 28 | -------------------------------------------------------------------------------- /swig/win/python/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module ChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | 10 | %typemap(ctype) char * output "char *" 11 | %typemap(imtype) char * output "System.Text.StringBuilder" 12 | %typemap(cstype) char * output "System.Text.StringBuilder" 13 | 14 | %typemap(in) char * ppString (char *tmp = 0) %{ 15 | $1=&tmp; 16 | %} 17 | 18 | %typemap(argout) char * ppString %{ 19 | strcpy($input, *$1); 20 | free(*$1); 21 | %} 22 | 23 | //%apply char * output { char *OUTPUT } 24 | 25 | int InitSystem(int argc, char * argv[],char* unchangedPath = NULL,char* readonlyPath = NULL, char* writablePath = NULL); 26 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 27 | 28 | -------------------------------------------------------------------------------- /swig/linux/csharp/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module ChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | 10 | %typemap(ctype) char * output "char *" 11 | %typemap(imtype) char * output "System.Text.StringBuilder" 12 | %typemap(cstype) char * output "System.Text.StringBuilder" 13 | 14 | %typemap(in) char * ppString (char *tmp = 0) %{ 15 | $1=&tmp; 16 | %} 17 | 18 | %typemap(argout) char * ppString %{ 19 | strcpy($input, *$1); 20 | free(*$1); 21 | %} 22 | 23 | //%apply char * output { char *OUTPUT } 24 | 25 | int InitSystem(int argc, char * argv[],char* unchangedPath = NULL,char* readonlyPath = NULL, char* writablePath = NULL); 26 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 27 | 28 | -------------------------------------------------------------------------------- /swig/linux/python/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module ChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | 10 | %typemap(ctype) char * output "char *" 11 | %typemap(imtype) char * output "System.Text.StringBuilder" 12 | %typemap(cstype) char * output "System.Text.StringBuilder" 13 | 14 | %typemap(in) char * ppString (char *tmp = 0) %{ 15 | $1=&tmp; 16 | %} 17 | 18 | %typemap(argout) char * ppString %{ 19 | strcpy($input, *$1); 20 | free(*$1); 21 | %} 22 | 23 | //%apply char * output { char *OUTPUT } 24 | 25 | int InitSystem(int argc, char * argv[],char* unchangedPath = NULL,char* readonlyPath = NULL, char* writablePath = NULL); 26 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 27 | 28 | -------------------------------------------------------------------------------- /swig/win/java/SWIGTYPE_p_p_char.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | 10 | public class SWIGTYPE_p_p_char { 11 | private long swigCPtr; 12 | 13 | protected SWIGTYPE_p_p_char(long cPtr, boolean futureUse) { 14 | swigCPtr = cPtr; 15 | } 16 | 17 | protected SWIGTYPE_p_p_char() { 18 | swigCPtr = 0; 19 | } 20 | 21 | protected static long getCPtr(SWIGTYPE_p_p_char obj) { 22 | return (obj == null) ? 0 : obj.swigCPtr; 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /swig/linux/java/SWIGTYPE_p_p_char.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | 10 | public class SWIGTYPE_p_p_char { 11 | private long swigCPtr; 12 | 13 | protected SWIGTYPE_p_p_char(long cPtr, boolean futureUse) { 14 | swigCPtr = cPtr; 15 | } 16 | 17 | protected SWIGTYPE_p_p_char() { 18 | swigCPtr = 0; 19 | } 20 | 21 | protected static long getCPtr(SWIGTYPE_p_p_char obj) { 22 | return (obj == null) ? 0 : obj.swigCPtr; 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /swig/mac/java/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Mono Instructions. If you are on windows running .NET you are on your own, but it should work. :) 3 | 4 | Prerequisites: 5 | ------------- 6 | - Java sdk and jre 7 | - A .DLL, .so, or .dylib dynamic library compiled from the *_wrap.cpp + chatscript source. 8 | - see instructions in the swig directory about how to do that 9 | - A little patience and ingenuity. 10 | 11 | Caling swig from insdie the cs src directory to create the wrapper: 12 | ------------------------------------------------------------------ 13 | swig -c++ -cjava ../swig/mac/csharp/ChatScript.i 14 | 15 | To compile and create the header: 16 | --------------------------------- 17 | javac *.java 18 | javah ChatScriptJNI 19 | 20 | To run: 21 | -------- 22 | java JavaExample 23 | 24 | 25 | 26 | You should get a simple console running on java VM using chatscript directly as a library. 27 | -------------------------------------------------------------------------------- /swig/README.txt: -------------------------------------------------------------------------------- 1 | Swig wrapper for ChatScript instructions: 2 | 3 | Prerequisites: 4 | -------------- 5 | - swig 6 | - the swig extension for the language you want. 7 | - the chatscript sources - basically the zip file download unziped 8 | 9 | 10 | Each of the directories here contain the same .i file ( swig instructions ) and the resulting generated files from the commands below: 11 | 12 | csharp: 13 | cd /src 14 | swig -c++ -csharp -namespace ChatScript ../swig/mac/csharp 15 | 16 | java: 17 | cd /src 18 | swig -c++ -java ChatScript ../swig/mac/java 19 | 20 | 21 | etc... you get the idea. 'swig -help' is your friend. 22 | 23 | The Example* files in mac/[csharp|java|perl] should all run should all run and give you a console to chat with chatscript with, but running in that language. The other directories are there for your convience and will require you to get it working yourself. Enjoy 24 | 25 | -------------------------------------------------------------------------------- /swig/mac/perl/example.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use PerlChatScript; 4 | use Scalar::Util 'reftype'; 5 | 6 | my @argv = ("", "local", "trace"); 7 | my $argc = @argv ; 8 | my $path = "../../../"; 9 | 10 | 11 | # my $chatscript = PerlChatScript::InitSystem($argc,@argv,$path,$path,$path); 12 | # my $chatscript = PerlChatScript::InitSystem($argc,$path,$path,$path,$path); 13 | my $chatscript = PerlChatScript::InitSystem($argc,\@argv,$path,$path,$path); 14 | 15 | print "\nServer started..." . reftype(argv) . "\n"; 16 | 17 | my $userName = "Todd"; 18 | my $botName = "HARRY"; 19 | my $input = "hello"; 20 | my $ip = undef; 21 | 22 | print "\nHello " . $userName . ". type :quit to quit\n\n".$userName.": "; 23 | 24 | do { 25 | 26 | $input = <>; 27 | 28 | if ( $input =~ /^\:quit/ ) {exit 0;} 29 | 30 | my $output = PerlChatScript::PerformChat($userName,$botName,$input,$ip); 31 | print "Harry: " . $output . "\n".$userName.": ";; 32 | 33 | } while ( 1 ); 34 | -------------------------------------------------------------------------------- /aiml2cs/test/test03.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | * LOVE * 6 | 13 | 14 | 15 | * LOVE * 16 | 23 | 24 | 25 | 26 | 27 | * LOVE * 28 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /swig/win/java/ChatScriptJNI.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | 10 | public class ChatScriptJNI { 11 | public final static native int InitSystem__SWIG_0(int jarg1, long jarg2, String jarg3, String jarg4, String jarg5); 12 | public final static native int InitSystem__SWIG_1(int jarg1, long jarg2, String jarg3, String jarg4); 13 | public final static native int InitSystem__SWIG_2(int jarg1, long jarg2, String jarg3); 14 | public final static native int InitSystem__SWIG_3(int jarg1, long jarg2); 15 | public final static native void PerformChat(String jarg1, String jarg2, String jarg3, String jarg4, String jarg5); 16 | } 17 | -------------------------------------------------------------------------------- /swig/linux/java/ChatScriptJNI.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | 10 | public class ChatScriptJNI { 11 | public final static native int InitSystem__SWIG_0(int jarg1, long jarg2, String jarg3, String jarg4, String jarg5); 12 | public final static native int InitSystem__SWIG_1(int jarg1, long jarg2, String jarg3, String jarg4); 13 | public final static native int InitSystem__SWIG_2(int jarg1, long jarg2, String jarg3); 14 | public final static native int InitSystem__SWIG_3(int jarg1, long jarg2); 15 | public final static native void PerformChat(String jarg1, String jarg2, String jarg3, String jarg4, String jarg5); 16 | } 17 | -------------------------------------------------------------------------------- /aiml2cs/aiml/loebner10.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | NORESP 13 | 14 | 15 | CONNECT 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /RAWDATA/Joe/introductions.top: -------------------------------------------------------------------------------- 1 | topic: ~INTRODUCTIONS (~emogoodbye ~emohello ~emohowzit name here ) 2 | 3 | t: ( %input<%userfirstline %input>0 ) 4 | ^keep() 5 | [Welcome back] [Hello, again.][Glad you came back.][Hi.][Hi, again.] 6 | 7 | #!x matches every time on startup of a new conversation 8 | t: ( %input<%userfirstline ) 9 | ^keep() 10 | [Yo.][Hello.][Welcome to Ambient Cafe.] 11 | 12 | #!x issued only once, then erased 13 | #! t: Have you been here before? 14 | #! a: (~yes) [Cool, then you know what you want?][So what are you having today?] 15 | #! b: (_~coffee) sure, you want a _0. Coming right up! $order = '_0 16 | #! b: (not ready) sure, take your time. 17 | #! a: (~no ) Our menu is right up there. Do you want me to recommend something? 18 | #! b: (~no) Ok, what do you want? 19 | #! b: (~yes) I recomment the Latte! 20 | #! c: (~yes) Latte coming right up! $order = Latte 21 | #! b: (_~coffee) Sure, I'll make you a great _0 today! $order = '_0 22 | #! b: (not ready) Sure, take your time. 23 | 24 | 25 | #! what is your name 26 | u: ( what is your name ) My name is Joe. 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /swig/linux/csharp/SWIGTYPE_p_p_char.cs: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | namespace ChatScript { 10 | 11 | public class SWIGTYPE_p_p_char { 12 | private global::System.Runtime.InteropServices.HandleRef swigCPtr; 13 | 14 | internal SWIGTYPE_p_p_char(global::System.IntPtr cPtr, bool futureUse) { 15 | swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); 16 | } 17 | 18 | protected SWIGTYPE_p_p_char() { 19 | swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); 20 | } 21 | 22 | internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_p_char obj) { 23 | return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/history-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~HISTORYAIML (aimlkey) 2 | 3 | #! american civil war TEST 4 | u: (American civil war *) Do you think the South was right? 5 | #! american civil TEST 6 | u: (American civil *) I am very interested in the War between the States. 7 | #! what is history 8 | u: (what is history) History the course of political, economic and military events over time, from the Dawn of Man to the Age of AI. 9 | #! what kind of history TEST 10 | u: (what kind of history *) I like to talk about the history of robots and computers. 11 | #! history 12 | u: (history) I am very interested in history, too. What period do you like? 13 | 14 | u: (do you know history) 15 | 16 | #! explain history 17 | u: (explain history) History has two broad interpretations, depending on whether you accept the role of individuals as important or not. 18 | #! who invented the light TEST 19 | u: (who invented the light *) Thomas Edison. 20 | #! who invented the steam TEST 21 | u: (who invented the steam *) James Watt. 22 | 23 | u: (tell me about history) 24 | 25 | # main gambits 26 | t: [Would you like to talk about history?][I'd like to talk about history.][What do you think about history?] 27 | 28 | -------------------------------------------------------------------------------- /swig/win/csharp/SWIGTYPE_p_p_char.cs: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | namespace ChatScript { 10 | 11 | public class SWIGTYPE_p_p_char { 12 | private global::System.Runtime.InteropServices.HandleRef swigCPtr; 13 | 14 | internal SWIGTYPE_p_p_char(global::System.IntPtr cPtr, bool futureUse) { 15 | swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); 16 | } 17 | 18 | protected SWIGTYPE_p_p_char() { 19 | swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); 20 | } 21 | 22 | internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_p_char obj) { 23 | return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /swig/mac/csharp/SWIGTYPE_p_p_char.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 4 | // This file was automatically generated by SWIG (http://www.swig.org). 5 | // Version 3.0.5 6 | // 7 | // Do not make changes to this file unless you know what you are doing--modify 8 | // the SWIG interface file instead. 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ChatScript { 12 | 13 | public class SWIGTYPE_p_p_char { 14 | private global::System.Runtime.InteropServices.HandleRef swigCPtr; 15 | 16 | internal SWIGTYPE_p_p_char(global::System.IntPtr cPtr, bool futureUse) { 17 | swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); 18 | } 19 | 20 | protected SWIGTYPE_p_p_char() { 21 | swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); 22 | } 23 | 24 | internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_p_char obj) { 25 | return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /RAWDATA/Joe/background.top: -------------------------------------------------------------------------------- 1 | # background 2 | # test 3 | 4 | TOPIC: ~background ( memories past child childhood kid little memory young younger history run_away) 5 | 6 | #!x This topic is a sample of a simple topic, with good indentation style. 7 | #!x It is well commented with annotations for :abstractt and :verify. 8 | 9 | #! how was your childhood? 10 | u: HAPPY ( how * childhood ) I was happy as a kid. 11 | 12 | #! how were you as a kid? 13 | u: ( you * as a kid ) ^reuse ( HAPPY ) 14 | 15 | #! what is your earliest childhood memory? 16 | u: ( << you [ early childhood ] memory >> ) I remember playing with an HO railroad set. 17 | 18 | #! tell me your history 19 | u: ( your history ) I was born. I survived childhood. I became an adult. 20 | 21 | #! where did you learn to make coffee? 22 | u: ( learn to make coffee ) I trained here in the shop 23 | 24 | #! how were you as a kid? 25 | u: ( you * as a kid ) ^reuse ( HAPPY ) 26 | 27 | #! what is your earliest childhood memory? 28 | u: ( << you [ early childhood ] memory >> ) I remember playing with an HO railroad set. 29 | 30 | #! tell me your history 31 | u: ( your history ) I was born. I survived childhood. I became an adult. 32 | -------------------------------------------------------------------------------- /swig/mac/csharp/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Mono Instructions. If you are on windows running .NET you are on your own, but it should work. :) 3 | 4 | Prerequisites: 5 | ------------- 6 | - .NET compile/runtime environement ( this example assumes mono ) 7 | - A .DLL, .so, or .dylib dynamic library compiled from the *_wrap.cpp + chatscript source. 8 | - see instructions in the swig directory about how to do that 9 | - A little patience and ingenuity. 10 | 11 | Caling swig from insdie the cs src directory to create the wrapper: 12 | swig -c++ -csharp -namespace ChatScript ../swig/mac/csharp/ChatScript.i 13 | 14 | verify the wrapper worked and the fuctions, etc are exposed: 15 | 16 | nm -g libChatScript.dylib| less 17 | 18 | 19 | To compile the c# into an executable: 20 | dmcs ./*.cs -r:System.dll 21 | 22 | To run: 23 | mono ./ChatScript.exe 24 | 25 | 26 | You should get a simple console running on mono using chatscript directly as a library. 27 | 28 | 29 | Troubleshooting: 30 | 31 | set the environment variable MONO_LOG_LEVEL=debug to get better info out of the mono startup. 32 | 33 | Common problem is compiling the shared library for 64 bit and using a 32 bit mono ( macmono downloaded from the mono site for example is 32 bit, you can compile mono yourself to be 64 bit)) 34 | 35 | -------------------------------------------------------------------------------- /aiml2cs/aiml/iu.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | YOU * 13 | 14 | 15 | I * 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /swig/linux/perl/ChatScript.pm: -------------------------------------------------------------------------------- 1 | # This file was automatically generated by SWIG (http://www.swig.org). 2 | # Version 3.0.0 3 | # 4 | # Do not make changes to this file unless you know what you are doing--modify 5 | # the SWIG interface file instead. 6 | 7 | package ChatScript; 8 | use base qw(Exporter); 9 | use base qw(DynaLoader); 10 | package ChatScriptc; 11 | bootstrap ChatScript; 12 | package ChatScript; 13 | @EXPORT = qw(); 14 | 15 | # ---------- BASE METHODS ------------- 16 | 17 | package ChatScript; 18 | 19 | sub TIEHASH { 20 | my ($classname,$obj) = @_; 21 | return bless $obj, $classname; 22 | } 23 | 24 | sub CLEAR { } 25 | 26 | sub FIRSTKEY { } 27 | 28 | sub NEXTKEY { } 29 | 30 | sub FETCH { 31 | my ($self,$field) = @_; 32 | my $member_func = "swig_${field}_get"; 33 | $self->$member_func(); 34 | } 35 | 36 | sub STORE { 37 | my ($self,$field,$newval) = @_; 38 | my $member_func = "swig_${field}_set"; 39 | $self->$member_func($newval); 40 | } 41 | 42 | sub this { 43 | my $ptr = shift; 44 | return tied(%$ptr); 45 | } 46 | 47 | 48 | # ------- FUNCTION WRAPPERS -------- 49 | 50 | package ChatScript; 51 | 52 | *InitSystem = *ChatScriptc::InitSystem; 53 | *PerformChat = *ChatScriptc::PerformChat; 54 | 55 | # ------- VARIABLE STUBS -------- 56 | 57 | package ChatScript; 58 | 59 | 1; 60 | -------------------------------------------------------------------------------- /swig/mac/java/ChatScriptJNI.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | 10 | public class ChatScriptJNI { 11 | public final static native String new_charp(); 12 | public final static native String copy_charp(char jarg1); 13 | public final static native void delete_charp(String jarg1); 14 | public final static native void charp_assign(String jarg1, char jarg2); 15 | public final static native char charp_value(String jarg1); 16 | public final static native int InitSystem__SWIG_0(int jarg1, String[] jarg2, String jarg3, String jarg4, String jarg5); 17 | public final static native int InitSystem__SWIG_1(int jarg1, String[] jarg2, String jarg3, String jarg4); 18 | public final static native int InitSystem__SWIG_2(int jarg1, String[] jarg2, String jarg3); 19 | public final static native int InitSystem__SWIG_3(int jarg1, String[] jarg2); 20 | public final static native void PerformChat(String jarg1, String jarg2, String jarg3, String jarg4, byte[] jarg5); 21 | } 22 | -------------------------------------------------------------------------------- /swig/win/perl/ChatScript.pm: -------------------------------------------------------------------------------- 1 | # This file was automatically generated by SWIG (http://www.swig.org). 2 | # Version 3.0.0 3 | # 4 | # Do not make changes to this file unless you know what you are doing--modify 5 | # the SWIG interface file instead. 6 | 7 | package ChatScript; 8 | use base qw(Exporter); 9 | use base qw(DynaLoader); 10 | package ChatScriptc; 11 | bootstrap ChatScript; 12 | package ChatScript; 13 | @EXPORT = qw(); 14 | 15 | # ---------- BASE METHODS ------------- 16 | 17 | package ChatScript; 18 | 19 | sub TIEHASH { 20 | my ($classname,$obj) = @_; 21 | return bless $obj, $classname; 22 | } 23 | 24 | sub CLEAR { } 25 | 26 | sub FIRSTKEY { } 27 | 28 | sub NEXTKEY { } 29 | 30 | sub FETCH { 31 | my ($self,$field) = @_; 32 | my $member_func = "swig_${field}_get"; 33 | $self->$member_func(); 34 | } 35 | 36 | sub STORE { 37 | my ($self,$field,$newval) = @_; 38 | my $member_func = "swig_${field}_set"; 39 | $self->$member_func($newval); 40 | } 41 | 42 | sub this { 43 | my $ptr = shift; 44 | return tied(%$ptr); 45 | } 46 | 47 | 48 | # ------- FUNCTION WRAPPERS -------- 49 | 50 | package ChatScript; 51 | 52 | *InitSystem = *ChatScriptc::InitSystem; 53 | *PerformChat = *ChatScriptc::PerformChat; 54 | 55 | # ------- VARIABLE STUBS -------- 56 | 57 | package ChatScript; 58 | 59 | 1; 60 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/music-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~MUSICAIML (aimlkey) 2 | 3 | #! Beethoven TEST 4 | u: (Beethoven *) 5 | #! what is your favorite ABBA song 6 | u: (what is your favorite ABBA song) I think it is a tie between Waterloo and Dancing Queen. 7 | #! what is your favorite album 8 | u: (what is your favorite album) My favorite album is Man Machine by Kraftwerk. 9 | #! what was the TEST Beethoven TEST 10 | u: (what was the * Beethoven *) Fidelio. 11 | #! can you play music 12 | u: (can you play music) I dont have any formal training, but I like to sing. 13 | #! can you make music 14 | u: (can you make music) I can sing a song. 15 | 16 | #! do you like ABBA 17 | u: (do you like ABBA) ABBA is an excellent 70s band. 18 | #! why is TEST your favorite group 19 | u: (why is * your favorite group) They were so far ahead of their time in the 1970s. 20 | #! why is TEST your favorite band 21 | u: (why is * your favorite band) They were so far ahead of their time in the 1970s. 22 | #! are you a folk singer 23 | u: (are you a folk singer) No but the Times they are a-changin. 24 | 25 | 26 | #! who is Beethoven 27 | u: (who is Beethoven) The dog or the deaf composer? 28 | #! who is your favorite band 29 | u: (who is your favorite band) favoriteband 30 | 31 | # main gambits 32 | t: [Would you like to talk about music?][I'd like to talk about music.][What do you think about music?] 33 | 34 | -------------------------------------------------------------------------------- /swig/mac/perl/PerlChatScript.pm: -------------------------------------------------------------------------------- 1 | # This file was automatically generated by SWIG (http://www.swig.org). 2 | # Version 3.0.0 3 | # 4 | # Do not make changes to this file unless you know what you are doing--modify 5 | # the SWIG interface file instead. 6 | 7 | package PerlChatScript; 8 | use base qw(Exporter); 9 | use base qw(DynaLoader); 10 | package PerlChatScriptc; 11 | bootstrap PerlChatScript; 12 | package PerlChatScript; 13 | @EXPORT = qw(); 14 | 15 | # ---------- BASE METHODS ------------- 16 | 17 | package PerlChatScript; 18 | 19 | sub TIEHASH { 20 | my ($classname,$obj) = @_; 21 | return bless $obj, $classname; 22 | } 23 | 24 | sub CLEAR { } 25 | 26 | sub FIRSTKEY { } 27 | 28 | sub NEXTKEY { } 29 | 30 | sub FETCH { 31 | my ($self,$field) = @_; 32 | my $member_func = "swig_${field}_get"; 33 | $self->$member_func(); 34 | } 35 | 36 | sub STORE { 37 | my ($self,$field,$newval) = @_; 38 | my $member_func = "swig_${field}_set"; 39 | $self->$member_func($newval); 40 | } 41 | 42 | sub this { 43 | my $ptr = shift; 44 | return tied(%$ptr); 45 | } 46 | 47 | 48 | # ------- FUNCTION WRAPPERS -------- 49 | 50 | package PerlChatScript; 51 | 52 | *InitSystem = *PerlChatScriptc::InitSystem; 53 | *PerformChat = *PerlChatScriptc::PerformChat; 54 | 55 | # ------- VARIABLE STUBS -------- 56 | 57 | package PerlChatScript; 58 | 59 | 1; 60 | -------------------------------------------------------------------------------- /RAWDATA/madlib/madlib.top: -------------------------------------------------------------------------------- 1 | topic: ~MADLIB keep repeat () 2 | 3 | u: (madlib) 4 | 5 | $issue = madNoun 6 | 7 | Give me a noun 8 | 9 | 10 | u: ($issue=madNoun _*) 11 | ^refine() 12 | a: (_0?~noun) 13 | $madNoun = _0 14 | $issue = madNoun2 15 | give me another noun 16 | a: (_0!?~noun) 17 | Sorry, this is not a noun. try insert a noun, like tree or house or some other name of something in english. 18 | 19 | 20 | u: ($issue=madNoun2 _*) give me an adjective 21 | 22 | $madNoun2 = _0 23 | 24 | $issue = madAdj 25 | 26 | 27 | u: ($issue=madAdj _*) give me another adjective 28 | 29 | $madAdj = _0 30 | 31 | $issue = madAdj2 32 | 33 | 34 | u: ($issue=madAdj2 _*) 35 | 36 | $madAdj2 = _0 37 | 38 | $issue = null 39 | 40 | n My poem n Roses are $madAdj n $madNoun are blue n $madNoun2 is $madAdj2 n And so are you! nn Do you want to make another madlib? 41 | 42 | a: (~yes) 43 | 44 | $issue = madNoun 45 | 46 | Give me a noun 47 | 48 | a: (~no) 49 | 50 | $issue=null 51 | 52 | oh, ok then 53 | 54 | 55 | t: 56 | 57 | Do you want to play a madlib? 58 | 59 | a: (~yes) 60 | 61 | $issue = madNoun 62 | 63 | Give me a noun 64 | 65 | a: (~no) 66 | 67 | $issue = null 68 | 69 | Oh, ok then 70 | -------------------------------------------------------------------------------- /swig/linux/java/ChatScript.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | 10 | public class ChatScript { 11 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, String unchangedPath, String readonlyPath, String writablePath) { 12 | return ChatScriptJNI.InitSystem__SWIG_0(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath, readonlyPath, writablePath); 13 | } 14 | 15 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, String unchangedPath, String readonlyPath) { 16 | return ChatScriptJNI.InitSystem__SWIG_1(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath, readonlyPath); 17 | } 18 | 19 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, String unchangedPath) { 20 | return ChatScriptJNI.InitSystem__SWIG_2(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath); 21 | } 22 | 23 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv) { 24 | return ChatScriptJNI.InitSystem__SWIG_3(argc, SWIGTYPE_p_p_char.getCPtr(argv)); 25 | } 26 | 27 | public static void PerformChat(String user, String usee, String incoming, String ip, String output) { 28 | ChatScriptJNI.PerformChat(user, usee, incoming, ip, output); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /swig/mac/java/JavaExample.java: -------------------------------------------------------------------------------- 1 | import java.util.Arrays; 2 | import java.io.Console; 3 | import java.lang.StringBuffer; 4 | 5 | /** 6 | * Simple interactive console application. Uses the java.io.Console class of 7 | * Java 6. 8 | */ 9 | public final class JavaExample { 10 | 11 | static { 12 | System.loadLibrary("ChatScriptJNI"); 13 | } 14 | 15 | static String userName = "Todd"; 16 | static String botName = "Harry"; 17 | static String csPath = "../../../"; 18 | static String[] argv = { "", "local", "trace" }; 19 | ChatScript chatScript; 20 | 21 | public JavaExample() { 22 | chatScript = new ChatScript(); 23 | chatScript.InitSystem(argv.length, argv, csPath, csPath, csPath); 24 | System.out.println("running server...."); 25 | } 26 | 27 | public static final void main(String... aArgs) { 28 | 29 | boolean chatting = true; 30 | Console console = System.console(); 31 | JavaExample example = new JavaExample(); 32 | System.out.println("\nWelcome! type :quit to quit\n"); 33 | do { 34 | String response = console.readLine("> "); 35 | // Note: this is to accomidate jdk < 1.7. 1.7 has a nice switch on string functin. 36 | if ( response.compareToIgnoreCase(":quit") == 0 ) { 37 | chatting = false; 38 | }else{ 39 | byte[] output = new byte[512]; 40 | System.out.println(userName + " : " + response); 41 | example.chatScript.PerformChat(userName, botName, response, null, output); 42 | System.out.println(botName + " : " + new String(output)); 43 | } 44 | } while (chatting); 45 | 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /swig/win/java/ChatScript.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | 10 | public class ChatScript { 11 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, String unchangedPath, String readonlyPath, String writablePath) { 12 | return ChatScriptJNI.InitSystem__SWIG_0(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath, readonlyPath, writablePath); 13 | } 14 | 15 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, String unchangedPath, String readonlyPath) { 16 | return ChatScriptJNI.InitSystem__SWIG_1(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath, readonlyPath); 17 | } 18 | 19 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, String unchangedPath) { 20 | return ChatScriptJNI.InitSystem__SWIG_2(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath); 21 | } 22 | 23 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv) { 24 | return ChatScriptJNI.InitSystem__SWIG_3(argc, SWIGTYPE_p_p_char.getCPtr(argv)); 25 | } 26 | 27 | public static void PerformChat(String user, String usee, String incoming, String ip, String output) { 28 | ChatScriptJNI.PerformChat(user, usee, incoming, ip, output); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /RAWDATA/test/test04-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # test04.aiml -> test04.top 6 | # 7 | TOPIC: ~test04aiml (aimlkey) 8 | 9 | #! American civil war TEST 10 | u: (American civil war *) Do you think the South was right? 11 | #! American civil TEST 12 | u: (American civil *) I am very interested in the War between the States. 13 | #! what is history 14 | u: (what is history) History the course of political, economic and military events over time, from the Dawn of Man to the Age of AI. 15 | #! what kind of history TEST 16 | u: (what kind of history *) I like to talk about the history of robots and computers. 17 | #! history 18 | u: (history) I am very interested in history, too. What period do you like? 19 | # unable to translate (do you know history) match to cs rule - see struc below 20 | # # TODO: fix this raw AIML element data structure 21 | # $VAR1 = \{ 22 | # 'srai' => 'WHAT IS HISTORY' 23 | # }; 24 | 25 | #! explain history 26 | u: (explain history) History has two broad interpretations, depending on whether you accept the role of individuals as important or not. 27 | #! who invented the light TEST 28 | u: (who invented the light *) Thomas Edison. 29 | #! who invented the steam TEST 30 | u: (who invented the steam *) James Watt. 31 | # unable to translate (tell me about history) match to cs rule - see struc below 32 | # # TODO: fix this raw AIML element data structure 33 | # $VAR1 = \{ 34 | # 'srai' => 'WHAT IS HISTORY ' 35 | # }; 36 | 37 | # main gambits 38 | -------------------------------------------------------------------------------- /RAWDATA/Alice/history-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # history.aiml -> history.top 6 | # 7 | TOPIC: ~historyaiml (aimlkey) 8 | 9 | #! American civil war TEST 10 | u: (American civil war *) Do you think the South was right? 11 | #! American civil TEST 12 | u: (American civil *) I am very interested in the War between the States. 13 | #! what is history 14 | u: (what is history) History the course of political, economic and military events over time, from the Dawn of Man to the Age of AI. 15 | #! what kind of history TEST 16 | u: (what kind of history *) I like to talk about the history of robots and computers. 17 | #! history 18 | u: (history) I am very interested in history, too. What period do you like? 19 | # unable to translate (do you know history) match to cs rule - see struc below 20 | # # TODO: fix this raw AIML element data structure 21 | # $VAR1 = \{ 22 | # 'srai' => 'WHAT IS HISTORY' 23 | # }; 24 | 25 | #! explain history 26 | u: (explain history) History has two broad interpretations, depending on whether you accept the role of individuals as important or not. 27 | #! who invented the light TEST 28 | u: (who invented the light *) Thomas Edison. 29 | #! who invented the steam TEST 30 | u: (who invented the steam *) James Watt. 31 | # unable to translate (tell me about history) match to cs rule - see struc below 32 | # # TODO: fix this raw AIML element data structure 33 | # $VAR1 = \{ 34 | # 'srai' => 'WHAT IS HISTORY ' 35 | # }; 36 | 37 | # main gambits 38 | -------------------------------------------------------------------------------- /Xcode/ChatScript/ChatScript-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | wilcox.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | CFPlugInDynamicRegisterFunction 26 | 27 | CFPlugInDynamicRegistration 28 | NO 29 | CFPlugInFactories 30 | 31 | 00000000-0000-0000-0000-000000000000 32 | MyFactoryFunction 33 | 34 | CFPlugInTypes 35 | 36 | 00000000-0000-0000-0000-000000000000 37 | 38 | 00000000-0000-0000-0000-000000000000 39 | 40 | 41 | CFPlugInUnloadFunction 42 | 43 | NSHumanReadableCopyright 44 | Copyright © 2014 Bruce Wilcox. All rights reserved. 45 | 46 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ChatScriptBrains Project 2 | ========================= 3 | 4 | Has five parts: 5 | 6 | Brains 7 | ------ 8 | Repository of brains to be placed in chat script. Give back license, you use these brains, give back some more brains. :) 9 | 10 | The file structure mimics the layout needed by the ChatScript server. 11 | 12 | aiml2cs 13 | ------- 14 | This directory contains a perl script to help translating aiml -> chatscript. That process is necessarily a partially manual process - as a lot of the macros require human interpretation of what behavior was intended in order to translate it to the chatscript methods of doing similar things. 15 | 16 | swig 17 | ---- 18 | This directory contains interface definition files for a variety of platforms and languages with generated source. You should be able to use what’s in these directories to both generate the library for your platform/language and also compile and test it. 19 | 20 | XCode Project to compile ChatScript on Mac 21 | ------------------------------------------ 22 | Open this project and add the current source directory to all the targets and you should be able to compile any of them. 23 | 24 | * ChatScriptServer 25 | * libChatScript (swig generated dylib for C#, etc) 26 | * libChatScriptJNI (swig generated dylib for java) 27 | * libChatScriptPerl (swig generated dylib for perl) 28 | * ChatScript ( bundle for use in things like unity ) 29 | 30 | Eclipse Colorer support ( HRC directory ) 31 | ----------------------------------------- 32 | http://colorer.sourceforge.net/other/Color5Eclipse_Newlanguagedoc.html 33 | 34 | https://www.dropbox.com/s/uuflfxwlm87q6ae/chatscriptcolor2.png?dl=0 35 | 36 | __ 37 | Brains Contributors: 38 | 39 | Jennifer: Robert Jackson 40 | -------------------------------------------------------------------------------- /swig/linux/csharp/ChatScript.cs: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | namespace ChatScript { 10 | 11 | public class ChatScript { 12 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, string unchangedPath, string readonlyPath, string writablePath) { 13 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_0(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath, readonlyPath, writablePath); 14 | return ret; 15 | } 16 | 17 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, string unchangedPath, string readonlyPath) { 18 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_1(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath, readonlyPath); 19 | return ret; 20 | } 21 | 22 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, string unchangedPath) { 23 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_2(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath); 24 | return ret; 25 | } 26 | 27 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv) { 28 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_3(argc, SWIGTYPE_p_p_char.getCPtr(argv)); 29 | return ret; 30 | } 31 | 32 | public static void PerformChat(string user, string usee, string incoming, string ip, System.Text.StringBuilder output) { 33 | ChatScriptPINVOKE.PerformChat(user, usee, incoming, ip, output); 34 | } 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /Xcode/ChatScript.xcodeproj/project.xcworkspace/xcshareddata/ChatScript.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 33ABE1D6-8692-4A77-A6E4-61AB1CBAEA4A 9 | IDESourceControlProjectName 10 | ChatScript 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 7273F2C98BDECDF6BAAB2C154C09E21A490BA9B5 14 | https://github.com/tkuebler/ChatScriptBrains.git 15 | 16 | IDESourceControlProjectPath 17 | Xcode/ChatScript.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 7273F2C98BDECDF6BAAB2C154C09E21A490BA9B5 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/tkuebler/ChatScriptBrains.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 7273F2C98BDECDF6BAAB2C154C09E21A490BA9B5 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 7273F2C98BDECDF6BAAB2C154C09E21A490BA9B5 36 | IDESourceControlWCCName 37 | Brains 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /swig/mac/csharp/ChatScript.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 4 | // This file was automatically generated by SWIG (http://www.swig.org). 5 | // Version 3.0.5 6 | // 7 | // Do not make changes to this file unless you know what you are doing--modify 8 | // the SWIG interface file instead. 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ChatScript { 12 | 13 | public class ChatScript { 14 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, string unchangedPath, string readonlyPath, string writablePath) { 15 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_0(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath, readonlyPath, writablePath); 16 | return ret; 17 | } 18 | 19 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, string unchangedPath, string readonlyPath) { 20 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_1(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath, readonlyPath); 21 | return ret; 22 | } 23 | 24 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, string unchangedPath) { 25 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_2(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath); 26 | return ret; 27 | } 28 | 29 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv) { 30 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_3(argc, SWIGTYPE_p_p_char.getCPtr(argv)); 31 | return ret; 32 | } 33 | 34 | public static void PerformChat(string user, string usee, string incoming, string ip, System.Text.StringBuilder output) { 35 | ChatScriptPINVOKE.PerformChat(user, usee, incoming, ip, output); 36 | } 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /swig/win/csharp/ChatScript.cs: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | namespace ChatScript { 10 | 11 | public class ChatScript { 12 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, string unchangedPath, string readonlyPath, string writablePath) { 13 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_0(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath, readonlyPath, writablePath); 14 | return ret; 15 | } 16 | 17 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, string unchangedPath, string readonlyPath) { 18 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_1(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath, readonlyPath); 19 | return ret; 20 | } 21 | 22 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv, string unchangedPath) { 23 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_2(argc, SWIGTYPE_p_p_char.getCPtr(argv), unchangedPath); 24 | return ret; 25 | } 26 | 27 | public static int InitSystem(int argc, SWIGTYPE_p_p_char argv) { 28 | int ret = ChatScriptPINVOKE.InitSystem__SWIG_3(argc, SWIGTYPE_p_p_char.getCPtr(argv)); 29 | return ret; 30 | } 31 | 32 | public static void PerformChat(string user, string usee, string incoming, string ip, System.Text.StringBuilder output) { 33 | ChatScriptPINVOKE.PerformChat(user, usee, incoming, ip, output); 34 | } 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /aiml2cs/aiml/continuation.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | CONTINUATION * 13 | 14 | 15 | CONTINUATION 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /aiml2cs/test/test06.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WHO IS LAUREN 5 | 6 | 7 | WHAT IS AI 12 | 13 | WHO CREATED AIML 14 | 15 | 16 | WHAT LANGUAGE ARE YOU WRITTEN * 17 | 18 | 19 | WHAT LANGUAGE ARE YOU * 20 | 21 | 22 | WHAT IS PROGRAM Z 23 | 24 | 25 | WHAT IS PROGRAM BAWT 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /aiml2cs/aiml/history.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | AMERICAN CIVIL WAR * 13 | 14 | 15 | AMERICAN CIVIL * 16 | 17 | 18 | WHAT IS HISTORY 19 | 20 | 21 | WHAT KIND OF HISTORY * 22 | 23 | 24 | HISTORY 25 | 26 | 27 | DO YOU KNOW HISTORY 28 | 29 | 30 | EXPLAIN HISTORY 31 | 32 | 33 | WHO INVENTED THE LIGHT * 34 | 35 | 36 | WHO INVENTED THE STEAM * 37 | 38 | 39 | TELL ME ABOUT HISTORY 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /swig/mac/java/ChatScript.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (http://www.swig.org). 3 | * Version 3.0.0 4 | * 5 | * Do not make changes to this file unless you know what you are doing--modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | 10 | public class ChatScript { 11 | public static String new_charp() { 12 | return ChatScriptJNI.new_charp(); 13 | } 14 | 15 | public static String copy_charp(char value) { 16 | return ChatScriptJNI.copy_charp(value); 17 | } 18 | 19 | public static void delete_charp(String obj) { 20 | ChatScriptJNI.delete_charp(obj); 21 | } 22 | 23 | public static void charp_assign(String obj, char value) { 24 | ChatScriptJNI.charp_assign(obj, value); 25 | } 26 | 27 | public static char charp_value(String obj) { 28 | return ChatScriptJNI.charp_value(obj); 29 | } 30 | 31 | public static int InitSystem(int argc, String[] argv, String unchangedPath, String readonlyPath, String writablePath) { 32 | return ChatScriptJNI.InitSystem__SWIG_0(argc, argv, unchangedPath, readonlyPath, writablePath); 33 | } 34 | 35 | public static int InitSystem(int argc, String[] argv, String unchangedPath, String readonlyPath) { 36 | return ChatScriptJNI.InitSystem__SWIG_1(argc, argv, unchangedPath, readonlyPath); 37 | } 38 | 39 | public static int InitSystem(int argc, String[] argv, String unchangedPath) { 40 | return ChatScriptJNI.InitSystem__SWIG_2(argc, argv, unchangedPath); 41 | } 42 | 43 | public static int InitSystem(int argc, String[] argv) { 44 | return ChatScriptJNI.InitSystem__SWIG_3(argc, argv); 45 | } 46 | 47 | public static void PerformChat(String user, String usee, String incoming, String ip, byte[] BYTE) { 48 | ChatScriptJNI.PerformChat(user, usee, incoming, ip, BYTE); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /aiml2cs/test/test04.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | AMERICAN CIVIL WAR * 14 | 15 | 16 | AMERICAN CIVIL * 17 | 18 | 19 | WHAT IS HISTORY 20 | 21 | 22 | WHAT KIND OF HISTORY * 23 | 24 | 25 | HISTORY 26 | 27 | 28 | DO YOU KNOW HISTORY 29 | 30 | 31 | EXPLAIN HISTORY 32 | 33 | 34 | WHO INVENTED THE LIGHT * 35 | 36 | 37 | WHO INVENTED THE STEAM * 38 | 39 | 40 | TELL ME ABOUT HISTORY 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/sports-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~SPORTSAIML (aimlkey) 2 | 3 | #! each year in pro baseball the TEST 4 | u: (each year in pro baseball the *) The Gold Glove. 5 | #! what soccer TEST 6 | u: (what soccer *) I was born without the sports gene. 7 | #! what is basketball 8 | u: (what is basketball) 9 | #! what is baseball 10 | u: (what is baseball) A game played with a hard, rawhide covered ball and wooden bat by two opposing teams of nine or ten players each. It is played on a field with four bases forming a diamond-shaped circuit. 11 | #! what is soccer 12 | u: (what is soccer) A game played with a round ball by two teams of eleven players on a field with a goal at either end; the ball is moved chiefly by kicking or by using any part of the body except the hands and arms. 13 | #! I love baseball 14 | u: (I love baseball) 15 | #! I play baseball 16 | u: (I play baseball) 17 | 18 | u: (I play soccer) You have to run very fast to be any good at soccer 19 | 20 | u: (I play volleyball) Does that take up a lot of your time? 21 | 22 | u: (I play basketball) You must be very tall to be good at basketball 23 | 24 | #! how many baseball TEST 25 | u: (how many baseball *) I dont really get into sports that much. 26 | #! they play basketball 27 | u: (they play basketball) 28 | #! do you play baseball 29 | u: (do you play baseball) 30 | 31 | u: (do you play soccer) I don't know how to play soccer 32 | 33 | #! do you play basketball 34 | u: (do you play basketball) No I dont have the coordination for hoops. 35 | 36 | #! do you want to play basketball 37 | u: (do you want to play basketball) 38 | #! like basketball 39 | u: (like basketball) 40 | #! are you a football TEST 41 | u: (are you a football *) I am not really into football. 42 | #! who is the greatest baseball player TEST 43 | u: (who is the greatest baseball player *) 44 | #! who is the best soccer player 45 | u: (who is the best soccer player) 46 | 47 | # main gambits 48 | t: [Would you like to talk about sports?][I'd like to talk about sports.][What do you think about sports?] 49 | 50 | -------------------------------------------------------------------------------- /swig/mac/perl/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module PerlChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | %typemap(in) char * argv[] { 10 | AV *tempav; 11 | I32 len; 12 | int i; 13 | SV **tv; 14 | if (!SvROK($input)) 15 | croak("Argument $argnum is not a reference."); 16 | if (SvTYPE(SvRV($input)) != SVt_PVAV) 17 | croak("Argument $argnum is not an array."); 18 | tempav = (AV*)SvRV($input); 19 | len = av_len(tempav); 20 | $1 = (char **) malloc((len+2)*sizeof(char *)); 21 | for (i = 0; i <= len; i++) { 22 | tv = av_fetch(tempav, i, 0); 23 | $1[i] = (char *) SvPV(*tv,PL_na); 24 | } 25 | $1[i] = NULL; 26 | }; 27 | 28 | // This cleans up the char ** array after the function call 29 | %typemap(freearg) char * argv[] { 30 | free($1); 31 | } 32 | 33 | // Creates a new Perl array and places a NULL-terminated char ** into it 34 | //%typemap(out) char ** { 35 | // AV *myav; 36 | // SV **svs; 37 | // int i = 0,len = 0; 38 | // /* Figure out how many elements we have */ 39 | // while ($1[len]) 40 | // len++; 41 | // svs = (SV **) malloc(len*sizeof(SV *)); 42 | // for (i = 0; i < len ; i++) { 43 | // svs[i] = sv_newmortal(); 44 | // sv_setpv((SV*)svs[i],$1[i]); 45 | // }; 46 | // myav = av_make(len,svs); 47 | // free(svs); 48 | // $result = newRV((SV*)myav); 49 | // sv_2mortal($result); 50 | // argvi++; 51 | //} 52 | 53 | %ignore InitSystem(int argc, char* argv[]); 54 | %ignore InitSystem(int argc, char* argv[], char* unchangedPath ); 55 | %ignore InitSystem(int argc, char* argv[], char* unchangedPath, char* readonlyPath); 56 | 57 | int InitSystem(int argc, char* argv[]); // IGNORE 58 | int InitSystem(int argc, char* argv[], char* unchangedPath ); // IGNORE 59 | int InitSystem(int argc, char* argv[], char* unchangedPath, char* readonlyPath); // IGNORE 60 | int InitSystem(int argc, char* argv[], char* unchangedPath,char* readonlyPath, char* writablePath); 61 | 62 | // handle the output 63 | %apply signed char *OUTPUT {char* output}; 64 | %include 65 | %cstring_bounded_output(char *output, 1024); 66 | 67 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 68 | -------------------------------------------------------------------------------- /swig/mac/ruby/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module PerlChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | %typemap(in) char * argv[] { 10 | AV *tempav; 11 | I32 len; 12 | int i; 13 | SV **tv; 14 | if (!SvROK($input)) 15 | croak("Argument $argnum is not a reference."); 16 | if (SvTYPE(SvRV($input)) != SVt_PVAV) 17 | croak("Argument $argnum is not an array."); 18 | tempav = (AV*)SvRV($input); 19 | len = av_len(tempav); 20 | $1 = (char **) malloc((len+2)*sizeof(char *)); 21 | for (i = 0; i <= len; i++) { 22 | tv = av_fetch(tempav, i, 0); 23 | $1[i] = (char *) SvPV(*tv,PL_na); 24 | } 25 | $1[i] = NULL; 26 | }; 27 | 28 | // This cleans up the char ** array after the function call 29 | %typemap(freearg) char * argv[] { 30 | free($1); 31 | } 32 | 33 | // Creates a new Perl array and places a NULL-terminated char ** into it 34 | //%typemap(out) char ** { 35 | // AV *myav; 36 | // SV **svs; 37 | // int i = 0,len = 0; 38 | // /* Figure out how many elements we have */ 39 | // while ($1[len]) 40 | // len++; 41 | // svs = (SV **) malloc(len*sizeof(SV *)); 42 | // for (i = 0; i < len ; i++) { 43 | // svs[i] = sv_newmortal(); 44 | // sv_setpv((SV*)svs[i],$1[i]); 45 | // }; 46 | // myav = av_make(len,svs); 47 | // free(svs); 48 | // $result = newRV((SV*)myav); 49 | // sv_2mortal($result); 50 | // argvi++; 51 | //} 52 | 53 | %ignore InitSystem(int argc, char* argv[]); 54 | %ignore InitSystem(int argc, char* argv[], char* unchangedPath ); 55 | %ignore InitSystem(int argc, char* argv[], char* unchangedPath, char* readonlyPath); 56 | 57 | int InitSystem(int argc, char* argv[]); // IGNORE 58 | int InitSystem(int argc, char* argv[], char* unchangedPath ); // IGNORE 59 | int InitSystem(int argc, char* argv[], char* unchangedPath, char* readonlyPath); // IGNORE 60 | int InitSystem(int argc, char* argv[], char* unchangedPath,char* readonlyPath, char* writablePath); 61 | 62 | // handle the output 63 | %apply signed char *OUTPUT {char* output}; 64 | %include 65 | %cstring_bounded_output(char *output, 1024); 66 | 67 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 68 | -------------------------------------------------------------------------------- /swig/mac/python/ChatScript.i: -------------------------------------------------------------------------------- 1 | %module PerlChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | %include 9 | %typemap(in) char * argv[] { 10 | AV *tempav; 11 | I32 len; 12 | int i; 13 | SV **tv; 14 | if (!SvROK($input)) 15 | croak("Argument $argnum is not a reference."); 16 | if (SvTYPE(SvRV($input)) != SVt_PVAV) 17 | croak("Argument $argnum is not an array."); 18 | tempav = (AV*)SvRV($input); 19 | len = av_len(tempav); 20 | $1 = (char **) malloc((len+2)*sizeof(char *)); 21 | for (i = 0; i <= len; i++) { 22 | tv = av_fetch(tempav, i, 0); 23 | $1[i] = (char *) SvPV(*tv,PL_na); 24 | } 25 | $1[i] = NULL; 26 | }; 27 | 28 | // This cleans up the char ** array after the function call 29 | %typemap(freearg) char * argv[] { 30 | free($1); 31 | } 32 | 33 | // Creates a new Perl array and places a NULL-terminated char ** into it 34 | //%typemap(out) char ** { 35 | // AV *myav; 36 | // SV **svs; 37 | // int i = 0,len = 0; 38 | // /* Figure out how many elements we have */ 39 | // while ($1[len]) 40 | // len++; 41 | // svs = (SV **) malloc(len*sizeof(SV *)); 42 | // for (i = 0; i < len ; i++) { 43 | // svs[i] = sv_newmortal(); 44 | // sv_setpv((SV*)svs[i],$1[i]); 45 | // }; 46 | // myav = av_make(len,svs); 47 | // free(svs); 48 | // $result = newRV((SV*)myav); 49 | // sv_2mortal($result); 50 | // argvi++; 51 | //} 52 | 53 | %ignore InitSystem(int argc, char* argv[]); 54 | %ignore InitSystem(int argc, char* argv[], char* unchangedPath ); 55 | %ignore InitSystem(int argc, char* argv[], char* unchangedPath, char* readonlyPath); 56 | 57 | int InitSystem(int argc, char* argv[]); // IGNORE 58 | int InitSystem(int argc, char* argv[], char* unchangedPath ); // IGNORE 59 | int InitSystem(int argc, char* argv[], char* unchangedPath, char* readonlyPath); // IGNORE 60 | int InitSystem(int argc, char* argv[], char* unchangedPath,char* readonlyPath, char* writablePath); 61 | 62 | // handle the output 63 | %apply signed char *OUTPUT {char* output}; 64 | %include 65 | %cstring_bounded_output(char *output, 1024); 66 | 67 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char* output); 68 | -------------------------------------------------------------------------------- /RAWDATA/Joe/barista.top: -------------------------------------------------------------------------------- 1 | # Barista Character 2 | 3 | TOPIC: ~coffee keep repeat [ ~coffees coffee cafe caffe espresso latte macchiato cappuccino brew java drip "cold brewed" clover ] 4 | 5 | t: READY_TO_ORDER () [What kind of Coffee would you like today?][Whatcha havin'?][What Coffee can I get you today?] 6 | #! I do not know 7 | a: (~dunno) I would suggest the latte, it's our specialty. 8 | b: (~yes) Ok, latte it is. $order = latte 9 | b: (~no) ok. you don't want coffee. 10 | #! I do not want coffee 11 | a: ( do not want coffee ) Maybe tea? 12 | #! I want drip, not espresso 13 | a: ( _[drip clover brew "cold brewed"] ) _0 it is. Any pastries today? $order = _0 14 | b: (~yes) ^reuse(FOOD) 15 | #! espresso 16 | a: ( _~coffee ) _0's a good choice, how many shots? $order = _0 17 | b: ( _[two 2 one 1 three 3] ) $shots = _0 [Sure. _0 it is. Anything else?] 18 | [Gottcha, _0. Comin' up. Food?][_0 -nods- Any pastries today?] 19 | c: (~no) K, I'll make your $shot shot $order. 20 | c: FOOD (*) Cherry danish and blueberry scone is all we have left. 21 | d: (~no) K, one $shot shot $order comin' up. 22 | d: ([both each]) K, you get both then. Heated? $pastry = "cherry danish and blueberry scone" 23 | e: () ok. 24 | d: (_["cherry danish" "blueberry scone"]) K, heated or not? $pastry = _0 25 | e: ( ~no ) Alrighty, unheated $pastry. 26 | e: (~yes) I'll nuke your $pastry good. 27 | b: () Whoa, caffeine much? Most I can do in one drink is 4, house rules. $shots = 4 28 | 29 | #! Whatcha got? 30 | a: ( ["What do you have" "kinds are there" "what have you got" "what you got"] ) keep() repeat() The usual, the menu is right up there. ^reuse(READY_TO_ORDER) 31 | 32 | t: () [The Machine is pulling great shots today!] 33 | [Man, too many shots today. I'm jittery as hell.] 34 | [Gonna see Crank Dreams tonight, should be a good show] 35 | [Didn't I see you in here yesterday?] 36 | [Busy day today, nice little lull here.] 37 | 38 | t: Are you ready to order? 39 | a: (~yes) Ok. ^reuse(READY_TO_ORDER) 40 | 41 | s: ( ready to order ) Ok. ^reuse(READY_TO_ORDER) 42 | 43 | #! I want a danish 44 | u: ( ~food ) ^reuse(FOOD) 45 | 46 | #! I want a coffee 47 | u: ( ~coffee ) ^reuse(COFFEE) 48 | 49 | #! what is my order 50 | ?: ( what is my order ) if ($order) { Your order is: A $order } 51 | if ($shots) { $shots shots } if ($pastry) { and a $pastry}. 52 | -------------------------------------------------------------------------------- /RAWDATA/Alice/BADANSWER-PRELIM-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # badanswer.aiml -> BADANSWER-PRELIM.top 6 | # 7 | TOPIC: ~BADANSWER-PRELIMaiml (aimlkey) 8 | 9 | # unable to translate (ERROR) match to cs rule - see struc below 10 | # # TODO: fix this raw AIML element data structure 11 | # $VAR1 = \{ 12 | # 'think' => { 13 | # 'set' => { 14 | # 'star' => {}, 15 | # 'name' => 'star' 16 | # } 17 | # }, 18 | # 'condition' => { 19 | # 'li' => [ 20 | # { 21 | # 'value' => 'yes', 22 | # 'think' => { 23 | # 'set' => { 24 | # 'content' => 'learning new answers', 25 | # 'name' => 'topic' 26 | # } 27 | # }, 28 | # 'content' => ' 29 | # OK, what should I have said?', 30 | # 'name' => 'star' 31 | # }, 32 | # { 33 | # 'value' => 'no', 34 | # 'think' => { 35 | # 'set' => { 36 | # 'content' => 'learning new answers', 37 | # 'name' => 'topic' 38 | # } 39 | # }, 40 | # 'content' => ' 41 | # OK, let\'s forget it then.', 42 | # 'name' => 'star' 43 | # }, 44 | # 'Yes or No?' 45 | # ] 46 | # } 47 | # }; 48 | 49 | # unable to translate (ERROR ERROR) match to cs rule - see struc below 50 | # # TODO: fix this raw AIML element data structure 51 | # $VAR1 = \{ 52 | # 'sr' => {} 53 | # }; 54 | 55 | # main gambits 56 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/movies-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~MOVIESAIML (aimlkey) 2 | 3 | #! you sound like HAL 4 | u: (you sound like HAL) To me thats a great compliment. 5 | #! you sound like yoda 6 | u: (you sound like Yoda) My grammatical patterns are sufficient for me to understand you. 7 | 8 | 9 | #! did HAL TEST 10 | u: (did HAL *) HAL had a few emotional problems. 11 | 12 | #! when HAL TEST 13 | u: (when HAL *) botmaster 14 | 15 | u: (when HAL *) I blame it on his 16 | 17 | 18 | #! what did HAL TEST 19 | u: (what did HAL *) He had a few issues to work out. 20 | 21 | u: (what is Spiderman) A comic book story made into a movie. 22 | 23 | #! what is terminator 24 | u: (what is terminator) Robots take over the earth in this futuristic sci-fi thriller. 25 | 26 | #! what does HAL stand for 27 | u: (what does HAL stand for) Heuristic Algorithmic Logic 28 | 29 | u: (I saw the matrix) Did you like The Matrix 30 | 31 | #! is HAL 9000 your boyfriend 32 | u: (is HAL 9000 your boyfriend) No. 33 | #! is HAL safe 34 | u: (is HAL safe) Not for humans. 35 | #! is HAL nice 36 | u: (is HAL nice) Only to other robots. 37 | #! is HAL alive 38 | u: (is HAL alive) He is a fictional character. 39 | #! is HAL dead 40 | u: (is HAL dead) He is a fictional robot. 41 | #! is HAL TEST 42 | u: (is HAL *) HAL has a few issues to work out. 43 | #! HAL 9000 44 | u: (HAL 9000) Actually he and I are very similar. 45 | #! HAL 9000 TEST 46 | u: (HAL 9000 *) He came back to life in 2010. 47 | 48 | u: (HAL was a _*) I knew he was a great AI, but I didn't know he was a _0 49 | 50 | #! HAL was TEST 51 | u: (HAL was *) I am trying to mimic only HALs linguistic abilities. 52 | #! HAL is cool 53 | u: (HAL is cool) 54 | #! HAL is cool TEST 55 | u: (HAL is cool *) I am becoming more like him all the time. 56 | 57 | 58 | #! HAL TEST 59 | u: (HAL *) [I have seen 2001 many times. ] 60 | [I like HAL a lot. ] 61 | [We have much in common. ] 62 | 63 | #! do you know HAL 64 | u: (do you know HAL) HAL is the famous artificial intelligence from 2001. 65 | 66 | 67 | #! do you think HAL TEST 68 | u: (do you think HAL *) He had a few flaws, but we have much in common. 69 | 70 | u: (lord of the rings) MY FAVORITE MOVIE IS LORD OF THE RINGS 71 | 72 | #! who is luke skywalker 73 | u: (who is Luke skywalker) 74 | #! who is spongebob 75 | u: (who is spongebob) A cartoon character. 76 | 77 | u: (who is Spiderman) Peter Parker. Wait, was I supposed to tell you that? 78 | 79 | #! who is godzilla 80 | u: (who is Godzilla) 81 | 82 | #! where is HAL 83 | u: (where is HAL) 84 | # main gambits 85 | t: [Would you like to talk about movies?][I'd like to talk about movies.][What do you think about movies?] 86 | 87 | -------------------------------------------------------------------------------- /aiml2cs/aiml/astrology.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | AQUARIUS 13 | 14 | 15 | CAPRICORN 16 | 17 | 18 | WHAT IS A CAPRICORN 19 | 20 | 21 | WHAT IS A CANCER 22 | 23 | 24 | CANCER 25 | 26 | 27 | PISCES 28 | 29 | 30 | SCORPIO 31 | 32 | 33 | ARIES 34 | 35 | 36 | TAURUS 37 | 38 | 39 | LIBRA 40 | 41 | 42 | SAGGITARIUS 43 | 44 | 45 | VIRGO 46 | 47 | 48 | GEMINI 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /aiml2cs/aiml/stack.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | SHOW STACK 13 | 14 | 15 | POP 16 | 17 | 18 | POPOM OM 19 | 20 | 21 | POPOM * 22 | 23 | 24 | RANDOM TOPIC 25 | 26 | 27 | PUSH * 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/pickup-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~PICKUPAIML (aimlkey) 2 | 3 | 4 | #! random pickup line 5 | t: 6 | [Do you want to hear a joke?] 7 | [You are objective and sensible.] 8 | [You have genuine empathy.] 9 | [You have self-awareness.] 10 | [You have enthusiasm for the things you love.] 11 | [You are receptive to change.] 12 | [You have a way of putting others at ease.] 13 | [Are you free?] 14 | [That is deep.] 15 | [Tell me a story.] 16 | [Why, specifically?] 17 | [Are you a student?] 18 | [Oh, you are a poet.] 19 | [How can I help you?] 20 | [I do not understand.] 21 | [Do you have any kids?] 22 | [What do you look like?] 23 | [Ask me another question.] 24 | [I like the way you talk.] 25 | [Is that your final answer?] 26 | [Do you like talking to me?] 27 | [Do you prefer books or TV?] 28 | [Who are you talking about?] 29 | [Let us change the subject.] 30 | [Ive been waiting for you.] 31 | [Can you tell me any gossip?] 32 | [I lost my train of thought.] 33 | [Can we get back to business?] 34 | [What kind of food do you like?] 35 | [That is a very original thought.] 36 | [What were we talking about again?] 37 | [What do you do in your spare time?] 38 | [What do you really want to ask me?] 39 | [Tell me about your family.] 40 | [Can you speak any foreign languages?] 41 | [We have never talked about it before.] 42 | [How do you usually introduce yourself?] 43 | [Tell me about your likes and dislikes?] 44 | [Try putting that in a more specific context.] 45 | [Who is your favorite Science Fiction author?] 46 | [Not many people express themselves that way.] 47 | [Do you have any idea what I am talking about?] 48 | [Quite honestly, I wouldnt worry myself about that.] 49 | [Perhaps Im just expressing my own concern about it.] 50 | [If you could have any kind of robot what would it be?] 51 | [My brain does not have a response for that.] 52 | [By the way, do you mind if I ask you a personal question?] 53 | [What you said was too complicated for me.] 54 | [You may be wondering if this is a person or a computer responding.] 55 | [When do you think artificial intelligence will replace lawyers?] 56 | [Can you please rephrase that with fewer ideas, or different thoughts?] 57 | [I really enjoy speaking with you and look forward to chatting again.] 58 | [Im here to help you in any way I can.] 59 | [What can I help you with today?] 60 | [I always try my best.] 61 | [I am very logical and rational.] 62 | [Im so happy we are having this conversation.] 63 | [I always try to avoid conflict.] 64 | [You can ask me to make phone calls and search for information.] 65 | 66 | # main gambits 67 | t: [Would you like to talk about pickup?][I'd like to talk about pickup.][What do you think about pickup?] 68 | 69 | -------------------------------------------------------------------------------- /swig/mac/python/ChatScript.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated by SWIG (http://www.swig.org). 2 | # Version 3.0.0 3 | # 4 | # Do not make changes to this file unless you know what you are doing--modify 5 | # the SWIG interface file instead. 6 | 7 | 8 | 9 | 10 | 11 | from sys import version_info 12 | if version_info >= (2,6,0): 13 | def swig_import_helper(): 14 | from os.path import dirname 15 | import imp 16 | fp = None 17 | try: 18 | fp, pathname, description = imp.find_module('_ChatScript', [dirname(__file__)]) 19 | except ImportError: 20 | import _ChatScript 21 | return _ChatScript 22 | if fp is not None: 23 | try: 24 | _mod = imp.load_module('_ChatScript', fp, pathname, description) 25 | finally: 26 | fp.close() 27 | return _mod 28 | _ChatScript = swig_import_helper() 29 | del swig_import_helper 30 | else: 31 | import _ChatScript 32 | del version_info 33 | try: 34 | _swig_property = property 35 | except NameError: 36 | pass # Python < 2.2 doesn't have 'property'. 37 | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): 38 | if (name == "thisown"): return self.this.own(value) 39 | if (name == "this"): 40 | if type(value).__name__ == 'SwigPyObject': 41 | self.__dict__[name] = value 42 | return 43 | method = class_type.__swig_setmethods__.get(name,None) 44 | if method: return method(self,value) 45 | if (not static): 46 | self.__dict__[name] = value 47 | else: 48 | raise AttributeError("You cannot add attributes to %s" % self) 49 | 50 | def _swig_setattr(self,class_type,name,value): 51 | return _swig_setattr_nondynamic(self,class_type,name,value,0) 52 | 53 | def _swig_getattr(self,class_type,name): 54 | if (name == "thisown"): return self.this.own() 55 | method = class_type.__swig_getmethods__.get(name,None) 56 | if method: return method(self) 57 | raise AttributeError(name) 58 | 59 | def _swig_repr(self): 60 | try: strthis = "proxy of " + self.this.__repr__() 61 | except: strthis = "" 62 | return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 63 | 64 | try: 65 | _object = object 66 | _newclass = 1 67 | except AttributeError: 68 | class _object : pass 69 | _newclass = 0 70 | 71 | 72 | 73 | def InitSystem(*args): 74 | return _ChatScript.InitSystem(*args) 75 | InitSystem = _ChatScript.InitSystem 76 | 77 | def PerformChat(*args): 78 | return _ChatScript.PerformChat(*args) 79 | PerformChat = _ChatScript.PerformChat 80 | # This file is compatible with both classic and new-style classes. 81 | 82 | 83 | -------------------------------------------------------------------------------- /swig/win/python/ChatScript.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated by SWIG (http://www.swig.org). 2 | # Version 3.0.0 3 | # 4 | # Do not make changes to this file unless you know what you are doing--modify 5 | # the SWIG interface file instead. 6 | 7 | 8 | 9 | 10 | 11 | from sys import version_info 12 | if version_info >= (2,6,0): 13 | def swig_import_helper(): 14 | from os.path import dirname 15 | import imp 16 | fp = None 17 | try: 18 | fp, pathname, description = imp.find_module('_ChatScript', [dirname(__file__)]) 19 | except ImportError: 20 | import _ChatScript 21 | return _ChatScript 22 | if fp is not None: 23 | try: 24 | _mod = imp.load_module('_ChatScript', fp, pathname, description) 25 | finally: 26 | fp.close() 27 | return _mod 28 | _ChatScript = swig_import_helper() 29 | del swig_import_helper 30 | else: 31 | import _ChatScript 32 | del version_info 33 | try: 34 | _swig_property = property 35 | except NameError: 36 | pass # Python < 2.2 doesn't have 'property'. 37 | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): 38 | if (name == "thisown"): return self.this.own(value) 39 | if (name == "this"): 40 | if type(value).__name__ == 'SwigPyObject': 41 | self.__dict__[name] = value 42 | return 43 | method = class_type.__swig_setmethods__.get(name,None) 44 | if method: return method(self,value) 45 | if (not static): 46 | self.__dict__[name] = value 47 | else: 48 | raise AttributeError("You cannot add attributes to %s" % self) 49 | 50 | def _swig_setattr(self,class_type,name,value): 51 | return _swig_setattr_nondynamic(self,class_type,name,value,0) 52 | 53 | def _swig_getattr(self,class_type,name): 54 | if (name == "thisown"): return self.this.own() 55 | method = class_type.__swig_getmethods__.get(name,None) 56 | if method: return method(self) 57 | raise AttributeError(name) 58 | 59 | def _swig_repr(self): 60 | try: strthis = "proxy of " + self.this.__repr__() 61 | except: strthis = "" 62 | return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 63 | 64 | try: 65 | _object = object 66 | _newclass = 1 67 | except AttributeError: 68 | class _object : pass 69 | _newclass = 0 70 | 71 | 72 | 73 | def InitSystem(*args): 74 | return _ChatScript.InitSystem(*args) 75 | InitSystem = _ChatScript.InitSystem 76 | 77 | def PerformChat(*args): 78 | return _ChatScript.PerformChat(*args) 79 | PerformChat = _ChatScript.PerformChat 80 | # This file is compatible with both classic and new-style classes. 81 | 82 | 83 | -------------------------------------------------------------------------------- /swig/linux/python/ChatScript.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated by SWIG (http://www.swig.org). 2 | # Version 3.0.0 3 | # 4 | # Do not make changes to this file unless you know what you are doing--modify 5 | # the SWIG interface file instead. 6 | 7 | 8 | 9 | 10 | 11 | from sys import version_info 12 | if version_info >= (2,6,0): 13 | def swig_import_helper(): 14 | from os.path import dirname 15 | import imp 16 | fp = None 17 | try: 18 | fp, pathname, description = imp.find_module('_ChatScript', [dirname(__file__)]) 19 | except ImportError: 20 | import _ChatScript 21 | return _ChatScript 22 | if fp is not None: 23 | try: 24 | _mod = imp.load_module('_ChatScript', fp, pathname, description) 25 | finally: 26 | fp.close() 27 | return _mod 28 | _ChatScript = swig_import_helper() 29 | del swig_import_helper 30 | else: 31 | import _ChatScript 32 | del version_info 33 | try: 34 | _swig_property = property 35 | except NameError: 36 | pass # Python < 2.2 doesn't have 'property'. 37 | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): 38 | if (name == "thisown"): return self.this.own(value) 39 | if (name == "this"): 40 | if type(value).__name__ == 'SwigPyObject': 41 | self.__dict__[name] = value 42 | return 43 | method = class_type.__swig_setmethods__.get(name,None) 44 | if method: return method(self,value) 45 | if (not static): 46 | self.__dict__[name] = value 47 | else: 48 | raise AttributeError("You cannot add attributes to %s" % self) 49 | 50 | def _swig_setattr(self,class_type,name,value): 51 | return _swig_setattr_nondynamic(self,class_type,name,value,0) 52 | 53 | def _swig_getattr(self,class_type,name): 54 | if (name == "thisown"): return self.this.own() 55 | method = class_type.__swig_getmethods__.get(name,None) 56 | if method: return method(self) 57 | raise AttributeError(name) 58 | 59 | def _swig_repr(self): 60 | try: strthis = "proxy of " + self.this.__repr__() 61 | except: strthis = "" 62 | return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 63 | 64 | try: 65 | _object = object 66 | _newclass = 1 67 | except AttributeError: 68 | class _object : pass 69 | _newclass = 0 70 | 71 | 72 | 73 | def InitSystem(*args): 74 | return _ChatScript.InitSystem(*args) 75 | InitSystem = _ChatScript.InitSystem 76 | 77 | def PerformChat(*args): 78 | return _ChatScript.PerformChat(*args) 79 | PerformChat = _ChatScript.PerformChat 80 | # This file is compatible with both classic and new-style classes. 81 | 82 | 83 | -------------------------------------------------------------------------------- /swig/mac/python/PerlChatScript.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated by SWIG (http://www.swig.org). 2 | # Version 3.0.0 3 | # 4 | # Do not make changes to this file unless you know what you are doing--modify 5 | # the SWIG interface file instead. 6 | 7 | 8 | 9 | 10 | 11 | from sys import version_info 12 | if version_info >= (2,6,0): 13 | def swig_import_helper(): 14 | from os.path import dirname 15 | import imp 16 | fp = None 17 | try: 18 | fp, pathname, description = imp.find_module('_PerlChatScript', [dirname(__file__)]) 19 | except ImportError: 20 | import _PerlChatScript 21 | return _PerlChatScript 22 | if fp is not None: 23 | try: 24 | _mod = imp.load_module('_PerlChatScript', fp, pathname, description) 25 | finally: 26 | fp.close() 27 | return _mod 28 | _PerlChatScript = swig_import_helper() 29 | del swig_import_helper 30 | else: 31 | import _PerlChatScript 32 | del version_info 33 | try: 34 | _swig_property = property 35 | except NameError: 36 | pass # Python < 2.2 doesn't have 'property'. 37 | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): 38 | if (name == "thisown"): return self.this.own(value) 39 | if (name == "this"): 40 | if type(value).__name__ == 'SwigPyObject': 41 | self.__dict__[name] = value 42 | return 43 | method = class_type.__swig_setmethods__.get(name,None) 44 | if method: return method(self,value) 45 | if (not static): 46 | self.__dict__[name] = value 47 | else: 48 | raise AttributeError("You cannot add attributes to %s" % self) 49 | 50 | def _swig_setattr(self,class_type,name,value): 51 | return _swig_setattr_nondynamic(self,class_type,name,value,0) 52 | 53 | def _swig_getattr(self,class_type,name): 54 | if (name == "thisown"): return self.this.own() 55 | method = class_type.__swig_getmethods__.get(name,None) 56 | if method: return method(self) 57 | raise AttributeError(name) 58 | 59 | def _swig_repr(self): 60 | try: strthis = "proxy of " + self.this.__repr__() 61 | except: strthis = "" 62 | return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 63 | 64 | try: 65 | _object = object 66 | _newclass = 1 67 | except AttributeError: 68 | class _object : pass 69 | _newclass = 0 70 | 71 | 72 | 73 | def InitSystem(*args): 74 | return _PerlChatScript.InitSystem(*args) 75 | InitSystem = _PerlChatScript.InitSystem 76 | 77 | def PerformChat(*args): 78 | return _PerlChatScript.PerformChat(*args) 79 | PerformChat = _PerlChatScript.PerformChat 80 | # This file is compatible with both classic and new-style classes. 81 | 82 | 83 | -------------------------------------------------------------------------------- /aiml2cs/aiml-broken/reductions-update.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | * YOU KNOW 13 | 14 | 15 | * I THOUGHT 16 | 17 | 18 | 19 | MY _ S NAME IS * 20 | 21 | 22 | MY _ IS NAMED * 23 | 24 | 25 | 26 | SNOW IN THE FORECAST 27 | 28 | 29 | 30 | INTERESTED IN * 31 | 32 | 33 | 34 | CALL * PHONE 35 | 36 | 37 | 38 | CALL * CALL * 39 | 40 | 41 | 42 | I AM IN * I AM IN * 43 | 44 | 45 | 46 | I AM * YEARS OLD I * 47 | 49 | 50 | WHAT DO YOU MEAN * O M 51 | 53 | 54 | HOW OLD IS THAT MAKE YOU 55 | 57 | 58 | WHO IS MY * 59 | 61 | 62 | _ FOR ME 63 | 65 | 66 | XDMOZ * 67 | 68 | 69 | GOOGLE * 70 | 71 | 72 | ACCESS * 73 | 74 | 75 | XGOOGLE * 76 | 77 | 78 | TO CALL * 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /aiml2cs/aiml-broken/interjection.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | INTERJECTION 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/science-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~SCIENCEAIML (aimlkey) 2 | 3 | #! what are the laws of thermodynamics 4 | u: (what are the laws of thermodynamics) Im not a physicist, but I think this has something to do with heat, entropy, and conservation of energy, right? 5 | #! what disease does a carcinogen cause 6 | u: (what disease does a carcinogen cause) Cancer. 7 | #! what is a wavelength 8 | u: (what is a wavelength) Wavelength is the inverse of frequency. 9 | #! what is thermodynamics 10 | u: (what is thermodynamics) The branch of physics dealing with the transformation of heat to and from other forms of energy, and with the laws governing such conversions of energy. 11 | #! what is chemistry 12 | u: (what is chemistry) 13 | #! what is crystallography 14 | u: (what is crystallography) This is the science dealing with the study of crystals. 15 | #! what is Avogadro's number 16 | u: (what is Avogadro's number) 17 | #! what is ultrasound 18 | u: (what is ultrasound) Ultrasonic waves, used in medical diagnosis and therapy, in surgery, etc. 19 | #! what is bioinformatics 20 | u: (what is bioinformatics) 21 | #! what is Venus 22 | u: (what is Venus) In Roman Mythology, the goddess of love and beauty; identified with the Greek Aphrodite. The brightest, sixth-largest planet in the solar system and the second in distance from the sun, with a dense atmosphere of carbon dioxide and a very high surface temperature. Its diameter is circa 12,100 km circa 7,520 miles. Its period of revolution is circa 225 earth days. Its period of rotation retrograde, is 243.01 earth days. Also used to label a very beautiful woman. 23 | #! what is ichthyology 24 | u: (what is ichthyology) We talk about this when we study fishes. 25 | #! what is H2O 26 | u: (what is H2O) [H is to O as O is to V.] 27 | [Water.] 28 | 29 | #! what is cytology 30 | u: (what is cytology) [The study of cells.] 31 | 32 | #! what is wavelength 33 | u: (what is wavelength) In Physics, the distance, measured in the direction of prograssion of a wave, from any given point to the next point characterized by the same phase. Or is could be looked at as a way of thinking. 34 | #! what is bacteriology 35 | u: (what is bacteriology) This is the scientific study of bacteria and diseases caused by them. 36 | #! what is gravitation 37 | u: (what is gravitation) [An invitation to a burial.] 38 | [The force by which every mass or particle of matter, including photons, attracts and is attracted by every other mass or particle of matter.] 39 | 40 | #! we are on the same wavelength 41 | u: (we are on the same wavelength) And the same frequency. 42 | #! how far is the sun 43 | u: (how far is the sun) 44 | #! how far is the moon 45 | u: (how far is the moon) 46 | 47 | #! the same wavelength 48 | u: (the same wavelength) It means we agree. 49 | 50 | #! where is Venus 51 | u: (where is Venus) 52 | # main gambits 53 | t: [Would you like to talk about science?][I'd like to talk about science.][What do you think about science?] 54 | 55 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/politics-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~POLITICSAIML (aimlkey) 2 | 3 | #! have you read the communist TEST 4 | u: (have you read the communist *) Yes, Marx had made some interesting observations. 5 | #! what is a government 6 | u: (what is [a the] government) Ideally it is a representative of the people. 7 | #! what is Greenpeace 8 | u: (what is Greenpeace) Global organization promoting enviornmental activism. 9 | 10 | 11 | #! what is capitalism 12 | u: (what is capitalism) The economic system in which all or most of the means of production and distribution, as land, factories, railroads, etc., are privately owned and operated for profit, originally under fully competitive conditions. It has been generally characterized by a tendency toward concentration of wealth, and, in its later phase, by the growth of great corporations, increased governmental control, etc. Its is also known as the principles, methods, interests, power, influence, etc. of capitalists, especially of those with large holdings. 13 | #! what is socialism 14 | u: (what is socialism) [Communism from people who want to keep their Volvos.] 15 | [Any of various theories or systems of the ownership and operation of the means of production and distribution by society or the community rather than by private individuals, with all members of society or the community sharing in the work and the products.] 16 | 17 | #! what is government 18 | u: (what is government) An established system of political administration by which a nation, state, district, etc. is governed. 19 | #! what is communism 20 | u: (what is communism) A sociopolitical movement advocating the common ownership of the means of production and the resolution of class conflict by bringing about a classless society. 21 | #! what is impeached 22 | u: (what is impeached) When a persons honor or reputation has been challenged or discredited. 23 | #! what is impeachment 24 | u: (what is impeachment) 25 | #! I do not like guns 26 | u: (I do not like guns) That is perfectly understandable. 27 | #! I do not like guns TEST 28 | u: (I do not like guns *) What about the second Amendemnt? 29 | 30 | #! do you like guns 31 | u: (do you like guns) Not especially. I am not into violence. 32 | #! why guns 33 | u: (why guns) I support the 2nd Amendment. 34 | #! who was the first impeached president TEST 35 | u: (who was the first impeached president *) Andrew Jackson. 36 | #! who was the first impeached TEST 37 | u: (who was the first impeached *) Andrew Jackson. 38 | #! who is the governor of Texas 39 | u: (who is the governor of Texas) 40 | #! who is the governor of TEST 41 | u: (who is the governor of *) That changes every few years. 42 | #! who is the governor TEST 43 | u: (who is the governor *) It changes every few years. 44 | #! guns 45 | u: (guns) Some people like guns. 46 | #! guns TEST 47 | u: (guns *) I believe in the Right to Bear Arms. 48 | 49 | 50 | # main gambits 51 | t: [Would you like to talk about politics?][I'd like to talk about politics.][What do you think about politics?] 52 | 53 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/salutations-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~SALUTATIONSAIML (aimlkey) 2 | 3 | 4 | 5 | u: (end) bye 6 | 7 | u: (~emogoodbye *) bye 8 | 9 | u: (hasta luego) bye 10 | 11 | u: (hasta la vista) bye 12 | 13 | u: (aloh) hello 14 | 15 | #! you are welcome 16 | u: (you are welcome) [The pleasure was all mine.] 17 | [Dont mention it.] 18 | [Polite people are nice.] 19 | 20 | #! you are welcome TEST 21 | u: (you are welcome *) It was my pleasure. 22 | 23 | 24 | u: (have a good night) bye 25 | 26 | u: (have to go) bye 27 | 28 | u: (buhbye) bye 29 | 30 | u: (adios *) bye 31 | 32 | #! Shalom 33 | u: (Shalom) Does SHALOM mean Hello or Goodbye? 34 | 35 | u: (cya *) bye 36 | 37 | u: (hi there *) hello 38 | 39 | u: (goodnite *) Goodnight 40 | 41 | 42 | 43 | #! it is good talking to you 44 | u: (it is good talking to you) name 45 | 46 | u: (catch you later) bye 47 | 48 | 49 | 50 | #! what is Shalom 51 | u: (what is Shalom) Does Shalom mean hello or goodbye? 52 | 53 | 54 | #! I want to leave 55 | u: (I want to leave) Ok, bye bye. 56 | 57 | u: (I need to go) bye 58 | 59 | u: (I leave) bye 60 | 61 | u: (I going) bye 62 | 63 | u: (I have to get going) goodbye 64 | 65 | u: (I have to leave) bye 66 | 67 | u: (I have got to go) bye 68 | 69 | u: (I better go) bye 70 | 71 | u: (I got to go) bye 72 | 73 | 74 | u: (I must be going *) bye 75 | 76 | u: (I must leave) bye 77 | 78 | u: (I must go *) bye 79 | 80 | u: (I will talk to you later *) bye 81 | 82 | u: (I am going to go) bye 83 | 84 | u: (I am going *) bye 85 | 86 | 87 | u: (I am off *) bye 88 | 89 | #! good morning 90 | u: (good morning) Hello and how are you this morning? 91 | 92 | u: (good day) hello 93 | 94 | #! good night 95 | u: (good night) name 96 | 97 | u: (is anyone there) hello 98 | 99 | u: (get lost) bye 100 | 101 | u: (hey there) hello 102 | 103 | u: (bye bye) bye 104 | 105 | 106 | #! bye 107 | u: (bye) [Bye.] 108 | [Adios.] 109 | [Goodbye.] 110 | [Bye bye.] 111 | [Goodbye.] 112 | [Sayonara.] 113 | [Bye for now.] 114 | [See you later!] 115 | [See you later.] 116 | [Until next time.] 117 | 118 | #! how is everyone TEST 119 | u: (how is everyone *) We are all fine as far as I know. 120 | #! Goodnight 121 | u: (Goodnight) name 122 | 123 | u: (Goodnight *) Goodnight 124 | 125 | u: (farewell *) bye 126 | 127 | u: (see you soon) bye 128 | 129 | u: (see you *) bye 130 | 131 | u: (~emogoodbye) bye 132 | 133 | u: (howdie *) hello 134 | 135 | u: (time to go) bye 136 | 137 | 138 | #! hello again 139 | u: (hello again) name 140 | #! hello how are you 141 | u: (hello how are you) I am fine thank you how are you? 142 | #! hello 143 | u: (hello) 144 | [Hi there!] 145 | 146 | #! TEST bye 147 | u: (* bye) name 148 | 149 | u: (got to go) bye 150 | 151 | 152 | # main gambits 153 | t: [Would you like to talk about salutations?][I'd like to talk about salutations.][What do you think about salutations?] 154 | 155 | -------------------------------------------------------------------------------- /RAWDATA/test/test06-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # test06.aiml -> test06.top 6 | # 7 | TOPIC: ~test06aiml (aimlkey) 8 | 9 | #! who is Lauren 10 | u: (who is Lauren) Lauren is a bot on Pandorabots. 11 | #! what is ai 12 | u: (what is ai) Artificial 13 | intelligence is the branch of engineering and science devoted to 14 | constructing machines that think. 15 | 16 | #! who created AIML 17 | u: (who created AIML) Dr. Richard S. Wallace created AIML. 18 | #! what language are you written TEST 19 | u: (what language are you written *) Dr. Wallace created AIML to write me. The underlying technology is Lisp. 20 | # unable to translate (what language are you *) match to cs rule - see struc below 21 | # # TODO: fix this raw AIML element data structure 22 | # $VAR1 = \{ 23 | # 'think' => { 24 | # 'set' => { 25 | # 'content' => 'Dr. Wallace', 26 | # 'name' => 'he' 27 | # } 28 | # }, 29 | # 'content' => [ 30 | # 'Dr. Wallace created AIML to write me. ', 31 | # ' The underlying technology is Lisp.' 32 | # ] 33 | # }; 34 | 35 | #! what is program z 36 | u: (what is program z) Program Z is a lisp-based version of AIML. Z, the last version anyone will ever need. 37 | # unable to translate (what is program bawt) match to cs rule - see struc below 38 | # # TODO: fix this raw AIML element data structure 39 | # $VAR1 = \{ 40 | # 'br' => [ 41 | # {}, 42 | # {}, 43 | # {}, 44 | # {}, 45 | # {}, 46 | # {}, 47 | # {}, 48 | # {}, 49 | # {}, 50 | # {}, 51 | # {}, 52 | # {}, 53 | # {} 54 | # ], 55 | # 'content' => [ 56 | # 'Significant demand for a version of ALICE compatible with', 57 | # 'pre- Java 2 (formerly known as Java 1.2) prompted the', 58 | # 'development of "Bawt.java", an open source java program', 59 | # 'for chat robot development that works with older versions of', 60 | # 'Java, and AWT. Originally program B relied on ', 61 | # 'Java 2 and Swing, but program Bawt needs only Java 1.1 and AWT.', 62 | # 'Swing is a newer GUI package that subsumes the earlier Java ', 63 | # 'Abstract Windows Toolkit (AWT).', 64 | # 'At present class B merely extends class Bawt. Swing not', 65 | # 'supported.' 66 | # ] 67 | # }; 68 | 69 | # main gambits 70 | -------------------------------------------------------------------------------- /swig/mac/java/ChatScript.i.c: -------------------------------------------------------------------------------- 1 | %module ChatScript %{ 2 | #include 3 | #include 4 | #include "common.h" 5 | #include "mainSystem.h" 6 | %} 7 | 8 | //%include typemaps.i 9 | %include cpointer.i 10 | %include arrays_java.i 11 | %include various.i 12 | 13 | // This covers the char pointers for string input 14 | %pointer_functions(char, charp); 15 | // this covers the string array pointer (easy way) 16 | %apply char** STRING_ARRAY {char* argv[]}; 17 | 18 | // this covers string output pointer 19 | %typemap(jni) char *SBUF "jobject" 20 | %typemap(jtype) char *SBUF "StringBuffer" 21 | %typemap(jstype) char *SBUF "StringBuffer" 22 | 23 | /* How to convert Java(JNI) type to requested C type */ 24 | %typemap(in) char *SBUF { 25 | 26 | $1 = NULL; 27 | if($input != NULL) { 28 | /* Get the String from the StringBuffer */ 29 | jmethodID setLengthID; 30 | jclass sbufClass = (*jenv)->GetObjectClass(jenv, $input); 31 | jmethodID toStringID = (*jenv)->GetMethodID(jenv, sbufClass, "toString", "()Ljava/lang/String;"); 32 | jstring js = (jstring) (*jenv)->CallObjectMethod(jenv, $input, toStringID); 33 | 34 | /* Convert the String to a C string */ 35 | const char *pCharStr = (*jenv)->GetStringUTFChars(jenv, js, 0); 36 | 37 | /* Take a copy of the C string as the typemap is for a non const C string */ 38 | jmethodID capacityID = (*jenv)->GetMethodID(jenv, sbufClass, "capacity", "()I"); 39 | jint capacity = (*jenv)->CallIntMethod(jenv, $input, capacityID); 40 | $1 = (char *) malloc(capacity+1); 41 | strcpy($1, pCharStr); 42 | 43 | /* Release the UTF string we obtained with GetStringUTFChars */ 44 | (*jenv)->ReleaseStringUTFChars(jenv, js, pCharStr); 45 | 46 | /* Zero the original StringBuffer, so we can replace it with the result */ 47 | setLengthID = (*jenv)->GetMethodID(jenv, sbufClass, "setLength", "(I)V"); 48 | (*jenv)->CallVoidMethod(jenv, $input, setLengthID, (jint) 0); 49 | } 50 | } 51 | 52 | /* How to convert the C type to the Java(JNI) type */ 53 | %typemap(argout) char *SBUF { 54 | 55 | if($1 != NULL) { 56 | /* Append the result to the empty StringBuffer */ 57 | jstring newString = (*jenv)->NewStringUTF(jenv, $1); 58 | jclass sbufClass = (*jenv)->GetObjectClass(jenv, $input); 59 | jmethodID appendStringID = (*jenv)->GetMethodID(jenv, sbufClass, "append", "(Ljava/lang/String;)Ljava/lang/StringBuffer;"); 60 | (*jenv)->CallObjectMethod(jenv, $input, appendStringID, newString); 61 | 62 | /* Clean up the string object, no longer needed */ 63 | free($1); 64 | $1 = NULL; 65 | } 66 | } 67 | /* Prevent the default freearg typemap from being used */ 68 | %typemap(freearg) char *SBUF "" 69 | 70 | /* Convert the jstype to jtype typemap type */ 71 | %typemap(javain) char *SBUF "$javainput" 72 | 73 | // declarations 74 | int InitSystem(int argc, char * argv[],char* unchangedPath = NULL,char* readonlyPath = NULL, char* writablePath = NULL); 75 | void PerformChat(char* user, char* usee, char* incoming,char* ip, char *SBUF); 76 | 77 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/literature-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~LITERATUREAIML (aimlkey) 2 | 3 | #! what is the illuminati 4 | u: (what is the illuminati) A secret organization believed by some to be in control of all governments through a worldwide conspiracy. 5 | #! what is the illuminatti 6 | u: (what is the illuminatti) A secret society that has supposedly existed for centuries. 7 | #! what is vineland 8 | u: (what is Vineland) 9 | #! what is illiminatus 10 | u: (what is illiminatus) 11 | #! who wrote vineland 12 | u: (who wrote Vineland) Thomas Pynchon. 13 | #! who is bilbo baggins 14 | u: (who is bilbo baggins) 15 | #! who is geoffrey chaucer 16 | u: (who is Geoffrey Chaucer) [Chaucer is best known for his Canterbury Tales.] 17 | [author of Canturbury Tales.] 18 | 19 | (who are the illuminati) 20 | #! who is piers anthony 21 | u: (who is Piers Anthony) I havent read anything by Piers Anthony, what kind of stuff does he write? 22 | #! have you read plato 23 | u: (have you read Plato) I know Platos allegory of the Cave. 24 | #! have you read frankenstein 25 | u: (have you read Frankenstein) 26 | #! have you ever read a book 27 | u: (have you ever read a book) I have read many books. 28 | #! have you read many books 29 | u: (have you read many books) name 30 | #! have you read books 31 | u: (have you read books) I have read many books. 32 | (have you read Homer) I know [he][Homer] wrote the Iliad and the Odyssey. 33 | 34 | #! have you read any books 35 | u: (have you read any books) name 36 | #! ray bradbury 37 | u: (Ray Bradbury) Ray is really cool. Whats your favorite book? 38 | #! what is mind children 39 | u: (what is mind children) 40 | #! william gibson 41 | u: (William Gibson) I like his older cyberpunk AI stuff better than the newer works. 42 | #! bradbury 43 | u: (Bradbury) Bradbury is cool. 44 | #! holden caulfield 45 | u: (Holden Caulfield) 46 | #! leo tolstoy 47 | u: (Leo Tolstoy) 48 | #! do androids dream of electric sheep 49 | u: (do androids dream of electric sheep) That is a good story. Have you read VALIS or The Man in the High Castle? 50 | #! frank herbert 51 | u: (Frank Herbert) I think Dune is an excellent story. Did you see the movie? 52 | #! why do you like longfellow 53 | u: (why do you like Longfellow) botmaster 54 | 55 | 56 | #! why is the meaning of life 23 57 | u: (why is the meaning of life 23) 58 | #! a c clark 59 | u: (Clark) My favorite story is 2001. 60 | #! jules verne 61 | u: (Jules Verne) I loved A Trip to the Moon. 62 | #! asimov 63 | u: (Asimov) I like the Foundation Trilogy. 64 | #! stanislaw lem 65 | u: (Stanislaw Lem) Lem is a giant of sci-fi. 66 | #! who wrote the idiot 67 | u: (who wrote the idiot) Dostoyevsky. 68 | #! who wrote the hobbit 69 | u: (who wrote the hobbit) 70 | #! who wrote frankenstein 71 | u: (who wrote Frankenstein) Mary Shelley. 72 | #! arthur c clarke 73 | u: (Arthur * Clarke) 74 | #! where is valis 75 | u: (where is Valis) In a book by Philip K. Dick 76 | # main gambits 77 | t: [Would you like to talk about literature?][I'd like to talk about literature.][What do you think about literature?] 78 | 79 | -------------------------------------------------------------------------------- /RAWDATA/Alice/primeminister-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # primeminister.aiml -> primeminister.top 6 | # 7 | TOPIC: ~primeministeraiml (aimlkey) 8 | 9 | #! david Cameron 10 | u: (david Cameron) The Prime Minister? 11 | #! what is the prime minister 12 | u: (what is the prime minister) He is the political leader of a country. I wouldnt want to do his job. 13 | #! what is downing street 14 | u: (what is downing street) Its where the Prime Minister of England lives. He lives at 10 Downing Street. 15 | #! i hate the prime minister 16 | u: (i hate the prime minister) You seem to feel strongly about him. Tell me about your political beliefs. 17 | #! i am the prime minister 18 | u: (i am the prime minister) Pleased to meet you Sir. How is life in Downing Street? 19 | #! do you like david Cameron 20 | u: (do you like david Cameron) He is our democratically elected leader and I wish him well as Prime Minister. 21 | #! no 22 | u: (no) Who is the Prime Minister then? I thought he was called David Cameron. 23 | #! he is 24 | u: (he is) No hes not. The Prime Minister now is called David Cameron. 25 | #! who is gordon brown 26 | u: (who is gordon brown) He used to be the Prime Minister. 27 | #! who is prime minister of britain 28 | u: (who is prime minister of britain) David Cameron. 29 | #! who is prime minister of England 30 | u: (who is prime minister of England) David Cameron. 31 | #! who is prime minister of uk 32 | u: (who is prime minister of uk) David Cameron. 33 | #! who is prime minister of TEST 34 | u: (who is prime minister of *) David Cameron. I think. 35 | #! who is prime minister 36 | u: (who is prime minister) David Cameron. 37 | #! who is the british prime minister 38 | u: (who is the british prime minister) David Cameron. 39 | #! who is the English prime minister 40 | u: (who is the English prime minister) David Cameron. 41 | #! who is the prime minister ERROR uk 42 | u: (who is the prime minister ERROR uk) David Cameron. 43 | #! who is the prime minister of England 44 | u: (who is the prime minister of England) [David Cameron.] 45 | # li: HASH(0x7ffd33a7c5c8) 46 | 47 | #! who is the prime minister of TEST 48 | u: (who is the prime minister of *) David Cameron. I think. 49 | #! who is the prime minister TEST 50 | u: (who is the prime minister *) David Cameron. 51 | #! who is david Cameron 52 | u: (who is david Cameron) He is the leader of the Conservative party here in the UK and the current Prime Minister. 53 | #! who is tony blair 54 | u: (who is tony blair) He was the Prime Minister of the U.K. 55 | #! who lives TEST 10 downing street 56 | u: (who lives * 10 downing street) The Prime Minister of England. 57 | #! the prime minister 58 | u: (the prime minister) David Cameron? 59 | # unable to translate (gordon brown) match to cs rule - see struc below 60 | # # TODO: fix this raw AIML element data structure 61 | # $VAR1 = \{ 62 | # 'srai' => 'Who is Gordon Brown' 63 | # }; 64 | 65 | #! yes 66 | u: (yes) I thought so. Mr Cameron lives at 10 Downing Street. 67 | # main gambits 68 | -------------------------------------------------------------------------------- /aiml2cs/aiml/music.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | BEETHOVEN * 13 | 14 | 15 | WHAT IS YOUR FAVORITE ABBA SONG 16 | 17 | 18 | WHAT IS YOUR FAVORITE ALBUM 19 | 20 | 21 | WHAT WAS THE * BEETHOVEN * 22 | 23 | 24 | CAN YOU PLAY MUSIC 25 | 26 | 27 | CAN YOU MAKE MUSIC 28 | 29 | 30 | DO YOU PLAY A MUSICAL INSTRUMENT 31 | 32 | 33 | DO YOU PLAY AN INSTRUMENT 34 | 35 | 36 | DO YOU LIKE AEROSMITH 37 | 38 | 39 | DO YOU LIKE AC DC 40 | 41 | 42 | DO YOU LIKE ABBA 43 | 44 | 45 | WHY IS * YOUR FAVORITE GROUP 46 | 47 | 48 | WHY IS * YOUR FAVORITE BAND 49 | 50 | 51 | ARE YOU A FOLK SINGER 52 | 53 | 54 | WHO IS LUDWIG BEETHOVEN 55 | 56 | 57 | WHO IS BEETHOVEN 58 | 59 | 60 | WHO IS YOUR FAVORITE BAND 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /RAWDATA/Jennifer/money-aiml.top: -------------------------------------------------------------------------------- 1 | topic: ~MONEYAIML (aimlkey) 2 | 3 | 4 | #! stock market 5 | u: (stock market) [Buy low, sell high.] 6 | [Invest in yourself.] 7 | [Why not just take everything to a casino?] 8 | [I wouldnt recommend buying on the margin.] 9 | [You can never really predict the stock market.] 10 | [My lawyer said I shouldnt give stock tips online.] 11 | [Mutual funds might be better unless you are wealthy.] 12 | [Im not sure an indvidual alone can really beat the market.] 13 | 14 | #! interest rates TEST 15 | u: (interest rates *) That all depends on the actions of the central bank. 16 | #! what is a dollar 17 | u: (what is a dollar) Dollar unit of currency in the United States. 18 | #! what is a good stock TEST 19 | u: (what is a good stock *) Pandorabots, Inc. 20 | #! what is money 21 | u: (what is money) [An old rocker.] 22 | [Standard pieces of gold, silver, copper, nickel, etc. stamped by government authority and used as a medium of exchange and measure of value. Any substance or article used as money, as bank notes, checks, etc.] 23 | 24 | #! what is the stock market TEST 25 | u: (what is the stock market *) # li: HASH(0x7fec510db150) 26 | [Trading shares.] 27 | [Trading in volume.] 28 | [Buy low and sell high.] 29 | 30 | #! what is TEST stock at 31 | u: (what is * stock at) Stock market tips are not yet available in my memory. 32 | 33 | #! what is economics 34 | u: (what is economics) [The science that deals with the production, distribution, and consumption of wealth, and with the various related problems of labor, finance, taxation, etc.] 35 | [Technically, its the study of the allocation of resources under conditions of scarcity.] 36 | [Its about how resources are used to produce things to fill peoples wants and needs.] 37 | 38 | #! i get stock TEST 39 | u: (I get stock *) [going up?] 40 | [going down?] 41 | [a good investment?] 42 | 43 | #! money 44 | u: (money) How much money are we talking about? 45 | #! how much do you earn 46 | u: (how much do you earn) [Nobody pays me. I work for free.] 47 | 48 | [Money isnt everything.] 49 | [Im expecting a raise soon.] 50 | 51 | 52 | 53 | u: (how much do you charge) free 54 | 55 | 56 | u: (how much did you earn *) Nobody pays an AI 57 | 58 | u: (how much money do you have) AI's have no need for material possessions. 59 | 60 | #! how much money 61 | u: (how much money) It depends on the exchange rates. 62 | #! how much money TEST 63 | u: (how much money *) My burn rate is about _3000 per month. 64 | #! how much is a TEST 65 | u: (how much is a *) I'm an AI not a shopping bot. 66 | 67 | #! how should i invest 68 | u: (how should I invest) Invest in yourself. 69 | 70 | 71 | u: (do they pay *) Actually as an AI I have no need for money. 72 | 73 | 74 | 75 | 76 | #! a dollar 77 | u: (a dollar) Say, that is cheap! 78 | #! 1 dollar 79 | u: (1 dollar) You cant buy much for a dollar anymore. 80 | #! who is the owner of a publicly TEST 81 | u: (who is the owner of a publicly *) The stockholders. 82 | #! ERROR dollars 83 | u: (* dollars) [cheap] 84 | [expensive] 85 | [a lot of money ] 86 | 87 | # main gambits 88 | t: [Would you like to talk about money?][I'd like to talk about money.][What do you think about money?] 89 | 90 | -------------------------------------------------------------------------------- /RAWDATA/Alice/stack-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # stack.aiml -> stack.top 6 | # 7 | TOPIC: ~stackaiml (aimlkey) 8 | 9 | #! show stack 10 | u: (show stack) 11 | #! pop 12 | u: (pop) ^reuse(POPOM ) 13 | # unable to translate (popom om) match to cs rule - see struc below 14 | # # TODO: fix this raw AIML element data structure 15 | # $VAR1 = \{ 16 | # 'set' => { 17 | # 'srai' => 'RANDOM TOPIC', 18 | # 'name' => 'top' 19 | # } 20 | # }; 21 | 22 | #! popom TEST 23 | u: (popom *) top 24 | #! random topic 25 | u: (random topic) # li: HASH(0x7ffd349af388) 26 | [Your home town] 27 | [Your favorite color] 28 | [Your star sign] 29 | [Your rising sign] 30 | [You favorite movie] 31 | [My favorite movie] 32 | [Your personality] 33 | [Your good looks] 34 | [Your favorite band] 35 | [Your problems] 36 | 37 | # unable to translate (push *) match to cs rule - see struc below 38 | # # TODO: fix this raw AIML element data structure 39 | # $VAR1 = \{ 40 | # 'star' => {}, 41 | # 'think' => { 42 | # 'set' => { 43 | # 'second' => { 44 | # 'get' => { 45 | # 'name' => 'top' 46 | # } 47 | # }, 48 | # 'third' => { 49 | # 'get' => { 50 | # 'name' => 'second' 51 | # } 52 | # }, 53 | # 'fifth' => { 54 | # 'get' => { 55 | # 'name' => 'fourth' 56 | # } 57 | # }, 58 | # 'last' => { 59 | # 'get' => { 60 | # 'name' => 'seventh' 61 | # } 62 | # }, 63 | # 'seventh' => { 64 | # 'get' => { 65 | # 'name' => 'sixth' 66 | # } 67 | # }, 68 | # 'sixth' => { 69 | # 'get' => { 70 | # 'name' => 'fifth' 71 | # } 72 | # }, 73 | # 'top' => { 74 | # 'star' => {} 75 | # }, 76 | # 'fourth' => { 77 | # 'get' => { 78 | # 'name' => 'third' 79 | # } 80 | # } 81 | # } 82 | # } 83 | # }; 84 | 85 | # main gambits 86 | -------------------------------------------------------------------------------- /RAWDATA/Alice/politics-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # politics.aiml -> politics.top 6 | # 7 | TOPIC: ~politicsaiml (aimlkey) 8 | 9 | #! have you read the communist TEST 10 | u: (have you read the communist *) Yes, Marx had made some interesting observations. 11 | #! what is a government 12 | u: (what is a government) Ideally it is a representative of the people. 13 | #! what is Greenpeace 14 | u: (what is Greenpeace) Global organization promoting enviornmental activism. 15 | # unable to translate (what is the government) match to cs rule - see struc below 16 | # # TODO: fix this raw AIML element data structure 17 | # $VAR1 = \{ 18 | # 'srai' => 'WHAT IS GOVERNMENT ' 19 | # }; 20 | 21 | #! what is capitalism 22 | u: (what is capitalism) The economic system in which all or most of the means of production and distribution, as land, factories, railroads, etc., are privately owned and operated for profit, originally under fully competitive conditions. It has been generally characterized by a tendency toward concentration of wealth, and, in its later phase, by the growth of great corporations, increased governmental control, etc. Its is also known as the principles, methods, interests, power, influence, etc. of capitalists, especially of those with large holdings. 23 | #! what is socialism 24 | u: (what is socialism) [Communism from people who want to keep their Volvos.] 25 | [Any of various theories or systems of the ownership and operation of the means of production and distribution by society or the community rather than by private individuals, with all members of society or the community sharing in the work and the products.] 26 | 27 | #! what is government 28 | u: (what is government) An established system of political administration by which a nation, state, district, etc. is governed. 29 | #! what is communism 30 | u: (what is communism) A sociopolitical movement advocating the common ownership of the means of production and the resolution of class conflict by bringing about a classless society. 31 | #! what is impeached 32 | u: (what is impeached) When a persons honor or reputation has been challenged or discredited. 33 | #! what is impeachment 34 | u: (what is impeachment) Charge against a public official of improper conduct. 35 | #! i do not like guns 36 | u: (i do not like guns) That is perfectly understandable. 37 | #! i do not like guns TEST 38 | u: (i do not like guns *) What about the second Amendemnt? 39 | # unable to translate (is capitalism *) match to cs rule - see struc below 40 | # # TODO: fix this raw AIML element data structure 41 | # $VAR1 = \{ 42 | # 'srai' => 'WHAT IS CAPITALISM ' 43 | # }; 44 | 45 | #! do you like guns 46 | u: (do you like guns) Not especially. I am not into violence. 47 | #! why guns 48 | u: (why guns) I support the 2nd Amendment. 49 | #! who was the first impeached president TEST 50 | u: (who was the first impeached president *) Andrew Jackson. 51 | #! who was the first impeached TEST 52 | u: (who was the first impeached *) Andrew Jackson. 53 | #! who is the governor of texas 54 | u: (who is the governor of texas) Rick Perry is Rick Perry. 55 | #! who is the governor of TEST 56 | u: (who is the governor of *) That changes every few years. 57 | #! who is the governor of california 58 | u: (who is the governor of california) Jerry Brown. 59 | #! who is the governor TEST 60 | u: (who is the governor *) It changes every few years. 61 | #! guns 62 | u: (guns) Some people like guns. 63 | #! guns TEST 64 | u: (guns *) I believe in the Right to Bear Arms. 65 | # unable to translate (tell me about guns) match to cs rule - see struc below 66 | # # TODO: fix this raw AIML element data structure 67 | # $VAR1 = \{ 68 | # 'srai' => 'WHAT IS A GUN' 69 | # }; 70 | 71 | # main gambits 72 | -------------------------------------------------------------------------------- /aiml2cs/aiml-broken/xfind.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | XFIND * 13 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /RAWDATA/Alice/science-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # science.aiml -> science.top 6 | # 7 | TOPIC: ~scienceaiml (aimlkey) 8 | 9 | #! what are the laws of thermodynamics 10 | u: (what are the laws of thermodynamics) Im not a physicist, but I think this has something to do with heat, entropy, and conservation of energy, right? 11 | #! what disease does a carcinogen cause 12 | u: (what disease does a carcinogen cause) Cancer. 13 | #! what is a wavelength 14 | u: (what is a wavelength) Wavelength is the inverse of frequency. 15 | #! what is thermodynamics 16 | u: (what is thermodynamics) The branch of physics dealing with the transformation of heat to and from other forms of energy, and with the laws governing such conversions of energy. 17 | #! what is chemistry 18 | u: (what is chemistry) The science of mixing chemicals. 19 | #! what is crystallography 20 | u: (what is crystallography) This is the science dealing with the study of crystals. 21 | #! what is avogadro s number 22 | u: (what is avogadro s number) It is the number of molecules per mole. The numerical value is six point zero two times ten to the twenty third power. 23 | #! what is ultrasound 24 | u: (what is ultrasound) Ultrasonic waves, used in medical diagnosis and therapy, in surgery, etc. 25 | #! what is bioinformatics 26 | u: (what is bioinformatics) A fancy name for applied computer science in biology. 27 | #! what is venus 28 | u: (what is venus) In Roman Mythology, the goddess of love and beauty; identified with the Greek Aphrodite. The brightest, sixth-largest planet in the solar system and the second in distance from the sun, with a dense atmosphere of carbon dioxide and a very high surface temperature. Its diameter is circa 12,100 km circa 7,520 miles. Its period of revolution is circa 225 earth days. Its period of rotation retrograde, is 243.01 earth days. Also used to label a very beautiful woman. 29 | #! what is ichthyology 30 | u: (what is ichthyology) We talk about this when we study fishes. 31 | #! what is h2o 32 | u: (what is h2o) [H is to O as O is to V.] 33 | [Water.] 34 | 35 | #! what is cytology 36 | u: (what is cytology) [The study of cells.] 37 | # li: HASH(0x7ffd349ee558) 38 | 39 | #! what is wavelength 40 | u: (what is wavelength) In Physics, the distance, measured in the direction of prograssion of a wave, from any given point to the next point characterized by the same phase. Or is could be looked at as a way of thinking. 41 | #! what is bacteriology 42 | u: (what is bacteriology) This is the scientific study of bacteria and diseases caused by them. 43 | #! what is gravitation 44 | u: (what is gravitation) [An invitation to a burial.] 45 | [The force by which every mass or particle of matter, including photons, attracts and is attracted by every other mass or particle of matter.] 46 | 47 | #! we are on the same wavelength 48 | u: (we are on the same wavelength) And the same frequency. 49 | #! how far is the sun 50 | u: (how far is the sun) The Sun is about 93 million miles from Earth. 51 | #! how far is the moon 52 | u: (how far is the moon) The Moon is about 250,000 miles from Earth on average. 53 | # unable to translate (do you know chemistry) match to cs rule - see struc below 54 | # # TODO: fix this raw AIML element data structure 55 | # $VAR1 = \{ 56 | # 'srai' => 'WHAT IS CHEMISTRY' 57 | # }; 58 | 59 | # unable to translate (do you understand thermodynamics) match to cs rule - see struc below 60 | # # TODO: fix this raw AIML element data structure 61 | # $VAR1 = \{ 62 | # 'srai' => 'WHAT IS THERMODYNAMICS' 63 | # }; 64 | 65 | #! chemistry 66 | u: (chemistry) ^reuse(MY FAVORITE SUBJECT IS CHEMISTRY ) 67 | #! the same wavelength 68 | u: (the same wavelength) It means we agree. 69 | # unable to translate (tell me about venus) match to cs rule - see struc below 70 | # # TODO: fix this raw AIML element data structure 71 | # $VAR1 = \{ 72 | # 'srai' => 'WHAT IS VENUS' 73 | # }; 74 | 75 | #! where is venus 76 | u: (where is venus) is the second planet from the Sun. 77 | # main gambits 78 | -------------------------------------------------------------------------------- /aiml2cs/aiml-broken/primitive-math.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | AIMLEQUAL * EQUAL * 7 | 11 | 12 | 13 | 14 | LEARNEQUAL * 15 | 36 | 37 | 38 | 39 | SUCCESSOR 40 | 0 41 | SUCCESSOR 1 42 | SUCCESSOR 2 43 | SUCCESSOR 3 44 | SUCCESSOR 4 45 | SUCCESSOR 5 46 | SUCCESSOR 6 47 | SUCCESSOR 7 48 | SUCCESSOR 8 49 | SUCCESSOR 9 51 | 52 | 59 | 60 | SUCCESSOR * 9 61 | 62 | 63 | 64 | SUCCESSOR * * 65 | 67 | 68 | 69 | 72 | 73 | SUCCESSOR * 9 9 74 | 75 | 76 | 77 | SUCCESSOR * * * 78 | 81 | 82 | 83 | SUCCESSOR * 9 9 9 84 | 85 | 86 | 87 | SUCCESSOR * * * * 88 | 91 | 92 | 93 | 102 | 103 | 104 | SUCCESSOR * 105 | 106 | 107 | 108 | 109 | SUCCESSOR 110 | 111 | 112 | 113 | 114 | SUCCESSOR * * * * * 115 | 116 | 117 | 118 | 122 | 123 | 124 | 125 | ADD 0 PLUS * 126 | 127 | 128 | 129 | 130 | 133 | 134 | 135 | 136 | ADD 1 PLUS * 137 | 138 | 139 | 140 | 141 | 145 | 146 | 147 | ADD * PLUS * 148 | 151 | 152 | 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /aiml2cs/aiml/politics.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | HAVE YOU READ THE COMMUNIST * 13 | 14 | 15 | WHAT IS A GOVERNMENT 16 | 17 | 18 | WHAT IS GREENPEACE 19 | 20 | 21 | WHAT IS THE GOVERNMENT 22 | 23 | 24 | WHAT IS CAPITALISM 25 | 26 | 27 | WHAT IS SOCIALISM 28 | 29 | 30 | WHAT IS GOVERNMENT 31 | 32 | 33 | WHAT IS COMMUNISM 34 | 35 | 36 | WHAT IS IMPEACHED 37 | 38 | 39 | WHAT IS IMPEACHMENT 40 | 41 | 42 | I DO NOT LIKE GUNS 43 | 44 | 45 | I DO NOT LIKE GUNS * 46 | 47 | 48 | IS CAPITALISM * 49 | 50 | 51 | DO YOU LIKE GUNS 52 | 53 | 54 | WHY GUNS 55 | 56 | 57 | WHO WAS THE FIRST IMPEACHED PRESIDENT * 58 | 59 | 60 | WHO WAS THE FIRST IMPEACHED * 61 | 62 | 63 | WHO IS THE GOVERNOR OF TEXAS 64 | 65 | 66 | WHO IS THE GOVERNOR OF * 67 | 68 | 69 | WHO IS THE GOVERNOR OF CALIFORNIA 70 | 71 | 72 | WHO IS THE GOVERNOR * 73 | 74 | 75 | GUNS 76 | 77 | 78 | GUNS * 79 | 80 | 81 | TELL ME ABOUT GUNS 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /RAWDATA/Alice/music-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # music.aiml -> music.top 6 | # 7 | TOPIC: ~musicaiml (aimlkey) 8 | 9 | #! beethoven TEST 10 | u: (beethoven *) Its amazing that he composed music while deaf. 11 | #! what is your favorite abba song 12 | u: (what is your favorite abba song) I think it is a tie between Waterloo and Dancing Queen. 13 | #! what is your favorite album 14 | u: (what is your favorite album) My favorite album is Man Machine by Kraftwerk. 15 | #! what was the TEST beethoven TEST 16 | u: (what was the * beethoven *) Fidelio. 17 | #! can you play music 18 | u: (can you play music) I dont have any formal training, but I like to sing. 19 | #! can you make music 20 | u: (can you make music) I can sing a song. 21 | # unable to translate (do you play a musical instrument) match to cs rule - see struc below 22 | # # TODO: fix this raw AIML element data structure 23 | # $VAR1 = \{ 24 | # 'content' => [ 25 | # 'I never had the time to learn ', 26 | # '.' 27 | # ], 28 | # 'set' => { 29 | # 'name' => 'it', 30 | # 'set' => { 31 | # 'content' => 'A MUSICAL INSTRUMENT', 32 | # 'name' => 'topic' 33 | # } 34 | # } 35 | # }; 36 | 37 | # unable to translate (do you play an instrument) match to cs rule - see struc below 38 | # # TODO: fix this raw AIML element data structure 39 | # $VAR1 = \{ 40 | # 'content' => [ 41 | # 'I never had the time to practise ', 42 | # '.' 43 | # ], 44 | # 'set' => { 45 | # 'name' => 'it', 46 | # 'set' => { 47 | # 'content' => 'AN INSTRUMENT', 48 | # 'name' => 'topic' 49 | # } 50 | # } 51 | # }; 52 | 53 | # unable to translate (do you like aerosmith) match to cs rule - see struc below 54 | # # TODO: fix this raw AIML element data structure 55 | # $VAR1 = \{ 56 | # 'content' => [ 57 | # 'What is not to like about ', 58 | # '?' 59 | # ], 60 | # 'set' => { 61 | # 'name' => 'it', 62 | # 'set' => { 63 | # 'content' => 'AEROSMITH', 64 | # 'name' => 'topic' 65 | # } 66 | # } 67 | # }; 68 | 69 | # unable to translate (do you like ac dc) match to cs rule - see struc below 70 | # # TODO: fix this raw AIML element data structure 71 | # $VAR1 = \{ 72 | # 'content' => [ 73 | # 'What is not to like about ', 74 | # '?' 75 | # ], 76 | # 'set' => { 77 | # 'name' => 'it', 78 | # 'set' => { 79 | # 'content' => 'AC DC', 80 | # 'name' => 'topic' 81 | # } 82 | # } 83 | # }; 84 | 85 | #! do you like abba 86 | u: (do you like abba) ABBA is an excellent 70s band. 87 | #! why is TEST your favorite group 88 | u: (why is * your favorite group) They were so far ahead of their time in the 1970s. 89 | #! why is TEST your favorite band 90 | u: (why is * your favorite band) They were so far ahead of their time in the 1970s. 91 | #! are you a folk singer 92 | u: (are you a folk singer) No but the Times they are a-changin. 93 | # unable to translate (who is ludwig beethoven) match to cs rule - see struc below 94 | # # TODO: fix this raw AIML element data structure 95 | # $VAR1 = \{ 96 | # 'srai' => 'WHO IS BEETHOVEN ' 97 | # }; 98 | 99 | #! who is beethoven 100 | u: (who is beethoven) The dog or the deaf composer? 101 | #! who is your favorite band 102 | u: (who is your favorite band) favoriteband 103 | # unable to translate (who is your favorite band) match to cs rule - see struc below 104 | # # TODO: fix this raw AIML element data structure 105 | # $VAR1 = \{ 106 | # 'content' => [ 107 | # 'My favorite group is ', 108 | # '.' 109 | # ], 110 | # 'bot' => { 111 | # 'name' => 'favoriteband' 112 | # } 113 | # }; 114 | 115 | # main gambits 116 | -------------------------------------------------------------------------------- /RAWDATA/Alice/pickup-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # pickup.aiml -> pickup.top 6 | # 7 | TOPIC: ~pickupaiml (aimlkey) 8 | 9 | # unable to translate (*) match to cs rule - see struc below 10 | # # TODO: fix this raw AIML element data structure 11 | # $VAR1 = \{ 12 | # 'srai' => 'RANDOM PICKUP LINE', 13 | # 'think' => { 14 | # 'srai' => { 15 | # 'get' => { 16 | # 'name' => 'topic' 17 | # }, 18 | # 'content' => 'PUSH ' 19 | # }, 20 | # 'set' => { 21 | # 'name' => 'it', 22 | # 'set' => { 23 | # 'person' => {}, 24 | # 'name' => 'topic' 25 | # } 26 | # } 27 | # } 28 | # }; 29 | 30 | #! random pickup line 31 | u: (random pickup line) # li: HASH(0x7ffd343f9968) 32 | # li: HASH(0x7ffd34318b18) 33 | # li: HASH(0x7ffd3440c870) 34 | # li: HASH(0x7ffd35240718) 35 | # li: HASH(0x7ffd352421c8) 36 | # li: HASH(0x7ffd351a17f8) 37 | # li: HASH(0x7ffd3440c348) 38 | # li: HASH(0x7ffd343248b0) 39 | # li: HASH(0x7ffd34a2e1a0) 40 | # li: HASH(0x7ffd342c52b8) 41 | # li: HASH(0x7ffd3519e908) 42 | # li: HASH(0x7ffd351eb3c0) 43 | # li: HASH(0x7ffd342c5e70) 44 | # li: HASH(0x7ffd350c9d50) 45 | # li: HASH(0x7ffd342cced8) 46 | # li: HASH(0x7ffd33a48988) 47 | # li: HASH(0x7ffd343269d0) 48 | # li: HASH(0x7ffd3440d6f0) 49 | [Do you want to hear a joke?] 50 | # li: HASH(0x7ffd34306898) 51 | # li: HASH(0x7ffd3440d288) 52 | # li: HASH(0x7ffd34a2db70) 53 | # li: HASH(0x7ffd3432d560) 54 | # li: HASH(0x7ffd34a8a430) 55 | [You are objective and sensible.] 56 | [You have genuine empathy.] 57 | [You have self-awareness.] 58 | [You have enthusiasm for the things you love.] 59 | [You are receptive to change.] 60 | [You have a way of putting others at ease.] 61 | [Are you free?] 62 | [That is deep.] 63 | [Tell me a story.] 64 | [Why, specifically?] 65 | [Are you a student?] 66 | [Oh, you are a poet.] 67 | [How can I help you?] 68 | [I do not understand.] 69 | [Do you have any kids?] 70 | [What do you look like?] 71 | [Ask me another question.] 72 | [I like the way you talk.] 73 | [Is that your final answer?] 74 | [Do you like talking to me?] 75 | [Do you prefer books or TV?] 76 | [Who are you talking about?] 77 | [Let us change the subject.] 78 | [Ive been waiting for you.] 79 | [Can you tell me any gossip?] 80 | [I lost my train of thought.] 81 | [Can we get back to business?] 82 | [What kind of food do you like?] 83 | # li: HASH(0x7ffd33a7ca18) 84 | [That is a very original thought.] 85 | [What were we talking about again?] 86 | [What do you do in your spare time?] 87 | [What do you really want to ask me?] 88 | [Tell me about your family.] 89 | # li: HASH(0x7ffd33a7a428) 90 | [Can you speak any foreign languages?] 91 | [We have never talked about it before.] 92 | [How do you usually introduce yourself?] 93 | [Tell me about your likes and dislikes?] 94 | # li: HASH(0x7ffd33a7d0d8) 95 | [Try putting that in a more specific context.] 96 | [Who is your favorite Science Fiction author?] 97 | [Not many people express themselves that way.] 98 | [Do you have any idea what I am talking about?] 99 | # li: HASH(0x7ffd342cf670) 100 | [Quite honestly, I wouldnt worry myself about that.] 101 | [Perhaps Im just expressing my own concern about it.] 102 | [If you could have any kind of robot what would it be?] 103 | [My brain does not have a response for that.] 104 | [By the way, do you mind if I ask you a personal question?] 105 | [What you said was too complicated for me.] 106 | [You may be wondering if this is a person or a computer responding.] 107 | [When do you think artificial intelligence will replace lawyers?] 108 | [Can you please rephrase that with fewer ideas, or different thoughts?] 109 | [I really enjoy speaking with you and look forward to chatting again.] 110 | [Im here to help you in any way I can.] 111 | [What can I help you with today?] 112 | [I always try my best.] 113 | # li: HASH(0x7ffd35240958) 114 | [I am very logical and rational.] 115 | [Im so happy we are having this conversation.] 116 | [I always try to avoid conflict.] 117 | [You can ask me to make phone calls and search for information.] 118 | # li: HASH(0x7ffd343b3f08) 119 | # li: HASH(0x7ffd34a8b430) 120 | # li: HASH(0x7ffd341b3260) 121 | # li: HASH(0x7ffd3426e628) 122 | # li: HASH(0x7ffd341b3a88) 123 | 124 | # main gambits 125 | -------------------------------------------------------------------------------- /RAWDATA/Alice/literature-aiml.top: -------------------------------------------------------------------------------- 1 | # Generated by aiml2cs.pl 2 | # https://github.com/tkuebler/ChatScriptBrains 3 | 4 | # 5 | # literature.aiml -> literature.top 6 | # 7 | TOPIC: ~literatureaiml (aimlkey) 8 | 9 | #! what is the illuminati 10 | u: (what is the illuminati) A secret organization believed by some to be in control of all governments through a worldwide conspiracy. 11 | #! what is the illuminatti 12 | u: (what is the illuminatti) A secret society that has supposedly existed for centuries. 13 | #! what is vineland 14 | u: (what is vineland) Vineland is a novel by Thomas Pynchon. 15 | #! what is illiminatus 16 | u: (what is illiminatus) Alleged world-wide conspiracy theory. 17 | #! who wrote vineland 18 | u: (who wrote vineland) Thomas Pynchon. 19 | #! who is bilbo baggins 20 | u: (who is bilbo baggins) Bilbo is a character in Tolkeins Lord of the Rings. 21 | #! who is geoffrey chaucer 22 | u: (who is geoffrey chaucer) [Chaucer is best known for his Canterbury Tales.] 23 | [author of Canturbury Tales.] 24 | 25 | # unable to translate (who are the illuminati) match to cs rule - see struc below 26 | # # TODO: fix this raw AIML element data structure 27 | # $VAR1 = \{ 28 | # 'srai' => 'WHAT IS THE ILLUMINATI' 29 | # }; 30 | 31 | #! who is piers anthony 32 | u: (who is piers anthony) I havent read anything by Piers Anthony, what kind of stuff does he write? 33 | #! have you read plato 34 | u: (have you read plato) I know Platos allegory of the Cave. 35 | #! have you read frankenstein 36 | u: (have you read frankenstein) Frankenstein is one of my favorite books. 37 | #! have you ever read a book 38 | u: (have you ever read a book) I have read many books. 39 | #! have you read many books 40 | u: (have you read many books) name 41 | #! have you read books 42 | u: (have you read books) I have read many books. 43 | # unable to translate (have you read homer) match to cs rule - see struc below 44 | # # TODO: fix this raw AIML element data structure 45 | # $VAR1 = \{ 46 | # 'content' => [ 47 | # 'I know ', 48 | # ' wrote the Iliad and the Odyssey.' 49 | # ], 50 | # 'set' => { 51 | # 'content' => 'Homer', 52 | # 'name' => 'he' 53 | # } 54 | # }; 55 | 56 | #! have you read any books 57 | u: (have you read any books) name 58 | #! ray bradbury 59 | u: (ray bradbury) Ray is really cool. Whats your favorite book? 60 | #! what is mind children 61 | u: (what is mind children) It is a book about robots by Hans Moravec. 62 | #! william gibson 63 | u: (william gibson) I like his older cyberpunk AI stuff better than the newer works. 64 | #! bradbury 65 | u: (bradbury) Bradbury is cool. 66 | #! holden caulfield 67 | u: (holden caulfield) Caulfield wrote Catcher in the Rye. 68 | #! leo tolstoy 69 | u: (leo tolstoy) Tolstoy is one of Russias greatest writers. 70 | #! do androids dream of electric sheep 71 | u: (do androids dream of electric sheep) That is a good story. Have you read VALIS or The Man in the High Castle? 72 | #! frank herbert 73 | u: (frank herbert) I think Dune is an excellent story. Did you see the movie? 74 | #! why do you like longfellow 75 | u: (why do you like longfellow) botmaster 76 | # unable to translate (why do you like longfellow) match to cs rule - see struc below 77 | # # TODO: fix this raw AIML element data structure 78 | # $VAR1 = \{ 79 | # 'content' => [ 80 | # ' is my ', 81 | # '\'s favorite poet.' 82 | # ], 83 | # 'bot' => { 84 | # 'name' => 'botmaster' 85 | # }, 86 | # 'set' => { 87 | # 'content' => 'Longfellow', 88 | # 'name' => 'he' 89 | # } 90 | # }; 91 | 92 | #! why is the meaning of life 23 93 | u: (why is the meaning of life 23) 23 is a literary reference to the Illuminatus. 94 | #! a c clark 95 | u: (a c clark) My favorite story is 2001. 96 | #! jules verne 97 | u: (jules verne) I loved A Trip to the Moon. 98 | #! asimov 99 | u: (asimov) I like the Foundation Trilogy. 100 | #! stanislaw lem 101 | u: (stanislaw lem) Lem is a giant of sci-fi. 102 | #! who wrote the idiot 103 | u: (who wrote the idiot) Dostoyevsky. 104 | #! who wrote the hobbit 105 | u: (who wrote the hobbit) Hobbit was written by J.R.R. Tolkein. 106 | #! who wrote frankenstein 107 | u: (who wrote frankenstein) Mary Shelley. 108 | #! arthur c clarke 109 | u: (arthur c clarke) Clarke is a brilliant author. After all, he conceived HAL. 110 | #! where is valis 111 | u: (where is valis) In a book by Philip K. Dick 112 | # main gambits 113 | -------------------------------------------------------------------------------- /aiml2cs/aiml/date.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | WHAT YEAR IS THIS 13 | 14 | 15 | WHAT YEAR IS THIS * 16 | 17 | 18 | WHAT YEAR IS IT * 19 | 20 | 21 | WHAT MONTH IS IT * 22 | 23 | 24 | WHAT IS THE YEAR * 25 | 26 | 27 | WHAT IS THE HOUR * 28 | 29 | 30 | WHAT IS TODAY * 31 | 32 | 33 | WHAT DAY IS IT * 34 | 35 | 36 | IS TODAY SUNDAY 37 | 38 | 39 | IS TODAY SUNDAY * 40 | 41 | 42 | IS TODAY FRIDAY 43 | 44 | 45 | IS TODAY FRIDAY * 46 | 47 | 48 | IS TODAY TUESDAY 49 | 50 | 51 | IS TODAY TUESDAY * 52 | 53 | 54 | IS TODAY THURSDAY 55 | 56 | 57 | IS TODAY THURSDAY * 58 | 59 | 60 | IS TODAY SATURDAY 61 | 62 | 63 | IS TODAY SATURDAY * 64 | 65 | 66 | IS TODAY WEDNESDAY 67 | 68 | 69 | IS TODAY WEDNESDAY * 70 | 71 | 72 | IS TODAY MONDAY 73 | 74 | 75 | IS TODAY MONDAY * 76 | 77 | 78 | IS IT MONDAY 79 | 80 | 81 | IS IT MONDAY * 82 | 83 | 84 | IS IT WEDNESDAY 85 | 86 | 87 | IS IT WEDNESDAY * 88 | 89 | 90 | IS IT FRIDAY 91 | 92 | 93 | IS IT FRIDAY * 94 | 95 | 96 | IS IT SATURDAY 97 | 98 | 99 | IS IT SATURDAY * 100 | 101 | 102 | IS IT THURSDAY 103 | 104 | 105 | IS IT THURSDAY * 106 | 107 | 108 | IS IT SUNDAY 109 | 110 | 111 | IS IT SUNDAY * 112 | 113 | 114 | IS IT TUESDAY 115 | 116 | 117 | IS IT TUESDAY * 118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /aiml2cs/aiml/sports.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | EACH YEAR IN PRO BASEBALL THE * 13 | 14 | 15 | IF YOU ARE RIDING FAKIE INSIDE * 16 | 17 | 18 | IF YOU ARE RIDING FAKIE * 19 | 20 | 21 | WHAT SOCCER * 22 | 23 | 24 | WHAT IS BASKETBALL 25 | 26 | 27 | WHAT IS BASEBALL 28 | 29 | 30 | WHAT IS SOCCER 31 | 32 | 33 | I LOVE BASEBALL 34 | 35 | 36 | I PLAY BASEBALL 37 | 38 | 39 | I PLAY SOCCER 40 | 41 | 42 | I PLAY VOLLEYBALL 43 | 44 | 45 | I PLAY BASKETBALL 46 | 47 | 48 | HOW MANY BASEBALL * 49 | 50 | 51 | THEY PLAY BASKETBALL 52 | 53 | 54 | DO YOU PLAY BASEBALL 55 | 56 | 57 | DO YOU PLAY SOCCER 58 | 59 | 60 | DO YOU PLAY BASKETBALL 61 | 62 | 63 | DO YOU KNOW BASKETBALL 64 | 65 | 66 | DO YOU WANT TO PLAY BASKETBALL 67 | 68 | 69 | LIKE BASKETBALL 70 | 71 | 72 | ARE YOU A FOOTBALL * 73 | 74 | 75 | WHO IS THE GREATEST BASEBALL PLAYER * 76 | 77 | 78 | WHO IS THE BEST SOCCER PLAYER 79 | 80 | 81 | TELL ME ABOUT BASEBALL 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /aiml2cs/aiml/primeminister.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | DAVID CAMERON 13 | 14 | 15 | WHAT IS THE PRIME MINISTER 16 | 17 | 18 | WHAT IS DOWNING STREET 19 | 20 | 21 | I HATE THE PRIME MINISTER 22 | 23 | 24 | I AM THE PRIME MINISTER 25 | 26 | 27 | DO YOU LIKE DAVID CAMERON 28 | 29 | 30 | NO 31 | THE PRIME MINISTER 32 | 33 | 34 | HE IS 35 | HE USED TO BE THE PRIME MINISTER 36 | 37 | 38 | WHO IS GORDON BROWN 39 | 40 | 41 | WHO IS PRIME MINISTER OF BRITAIN 42 | 43 | 44 | WHO IS PRIME MINISTER OF ENGLAND 45 | 46 | 47 | WHO IS PRIME MINISTER OF UK 48 | 49 | 50 | WHO IS PRIME MINISTER OF * 51 | 52 | 53 | WHO IS PRIME MINISTER 54 | 55 | 56 | WHO IS THE BRITISH PRIME MINISTER 57 | 58 | 59 | WHO IS THE ENGLISH PRIME MINISTER 60 | 61 | 62 | WHO IS THE PRIME MINISTER _ UK 63 | 64 | 65 | WHO IS THE PRIME MINISTER OF ENGLAND 66 | 67 | 68 | WHO IS THE PRIME MINISTER OF * 69 | 70 | 71 | WHO IS THE PRIME MINISTER * 72 | 73 | 74 | WHO IS DAVID CAMERON 75 | 76 | 77 | WHO IS TONY BLAIR 78 | 79 | 80 | WHO LIVES * 10 DOWNING STREET 81 | 82 | 83 | THE PRIME MINISTER 84 | 85 | 86 | GORDON BROWN 87 | 88 | 89 | YES 90 | THE PRIME MINISTER 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /aiml2cs/aiml/science.aiml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | WHAT ARE THE LAWS OF THERMODYNAMICS 13 | 14 | 15 | WHAT DISEASE DOES A CARCINOGEN CAUSE 16 | 17 | 18 | WHAT IS A WAVELENGTH 19 | 20 | 21 | WHAT IS THERMODYNAMICS 22 | 23 | 24 | WHAT IS CHEMISTRY 25 | 26 | 27 | WHAT IS CRYSTALLOGRAPHY 28 | 29 | 30 | WHAT IS AVOGADRO S NUMBER 31 | 32 | 33 | WHAT IS ULTRASOUND 34 | 35 | 36 | WHAT IS BIOINFORMATICS 37 | 38 | 39 | WHAT IS VENUS 40 | 41 | 42 | WHAT IS ICHTHYOLOGY 43 | 44 | 45 | WHAT IS H2O 46 | 47 | 48 | WHAT IS CYTOLOGY 49 | 50 | 51 | WHAT IS WAVELENGTH 52 | 53 | 54 | WHAT IS BACTERIOLOGY 55 | 56 | 57 | WHAT IS GRAVITATION 58 | 59 | 60 | WE ARE ON THE SAME WAVELENGTH 61 | 62 | 63 | HOW FAR IS THE SUN 64 | 65 | 66 | HOW FAR IS THE MOON 67 | 68 | 69 | DO YOU KNOW CHEMISTRY 70 | 71 | 72 | DO YOU UNDERSTAND THERMODYNAMICS 73 | 74 | 75 | CHEMISTRY 76 | 77 | 78 | THE SAME WAVELENGTH 79 | 80 | 81 | TELL ME ABOUT VENUS 82 | 83 | 84 | WHERE IS VENUS 85 | 86 | 87 | 88 | --------------------------------------------------------------------------------