AIML 2.0 Artificial Intelligence Markup Language Hà Nội 2013 Overview AIML • • • • Chatbot open source AIML 1.0 – 2001 AIML 2.0 – 2013 https://docs.google.com/document/d/1wNT25hJRyupc G51aO89UcQEiG-HkXRXusukADpFnDs4/pub BOT Categories Minimum believable character 10.000 Alice 100.000 Mitsuku 250.000 Professor (Chomsky) 580.000 Overview New app - AIML 2.0 technology AIML 2.0 The most important units of AIML • <aiml>: the tag that begins and ends an AIML document • <category>: the tag that marks a "unit of knowledge" in an Alicebot's knowledge base • <pattern>: used to contain a simple pattern that matches what a user may say or type to an Alicebot • <template>: contains the response to a user input <category> <pattern>WHAT IS YOUR NAME</pattern> <template>My name is John.</template> </category> AIML 2.0 What’s new AIML 2.0 • • • • • • • • • Zero+ wildcards: new wildcards that match 0 or more words. Highest priority matching: select certain words to have top matching priority. Migrating from attributes to tags: more dynamic control of attribute values. AIML Sets: match inputs with sets of words and phrases. AIML Maps: map set elements to members of other sets. Loops: Iterations in conditional expressions. Local variables: variables with scope limited to one category. Sraix: access external web services and other Pandorabots. Pandorabots extensions – – – – – – – • date: formatted date and time. request: access previous input request history. response: access previous bot response history. unbound predicates: check if a predicate has been set or not. learn: learn new AIML categories. learnf: learn new AIML categories and save in a file. explode: split words and phrases into individual characters. OOB (Out of Band) Tags: AIML extension for mobile device control AIML 2.0 Zero + Wildcards • • • • • • • • • • • • • <category><pattern>SHARPTEST #</pattern> <template>#star = <star/></template> </category> <category><pattern>SHARPTEST # TEST</pattern> <template>#star = <star/></template> </category> <category><pattern># KEYWORD #</pattern> <template>Found KEYWORD</template> </category> <category><pattern>^ CARETTEST</pattern> <template>^star = <star/></template> </category> AIML 2.0 Set and Map in AIML <category> <pattern>WHAT IS THE CAPITAL OF <set>state </set></pattern> <template> The capital of <star/> is <map> <name>statecapital</name> <star/> </map></template> </category> Vietnam:Hanoi Ex: Ghana:Accra What is the capital of Vietnam ? The capital of Vietnam is Hanoi https://docs.google.com/document/d/1DWHiOOcda58CflDZ0Wsm1CgP3Es6dp icb4MBbbpwzEk/pub AIML 2.0 Folder & AIMLIF 0,Bạn đang làm ở đâu *,*,*,<srai>WORK</srai>,reductions1.aiml 0,Bạn đang làm việc ở đâu *,*,*,<srai>WORK</srai>,reductions1.aiml 0,Bạn được chế tạo ở đâu *,*,*,<srai>NATIONALITY</srai>,reductions1.aiml 0,Ai chế tạo ra bạn *,*,*,<srai>BOTMASTER</srai>,reductions1.aiml References • https://code.google.com/p/aiml-en-us-pandorabotscallmom/downloads/list • http://www.alicebot.org/aiml.html • http://pandorabots.com/botmaster/en/home • http://callmom.pandorabots.com/static/callmom/index.html • http://www.pandorabots.com/pandora/pics/wallaceaimltutorial.html • http://en.wikipedia.org/wiki/AIML