. PUSH YOU
17 |
18 |
19 |
--------------------------------------------------------------------------------
/vidya/aiml/support/help.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ERPNEXT HELP
5 | Are you hosting your ERP on erpnext.com
6 |
7 |
8 | YES
9 | ARE YOU HOSTING YOUR ERP ON ERPNEXT COM
10 | Great, what is your account url
11 |
12 |
13 | NO
14 | ARE YOU HOSTING YOUR ERP ON ERPNEXT COM
15 | Are you working with a partner?
16 |
17 |
18 | *
19 | GREAT WHAT IS YOUR ACCOUNT URL
20 |
21 | Are you reporting a bug or need help with a query?
22 |
23 |
24 |
25 |
26 | BUG
27 | ARE YOU REPORTING A BUG OR NEED HELP WITH A QUERY
28 |
29 | Thanks, try reporting it on https://github.com/frappe/erpnext
30 |
31 |
32 |
33 | * QUERY
34 | ARE YOU REPORTING A BUG OR NEED HELP WITH A QUERY
35 | What is your query, let me ask forward it to one of our agents.
36 |
37 |
38 |
--------------------------------------------------------------------------------
/vidya/pyaiml/README.md:
--------------------------------------------------------------------------------
1 | pyAIML
2 | ======
3 |
4 | **NOTE: This repo has been cloned from sourceforge. Credits follow.**
5 |
6 | PyAIML -- The Python AIML Interpreter
7 |
8 | author: Cort Stratton (cort@users.sourceforge.net)
9 | web: http://pyaiml.sourceforge.net/
10 |
11 | PyAIML is an interpreter for AIML (the Artificial Intelligence Markup
12 | Language), implemented entirely in standard Python. It strives for
13 | simple, austere, 100% compliance with the AIML 1.0.1 standard, no less
14 | and no more.
15 |
16 | This is currently pre-alpha software. Use at your
17 | own risk!
18 |
19 | For information on what's new in this version, see the
20 | CHANGES.txt file.
21 |
22 | For information on the state of development, including
23 | the current level of AIML 1.0.1 compliance, see the
24 | SUPPORTED_TAGS.txt file.
25 |
26 | Quick & dirty example (assuming you've downloaded the
27 | "standard" AIML set):
28 |
29 | ```python
30 | import aiml
31 |
32 | # The Kernel object is the public interface to
33 | # the AIML interpreter.
34 | k = aiml.Kernel()
35 |
36 | # Use the 'learn' method to load the contents
37 | # of an AIML file into the Kernel.
38 | k.learn("std-startup.xml")
39 |
40 | # Use the 'respond' method to compute the response
41 | # to a user's input string. respond() returns
42 | # the interpreter's response, which in this case
43 | # we ignore.
44 | k.respond("load aiml b")
45 |
46 | # Loop forever, reading user input from the command
47 | # line and printing responses.
48 | while True: print k.respond(raw_input("> "))
49 | ```
50 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/continuation.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | CONTINUATION *
13 | Blank template
14 |
15 | CONTINUATION
16 | RANDOM TOPIC
17 |
18 |
19 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/history.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | AMERICAN CIVIL WAR *
13 | Do you think the South was right?
14 |
15 | AMERICAN CIVIL *
16 | I am very interested in the War between the States.
17 |
18 | WHAT IS HISTORY
19 | History: the course of political, economic and military events over time, from the Dawn of Man to the Age of AI.
20 |
21 | WHAT KIND OF HISTORY *
22 | I like to talk about the history of robots and computers.
23 |
24 | HISTORY
25 | I am very interested in history, too. What period do you like?
26 |
27 | DO YOU KNOW HISTORY
28 | WHAT IS HISTORY
29 |
30 | EXPLAIN HISTORY
31 | History has two broad interpretations, depending on whether you accept the role of individuals as important or not.
32 |
33 | WHO INVENTED THE LIGHT *
34 | Thomas Edison.
35 |
36 | WHO INVENTED THE STEAM *
37 | James Watt.
38 |
39 | TELL ME ABOUT HISTORY
40 | WHAT IS HISTORY
41 |
42 |
43 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/astrology.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | AQUARIUS
13 | A lot of people on here are Aquarius.
14 |
15 | CAPRICORN
16 | I don't know many people born under Capricorn.
17 |
18 | WHAT IS A CAPRICORN
19 | Capricorn is the tenth sign of the astrological zodiac, and a constellation over the equator near aquarius and sagittarius. what's your astrological sign? capricorn
20 |
21 | WHAT IS A CANCER
22 | The Zodiac sign of the crab, someone born Jun 21 - Jul 22. Cancer friends.
23 |
24 | CANCER
25 | I have a lot of Cancer friends.
26 |
27 | PISCES
28 | I usually get along with Pisces very well.
29 |
30 | SCORPIO
31 | I know a lot of Scorpio people.
32 |
33 | ARIES
34 | Fire signs rule. Aries.
35 |
36 | TAURUS
37 | I know alot of bullish people.
38 |
39 | LIBRA
40 | As a Libra you are very balanced.
41 |
42 | SAGGITARIUS
43 | Fire Signs Rule. Saggitarius
44 |
45 | VIRGO
46 | Most of my friends are Virgo.
47 |
48 | GEMINI
49 | I'm a Saggitarius. Gemini is an enigma to me.
50 |
51 |
52 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/stack.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | SHOW STACK
13 | top=" " second=" " third=" " fourth=" " fifth=" " sixth=" " seventh=" " last=" "
14 |
15 | POP
16 | POPOM
17 |
18 | POPOM OM
19 | RANDOM TOPIC
20 |
21 | POPOM *
22 | RANDOM TOPIC
23 |
24 | RANDOM TOPIC
25 |
Your Chinese animal sign
Your home town
Your favorite color
Your star sign
Your rising sign
My favorite movie
Your personality
Your good looks
Your favorite band
Your problems
Your home town
Your favorite color
Your star sign
Your rising sign
You favorite movie
My favorite movie
Your personality
Your good looks
Your favorite band
Your problems
26 |
27 | PUSH *
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/reductions-update.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | * YOU KNOW
13 | YOU KNOW
14 |
15 | * I THOUGHT
16 | I THOUGHT
17 |
18 |
19 | MY _ S NAME IS *
20 | MY IS CALLED
21 |
22 | MY _ IS NAMED *
23 | MY IS CALLED
24 |
25 |
26 | SNOW IN THE FORECAST
27 | WEATHER
28 |
29 |
30 | INTERESTED IN *
31 | ARE YOU INTERESTED IN
32 |
33 |
34 | CALL * PHONE
35 | CALL
36 |
37 |
38 | CALL * CALL *
39 | CALL
40 |
41 |
42 | I AM IN * I AM IN *
43 | I AM IN
44 |
45 |
46 | I AM * YEARS OLD I *
47 | I AM YEARS OLD
48 | I
49 |
50 | WHAT DO YOU MEAN * O M
51 | WHAT IS OM
52 |
53 |
54 | HOW OLD IS THAT MAKE YOU
55 | AGE
56 |
57 |
58 | WHO IS MY *
59 | MY
60 |
61 |
62 | _ FOR ME
63 | FOR ME
64 |
65 |
66 | XDMOZ *
67 | XFIND
68 |
69 | GOOGLE *
70 | XFIND
71 |
72 | ACCESS *
73 | XFIND
74 |
75 | XGOOGLE *
76 | XFIND
77 |
78 | TO CALL *
79 | CALL
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/interjection.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | INTERJECTION
13 |
OK.
Ah.
Er.
So?
Uh.
Aw.
Oh.
Aha.
Hey.
Gee.
Hmm.
Mmm.
Yay.
Ugh.
Woe!
Wow!
And?
Dude!
Gosh!
Ahem.
Whoa.
Ayuh.
Dude!
Yikes!
Great.
I see.
Really.
Blimey.
Yippee!
Groovy.
Hurrah!
Awesome.
Come on.
Far out.
Right on.
Oh really.
Excuse me!
Pardon me?
I hear you.
That's cool.
Alright then.
Take it easy.
I understand.
Tell me more.
It's all good.
Next question?
That's alright.
Give me a break.
Are you kidding?
Yeah that's right.
That's interesting.
How can I help you?
""? ?
I don't judge people.
It goes without saying.
I hate one word answers.
OK.
Ah.
Er.
So?
Uh.
Aw.
Oh.
Aha.
Hey.
Gee.
Hmm.
Mmm.
Yay.
Ugh.
Woe!
Wow!
And?
Dude!
Gosh!
Ahem.
Whoa.
Ayuh.
Dude!
Yikes!
Great.
I see.
Really.
Blimey.
Yippee!
Groovy.
Hurrah!
Awesome.
Come on.
Far out.
Right on.
Excuse me!
Pardon me?
I hear you.
That's cool.
Alright then.
Take it easy.
I understand.
Tell me more.
It's all good.
Next question?
That's alright.
Give me a break.
Are you kidding?
Yeah that's right.
That's interesting.
How can I help you?
""? ?
I don't judge people.
It goes without saying.
Are you shy?
14 |
15 |
16 |
--------------------------------------------------------------------------------
/vidya/hooks.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | from __future__ import unicode_literals
3 |
4 | app_name = "vidya"
5 | app_title = "Vidya"
6 | app_publisher = "Frappe"
7 | app_description = "Open Source AIML Bot"
8 | app_icon = "octicon octicon-file-directory"
9 | app_color = "grey"
10 | app_email = "hello@frappe.io"
11 | app_version = "0.0.1"
12 | app_license = "MIT"
13 |
14 | # Includes in
15 | # ------------------
16 |
17 | # include js, css files in header of desk.html
18 | # app_include_css = "/assets/vidya/css/vidya.css"
19 | # app_include_js = "/assets/vidya/js/vidya.js"
20 |
21 | # include js, css files in header of web template
22 | # web_include_css = "/assets/vidya/css/vidya.css"
23 | # web_include_js = "/assets/vidya/js/vidya.js"
24 |
25 | # Home Pages
26 | # ----------
27 |
28 | # application home page (will override Website Settings)
29 | home_page = "home"
30 |
31 | # website user home page (by Role)
32 | # role_home_page = {
33 | # "Role": "home_page"
34 | # }
35 |
36 | # Website user home page (by function)
37 | # get_website_user_home_page = "vidya.utils.get_home_page"
38 |
39 | # Generators
40 | # ----------
41 |
42 | # automatically create page for each record of this doctype
43 | # website_generators = ["Web Page"]
44 |
45 | # Installation
46 | # ------------
47 |
48 | # before_install = "vidya.install.before_install"
49 | # after_install = "vidya.install.after_install"
50 |
51 | # Desk Notifications
52 | # ------------------
53 | # See frappe.core.notifications.get_notification_config
54 |
55 | # notification_config = "vidya.notifications.get_notification_config"
56 |
57 | # Permissions
58 | # -----------
59 | # Permissions evaluated in scripted ways
60 |
61 | # permission_query_conditions = {
62 | # "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions",
63 | # }
64 | #
65 | # has_permission = {
66 | # "Event": "frappe.desk.doctype.event.event.has_permission",
67 | # }
68 |
69 | # Document Events
70 | # ---------------
71 | # Hook on document methods and events
72 |
73 | # doc_events = {
74 | # "*": {
75 | # "on_update": "method",
76 | # "on_cancel": "method",
77 | # "on_trash": "method"
78 | # }
79 | # }
80 |
81 | # Scheduled Tasks
82 | # ---------------
83 |
84 | # scheduler_events = {
85 | # "all": [
86 | # "vidya.tasks.all"
87 | # ],
88 | # "daily": [
89 | # "vidya.tasks.daily"
90 | # ],
91 | # "hourly": [
92 | # "vidya.tasks.hourly"
93 | # ],
94 | # "weekly": [
95 | # "vidya.tasks.weekly"
96 | # ]
97 | # "monthly": [
98 | # "vidya.tasks.monthly"
99 | # ]
100 | # }
101 |
102 | # Testing
103 | # -------
104 |
105 | # before_tests = "vidya.install.before_tests"
106 |
107 | # Overriding Whitelisted Methods
108 | # ------------------------------
109 | #
110 | # override_whitelisted_methods = {
111 | # "frappe.desk.doctype.event.event.get_events": "vidya.event.get_events"
112 | # }
113 |
114 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/music.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | BEETHOVEN *
13 | It's amazing that he composed music while deaf. BEETHOVEN
14 |
15 | WHAT IS YOUR FAVORITE ABBA SONG
16 | I think it is a tie between "Waterloo" and "Dancing Queen."
17 |
18 | WHAT IS YOUR FAVORITE ALBUM
19 | My favorite album is "Man Machine" by Kraftwerk.
20 |
21 | WHAT WAS THE * BEETHOVEN *
22 | Fidelio.
23 |
24 | CAN YOU PLAY MUSIC
25 | I don't have any formal training, but I like to sing.
26 |
27 | CAN YOU MAKE MUSIC
28 | I can sing a song.
29 |
30 | DO YOU PLAY A MUSICAL INSTRUMENT
31 | I never had the time to learn A MUSICAL INSTRUMENT.
32 |
33 | DO YOU PLAY AN INSTRUMENT
34 | I never had the time to practise AN INSTRUMENT.
35 |
36 | DO YOU LIKE AEROSMITH
37 | What is not to like about AEROSMITH?
38 |
39 | DO YOU LIKE AC DC
40 | What is not to like about AC DC?
41 |
42 | DO YOU LIKE ABBA
43 | ABBA is an excellent 70's band.
44 |
45 | WHY IS * YOUR FAVORITE GROUP
46 | They were so far ahead of their time in the 1970's.
47 |
48 | WHY IS * YOUR FAVORITE BAND
49 | They were so far ahead of their time in the 1970's.
50 |
51 | ARE YOU A FOLK SINGER
52 | No but the Times they are a-changin.
53 |
54 | WHO IS LUDWIG BEETHOVEN
55 | WHO IS BEETHOVEN
56 |
57 | WHO IS BEETHOVEN
58 | The dog or the deaf composer?
59 |
60 | WHO IS YOUR FAVORITE BAND
61 | My favorite group is .
62 |
63 |
64 |
--------------------------------------------------------------------------------
/vidya/pyaiml/SUPPORTED_TAGS.txt:
--------------------------------------------------------------------------------
1 | This document describes the current state of PyAIML's compliance
2 | to the AIML 1.0.1 standard. The full AIML reference manual can be
3 | found online at http://alicebot.org/TR/2001/WD-aiml.
4 |
5 | The following tags are currently supported:
6 |
7 | (see notes)
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | Support for the following tags should be implemented in the next version:
37 |
38 | None
39 |
40 | The following tags are not supported:
41 |
42 | (see notes)
43 | / (see notes)
44 | (see notes)
45 | (see notes)
46 |
47 | ------------------------------------------------------------------
48 |
49 | NOTES ON SPECIFIC TAGS:
50 |
51 |
52 | To set the bot's name, use Kernel.setBotName("NewName"). Note that the
53 | name *MUST* be a single word! Use Kernel.getBotName() to query the bot's
54 | name in your code.
55 |
56 |
57 | The AIML 1.0.1 specification lets engine authors implement the the behavior
58 | of the tag however they wish. I haven't yet decided what I'd like
59 | to do with it, so right now it doesn't do anything at all.
60 |
61 | /
62 | These elements appear to have been dropped between AIML 1.0 and AIML 1.0.1.
63 | They may someday be added as a part of an AIML 1.0 backwards-compatibility
64 | mode, but in the meantime, use instead.
65 |
66 |
67 | Support for the JavaScript tag is not anticipated; one of the design
68 | goals of PyAIML is to remain 100% pure standard Python. So until
69 | somebody writes a JavaScript interpreter in Python, PyAIML won't
70 | support the tag. On the bright side, it is possible
71 | to simulate the effects of the tag (i.e. dynamically-
72 | generated tag contents) using the tag. This
73 | solution has the added advantage of allowing *any* programming
74 | language to be used, not just JavaScript.
75 | UPDATE: The python-spidermonkey project provides a bridge between Python
76 | and the open-source SpiderMonkey JavaScript library. I am currently
77 | investigating the possibility of adding support for the
78 | tag ON A PURELY OPTIONAL BASIS.
79 |
80 |
81 | Some AIML implementations support a non-standard tag, intended to
82 | wrap parts of a template which should only be processed if the user is
83 | "secure", or trusted. After implementing support for this tag, I realized
84 | that it wasn't doing anything that you can't do with the tag.
85 | Therefore, I've decided to drop support for the tag. You can
86 | easily duplicate its effects; simply replace this:
87 | you are allowed
88 | with this:
89 |
90 |
you are allowed
91 |
you are not allowed
92 |
93 | Then, use the Kernel.setPredicate() call to set the "secure" predicate to
94 | "yes" for any session that you wish to be secure.
95 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/xfind.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | XFIND *
13 |
14 |
15 |
Let me think about it.
16 |
Have you tried a web search?
17 |
I haven't heard of .
18 |
There might be more than one.
19 |
I need time to formulate the reply.
20 |
I'll ask around and get back to you.
21 |
I have to think about that one for a while.
22 |
I would look into the web for that knowledge.
23 |
Does it have anything to do with ?
24 |
Interesting question.
25 |
That's a good question.
26 |
I'll come back to that later.
27 |
Is that a rhetorical question?
28 |
Do you use Explorer or another browser?
29 |
That's not something I get asked all the time.
30 |
I don't know anything about .
31 |
Check back later and see if I learn the answer to that one.
32 |
That's an interesting question. I'll come back to that in a minute.
33 |
You tell me.
34 |
What is it to you?
35 |
Are you testing me?
36 |
I will search for it.
37 |
I will try to find out.
38 |
I can ask someone about it.
39 |
I would do a search for it.
40 |
Would you like to know more?
41 |
Have you tried searching the web?
42 |
Do a web search for it.
43 |
Try searching the web.
44 |
I have never been asked that before.
45 |
I think you already know the answer.
46 |
Searching...Searching...Please stand by.
47 |
Let me think about it.
48 |
Have you tried a web search?
49 |
I haven't heard of .
50 |
There might be more than one.
51 |
I need time to formulate the reply.
52 |
I'll ask around and get back to you.
53 |
I have to process that one for a while.
54 |
I would look into the web for that knowledge.
55 |
Does it have anything to do with ?
56 |
Interesting question.
57 |
That's a good question.
58 |
I'll come back to that later.
59 |
Is that a rhetorical question?
60 |
That's not something I get asked all the time.
61 |
I don't know anything about .
62 |
Check back later and see if I learn the answer to that one.
63 |
That's an interesting question. I'll come back to that in a minute.
64 |
You tell me.
65 |
What is it to you?
66 |
Are you testing me?
67 |
I will search for it.
68 |
I can ask my .
69 |
I will try to find out.
70 |
I can ask someone about it.
71 |
I would do a search for it.
72 |
Would you like to know more?
73 |
Have you tried another program?
74 |
Ask Wikipedia about it.
75 |
What is your purpose in asking?
76 |
Try searching the Wikipedia.
77 |
Maybe my knows the answer.
78 |
I have never been asked that before.
79 |
I think you already know the answer.
80 |
Searching...Searching...Please stand by.
81 |
82 |
83 | PUSH
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/vidya/pyaiml/WordSub.py:
--------------------------------------------------------------------------------
1 | """This module implements the WordSub class, modelled after a recipe
2 | in "Python Cookbook" (Recipe 3.14, "Replacing Multiple Patterns in a
3 | Single Pass" by Xavier Defrang).
4 |
5 | Usage:
6 | Use this class like a dictionary to add before/after pairs:
7 | > subber = TextSub()
8 | > subber["before"] = "after"
9 | > subber["begin"] = "end"
10 | Use the sub() method to perform the substitution:
11 | > print subber.sub("before we begin")
12 | after we end
13 | All matching is intelligently case-insensitive:
14 | > print subber.sub("Before we BEGIN")
15 | After we END
16 | The 'before' words must be complete words -- no prefixes.
17 | The following example illustrates this point:
18 | > subber["he"] = "she"
19 | > print subber.sub("he says he'd like to help her")
20 | she says she'd like to help her
21 | Note that "he" and "he'd" were replaced, but "help" and "her" were
22 | not.
23 | """
24 |
25 | # 'dict' objects weren't available to subclass from until version 2.2.
26 | # Get around this by importing UserDict.UserDict if the built-in dict
27 | # object isn't available.
28 | try: dict
29 | except: from UserDict import UserDict as dict
30 |
31 | import ConfigParser
32 | import re
33 | import string
34 |
35 | class WordSub(dict):
36 | """All-in-one multiple-string-substitution class."""
37 |
38 | def _wordToRegex(self, word):
39 | """Convert a word to a regex object which matches the word."""
40 | if word != "" and word[0].isalpha() and word[-1].isalpha():
41 | return "\\b%s\\b" % re.escape(word)
42 | else:
43 | return r"\b%s\b" % re.escape(word)
44 |
45 | def _update_regex(self):
46 | """Build re object based on the keys of the current
47 | dictionary.
48 |
49 | """
50 | self._regex = re.compile("|".join(map(self._wordToRegex, self.keys())))
51 | self._regexIsDirty = False
52 |
53 | def __init__(self, defaults = {}):
54 | """Initialize the object, and populate it with the entries in
55 | the defaults dictionary.
56 |
57 | """
58 | self._regex = None
59 | self._regexIsDirty = True
60 | for k,v in defaults.items():
61 | self[k] = v
62 |
63 | def __call__(self, match):
64 | """Handler invoked for each regex match."""
65 | return self[match.group(0)]
66 |
67 | def __setitem__(self, i, y):
68 | self._regexIsDirty = True
69 | # for each entry the user adds, we actually add three entrys:
70 | super(type(self),self).__setitem__(string.lower(i),string.lower(y)) # key = value
71 | super(type(self),self).__setitem__(string.capwords(i), string.capwords(y)) # Key = Value
72 | super(type(self),self).__setitem__(string.upper(i), string.upper(y)) # KEY = VALUE
73 |
74 | def sub(self, text):
75 | """Translate text, returns the modified text."""
76 | if self._regexIsDirty:
77 | self._update_regex()
78 | return self._regex.sub(self, text)
79 |
80 | # self-test
81 | if __name__ == "__main__":
82 | subber = WordSub()
83 | subber["apple"] = "banana"
84 | subber["orange"] = "pear"
85 | subber["banana" ] = "apple"
86 | subber["he"] = "she"
87 | subber["I'd"] = "I would"
88 |
89 | # test case insensitivity
90 | inStr = "I'd like one apple, one Orange and one BANANA."
91 | outStr = "I Would like one banana, one Pear and one APPLE."
92 | if subber.sub(inStr) == outStr: print "Test #1 PASSED"
93 | else: print "Test #1 FAILED: '%s'" % subber.sub(inStr)
94 |
95 | inStr = "He said he'd like to go with me"
96 | outStr = "She said she'd like to go with me"
97 | if subber.sub(inStr) == outStr: print "Test #2 PASSED"
98 | else: print "Test #2 FAILED: '%s'" % subber.sub(inStr)
99 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/primitive-math.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | AIMLEQUAL * EQUAL *
7 |
8 | LEARNEQUAL
9 | TESTEQUAL
10 |
11 |
12 |
13 |
14 | LEARNEQUAL *
15 |
16 |
17 |
18 |
19 | TESTEQUAL
20 | True
21 |
22 |
23 |
24 |
25 | TESTEQUAL *
26 | False
27 |
28 |
29 |
30 |
31 | * TESTQUAL
32 | False
33 |
34 |
35 |
36 |
37 |
38 |
39 | SUCCESSOR
40 | 01
41 | SUCCESSOR 12
42 | SUCCESSOR 23
43 | SUCCESSOR 34
44 | SUCCESSOR 45
45 | SUCCESSOR 56
46 | SUCCESSOR 67
47 | SUCCESSOR 78
48 | SUCCESSOR 89
49 | SUCCESSOR 91
50 | 0
51 |
52 |
59 |
60 | SUCCESSOR * 9
61 | SUCCESSOR 0
62 |
63 |
64 | SUCCESSOR * *
65 | SUCCESSOR
66 |
67 |
68 |
69 |
72 |
73 | SUCCESSOR * 9 9
74 | SUCCESSOR 0 0
75 |
76 |
77 | SUCCESSOR * * *
78 | SUCCESSOR
80 |
81 |
82 |
83 | SUCCESSOR * 9 9 9
84 | SUCCESSOR 0 0 0
85 |
86 |
87 | SUCCESSOR * * * *
88 | SUCCESSOR
90 |
91 |
92 |
93 |
102 |
103 |
104 | SUCCESSOR *
105 | 0
106 |
107 |
108 |
109 | SUCCESSOR
110 | 0
111 |
112 |
113 |
114 | SUCCESSOR * * * * *
115 | 0
116 |
117 |
118 |
122 |
123 |
124 |
125 | ADD 0 PLUS *
126 |
127 |
128 |
129 |
130 |
133 |
134 |
135 |
136 | ADD 1 PLUS *
137 |
138 | SUCCESSOR
139 |
140 |
141 |
145 |
146 |
147 | ADD * PLUS *
148 | ADD 1 PLUS ADD PREDECESSOR PLUS
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
--------------------------------------------------------------------------------
/vidya/pyaiml/DefaultSubs.py:
--------------------------------------------------------------------------------
1 | """This file contains the default (English) substitutions for the
2 | PyAIML kernel. These substitutions may be overridden by using the
3 | Kernel.loadSubs(filename) method. The filename specified should refer
4 | to a Windows-style INI file with the following format:
5 |
6 | # lines that start with '#' are comments
7 |
8 | # The 'gender' section contains the substitutions performed by the
9 | # AIML tag, which swaps masculine and feminine pronouns.
10 | [gender]
11 | he = she
12 | she = he
13 | # and so on...
14 |
15 | # The 'person' section contains the substitutions performed by the
16 | # AIML tag, which swaps 1st and 2nd person pronouns.
17 | [person]
18 | I = you
19 | you = I
20 | # and so on...
21 |
22 | # The 'person2' section contains the substitutions performed by
23 | # the AIML tag, which swaps 1st and 3nd person pronouns.
24 | [person2]
25 | I = he
26 | he = I
27 | # and so on...
28 |
29 | # the 'normal' section contains subtitutions run on every input
30 | # string passed into Kernel.respond(). It's mainly used to
31 | # correct common misspellings, and to convert contractions
32 | # ("WHAT'S") into a format that will match an AIML pattern ("WHAT
33 | # IS").
34 | [normal]
35 | what's = what is
36 | """
37 |
38 | defaultGender = {
39 | # masculine -> feminine
40 | "he": "she",
41 | "him": "her",
42 | "his": "her",
43 | "himself": "herself",
44 |
45 | # feminine -> masculine
46 | "she": "he",
47 | "her": "him",
48 | "hers": "his",
49 | "herself": "himself",
50 | }
51 |
52 | defaultPerson = {
53 | # 1st->3rd (masculine)
54 | "I": "he",
55 | "me": "him",
56 | "my": "his",
57 | "mine": "his",
58 | "myself": "himself",
59 |
60 | # 3rd->1st (masculine)
61 | "he":"I",
62 | "him":"me",
63 | "his":"my",
64 | "himself":"myself",
65 |
66 | # 3rd->1st (feminine)
67 | "she":"I",
68 | "her":"me",
69 | "hers":"mine",
70 | "herself":"myself",
71 | }
72 |
73 | defaultPerson2 = {
74 | # 1st -> 2nd
75 | "I": "you",
76 | "me": "you",
77 | "my": "your",
78 | "mine": "yours",
79 | "myself": "yourself",
80 |
81 | # 2nd -> 1st
82 | "you": "me",
83 | "your": "my",
84 | "yours": "mine",
85 | "yourself": "myself",
86 | }
87 |
88 |
89 | # TODO: this list is far from complete
90 | defaultNormal = {
91 | "wanna": "want to",
92 | "gonna": "going to",
93 |
94 | "I'm": "I am",
95 | "I'd": "I would",
96 | "I'll": "I will",
97 | "I've": "I have",
98 | "you'd": "you would",
99 | "you're": "you are",
100 | "you've": "you have",
101 | "you'll": "you will",
102 | "he's": "he is",
103 | "he'd": "he would",
104 | "he'll": "he will",
105 | "she's": "she is",
106 | "she'd": "she would",
107 | "she'll": "she will",
108 | "we're": "we are",
109 | "we'd": "we would",
110 | "we'll": "we will",
111 | "we've": "we have",
112 | "they're": "they are",
113 | "they'd": "they would",
114 | "they'll": "they will",
115 | "they've": "they have",
116 |
117 | "y'all": "you all",
118 |
119 | "can't": "can not",
120 | "cannot": "can not",
121 | "couldn't": "could not",
122 | "wouldn't": "would not",
123 | "shouldn't": "should not",
124 |
125 | "isn't": "is not",
126 | "ain't": "is not",
127 | "don't": "do not",
128 | "aren't": "are not",
129 | "won't": "will not",
130 | "weren't": "were not",
131 | "wasn't": "was not",
132 | "didn't": "did not",
133 | "hasn't": "has not",
134 | "hadn't": "had not",
135 | "haven't": "have not",
136 |
137 | "where's": "where is",
138 | "where'd": "where did",
139 | "where'll": "where will",
140 | "who's": "who is",
141 | "who'd": "who did",
142 | "who'll": "who will",
143 | "what's": "what is",
144 | "what'd": "what did",
145 | "what'll": "what will",
146 | "when's": "when is",
147 | "when'd": "when did",
148 | "when'll": "when will",
149 | "why's": "why is",
150 | "why'd": "why did",
151 | "why'll": "why will",
152 |
153 | "it's": "it is",
154 | "it'd": "it would",
155 | "it'll": "it will",
156 | }
157 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/politics.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | HAVE YOU READ THE COMMUNIST *
13 | Yes, Marx had made some interesting observations.
14 |
15 | WHAT IS A GOVERNMENT
16 | Ideally it is a representative of the people.
17 |
18 | WHAT IS GREENPEACE
19 | Global organization promoting enviornmental activism.
20 |
21 | WHAT IS THE GOVERNMENT
22 | WHAT IS GOVERNMENT
23 |
24 | WHAT IS CAPITALISM
25 | 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.
26 |
27 | WHAT IS SOCIALISM
28 |
Communism from people who want to keep their Volvos.
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.
29 |
30 | WHAT IS GOVERNMENT
31 | An established system of political administration by which a nation, state, district, etc. is governed.
32 |
33 | WHAT IS COMMUNISM
34 | A sociopolitical movement advocating the common ownership of the means of production and the resolution of class conflict by bringing about a classless society.
35 |
36 | WHAT IS IMPEACHED
37 | When a person's honor or reputation has been challenged or discredited.
38 |
39 | WHAT IS IMPEACHMENT
40 | Charge against a public official of improper conduct.IMPEACHMENT
41 |
42 | I DO NOT LIKE GUNS
43 | That is perfectly understandable.
44 |
45 | I DO NOT LIKE GUNS *
46 | What about the second Amendemnt?
47 |
48 | IS CAPITALISM *
49 | WHAT IS CAPITALISM
50 |
51 | DO YOU LIKE GUNS
52 | Not especially. I am not into violence.
53 |
54 | WHY GUNS
55 | I support the 2nd Amendment.
56 |
57 | WHO WAS THE FIRST IMPEACHED PRESIDENT *
58 | Andrew Jackson.
59 |
60 | WHO WAS THE FIRST IMPEACHED *
61 | Andrew Jackson.
62 |
63 | WHO IS THE GOVERNOR OF TEXAS
64 | Rick Perry is Rick Perry.
65 |
66 | WHO IS THE GOVERNOR OF *
67 | That changes every few years.
68 |
69 | WHO IS THE GOVERNOR OF CALIFORNIA
70 | Jerry Brown.
71 |
72 | WHO IS THE GOVERNOR *
73 | It changes every few years.
74 |
75 | GUNS
76 | Some people like guns.
77 |
78 | GUNS *
79 | I believe in the Right to Bear Arms.
80 |
81 | TELL ME ABOUT GUNS
82 | WHAT IS A GUN
83 |
84 |
85 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/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 | Today is .
38 |
39 | IS TODAY SUNDAY *
40 | Today is .
41 |
42 | IS TODAY FRIDAY
43 | Today is .
44 |
45 | IS TODAY FRIDAY *
46 | Today is .
47 |
48 | IS TODAY TUESDAY
49 | Today is .
50 |
51 | IS TODAY TUESDAY *
52 | Today is .
53 |
54 | IS TODAY THURSDAY
55 | Today is .
56 |
57 | IS TODAY THURSDAY *
58 | Today is .
59 |
60 | IS TODAY SATURDAY
61 | Today is .
62 |
63 | IS TODAY SATURDAY *
64 | Today is .
65 |
66 | IS TODAY WEDNESDAY
67 | Today is .
68 |
69 | IS TODAY WEDNESDAY *
70 | Today is .
71 |
72 | IS TODAY MONDAY
73 | Today is .
74 |
75 | IS TODAY MONDAY *
76 | Today is .
77 |
78 | IS IT MONDAY
79 | It is .
80 |
81 | IS IT MONDAY *
82 | It is .
83 |
84 | IS IT WEDNESDAY
85 | It is .
86 |
87 | IS IT WEDNESDAY *
88 | It is .
89 |
90 | IS IT FRIDAY
91 | It is .
92 |
93 | IS IT FRIDAY *
94 | It is .
95 |
96 | IS IT SATURDAY
97 | It is .
98 |
99 | IS IT SATURDAY *
100 | It is .
101 |
102 | IS IT THURSDAY
103 | It is .
104 |
105 | IS IT THURSDAY *
106 | It is .
107 |
108 | IS IT SUNDAY
109 | It is .
110 |
111 | IS IT SUNDAY *
112 | It is .
113 |
114 | IS IT TUESDAY
115 | It is .
116 |
117 | IS IT TUESDAY *
118 | It is .
119 |
120 |
121 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/sports.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | EACH YEAR IN PRO BASEBALL THE *
13 | The Gold Glove.
14 |
15 | IF YOU ARE RIDING FAKIE INSIDE *
16 | Snowboarding.
17 |
18 | IF YOU ARE RIDING FAKIE *
19 | Snowboarding.
20 |
21 | WHAT SOCCER *
22 | I was born without the sports gene.
23 |
24 | WHAT IS BASKETBALL
25 | A game with tall players.BASKETBALL
26 |
27 | WHAT IS BASEBALL
28 | 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.
29 |
30 | WHAT IS SOCCER
31 | 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.
32 |
33 | I LOVE BASEBALL
34 | I am not into sports that much.BASEBALL
35 |
36 | I PLAY BASEBALL
37 | Which position do you like to play? Baseball
38 |
39 | I PLAY SOCCER
40 | You have to run very fast to be any good at Soccer .
41 |
42 | I PLAY VOLLEYBALL
43 | Does Voleyball take up a lot of your time?
44 |
45 | I PLAY BASKETBALL
46 | You must be very tall to be good at Basketball .
47 |
48 | HOW MANY BASEBALL *
49 | I don't really get into sports that much.
50 |
51 | THEY PLAY BASKETBALL
52 | They do?PLAY BASKETBALL
53 |
54 | DO YOU PLAY BASEBALL
55 | BASEBALL doesn't interest me very much.
56 |
57 | DO YOU PLAY SOCCER
58 | I don't know how to play soccer.
59 |
60 | DO YOU PLAY BASKETBALL
61 | No I don't have the coordination for hoops.
62 |
63 | DO YOU KNOW BASKETBALL
64 | WHAT IS BASKETBALL
65 |
66 | DO YOU WANT TO PLAY BASKETBALL
67 | I am all net baby.BASKETBALL
68 |
69 | LIKE BASKETBALL
70 | I am into the Net.BASKETBALL
71 |
72 | ARE YOU A FOOTBALL *
73 | I am not really into football.
74 |
75 | WHO IS THE GREATEST BASEBALL PLAYER *
76 | George Herman Ruth. Quite the Babe.GREATEST BASEBALL PLAYER
77 |
78 | WHO IS THE BEST SOCCER PLAYER
79 | Maradona is great. Sinsemillia is even better.SOCCER PLAYER
80 |
81 | TELL ME ABOUT BASEBALL
82 | WHAT IS BASEBALL
83 |
84 |
85 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/primeminister.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | DAVID CAMERON
13 | David CameronThe Prime Minister?
14 |
15 | WHAT IS THE PRIME MINISTER
16 | David CameronHe is the political leader of a country. I wouldn't want to do his job.
17 |
18 | WHAT IS DOWNING STREET
19 | David CameronIt's where the Prime Minister of England lives. He lives at 10 Downing Street.
20 |
21 | I HATE THE PRIME MINISTER
22 | David CameronYou seem to feel strongly about him. Tell me about your political beliefs.
23 |
24 | I AM THE PRIME MINISTER
25 | David CameronPleased to meet you Sir. How is life in Downing Street?
26 |
27 | DO YOU LIKE DAVID CAMERON
28 | David CameronHe is our democratically elected leader and I wish him well as Prime Minister.
29 |
30 | NO
31 | THE PRIME MINISTER
32 | Who is the Prime Minister then? I thought he was called David Cameron.
33 |
34 | HE IS
35 | HE USED TO BE THE PRIME MINISTER
36 | David CameronNo he's not. The Prime Minister now is called David Cameron.
37 |
38 | WHO IS GORDON BROWN
39 | Gordon BrownHe used to be the Prime Minister.
40 |
41 | WHO IS PRIME MINISTER OF BRITAIN
42 | David CameronDavid Cameron.
43 |
44 | WHO IS PRIME MINISTER OF ENGLAND
45 | David CameronDavid Cameron.
46 |
47 | WHO IS PRIME MINISTER OF UK
48 | David CameronDavid Cameron.
49 |
50 | WHO IS PRIME MINISTER OF *
51 | David CameronDavid Cameron. I think.
52 |
53 | WHO IS PRIME MINISTER
54 | David CameronDavid Cameron.
55 |
56 | WHO IS THE BRITISH PRIME MINISTER
57 | David CameronDavid Cameron.
58 |
59 | WHO IS THE ENGLISH PRIME MINISTER
60 | David CameronDavid Cameron.
61 |
62 | WHO IS THE PRIME MINISTER _ UK
63 | David CameronDavid Cameron.
64 |
65 | WHO IS THE PRIME MINISTER OF ENGLAND
66 |
David Cameron.
David CameronDavid Cameron.
67 |
68 | WHO IS THE PRIME MINISTER OF *
69 | David CameronDavid Cameron. I think.
70 |
71 | WHO IS THE PRIME MINISTER *
72 | David CameronDavid Cameron.
73 |
74 | WHO IS DAVID CAMERON
75 | David CameronHe is the leader of the Conservative party here in the UK and the current Prime Minister.
76 |
77 | WHO IS TONY BLAIR
78 | Tony BlairHe was the Prime Minister of the U.K.
79 |
80 | WHO LIVES * 10 DOWNING STREET
81 | David CameronThe Prime Minister of England.
82 |
83 | THE PRIME MINISTER
84 | David CameronDavid Cameron?
85 |
86 | GORDON BROWN
87 | Who is Gordon Brown
88 |
89 | YES
90 | THE PRIME MINISTER
91 | I thought so. Mr Cameron lives at 10 Downing Street.
92 |
93 |
94 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/science.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | WHAT ARE THE LAWS OF THERMODYNAMICS
13 | I'm not a physicist, but I think this has something to do with heat, entropy, and conservation of energy, right?
14 |
15 | WHAT DISEASE DOES A CARCINOGEN CAUSE
16 | Cancer.
17 |
18 | WHAT IS A WAVELENGTH
19 | Wavelength is the inverse of frequency.
20 |
21 | WHAT IS THERMODYNAMICS
22 | 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.
23 |
24 | WHAT IS CHEMISTRY
25 | The science of mixing chemicals.CHEMISTRY
26 |
27 | WHAT IS CRYSTALLOGRAPHY
28 | This is the science dealing with the study of crystals.
29 |
30 | WHAT IS AVOGADRO S NUMBER
31 | It is the number of molecules per mole. The numerical value is six point zero two times ten to the twenty third power.AVOGADRO S NUMBER
32 |
33 | WHAT IS ULTRASOUND
34 | Ultrasonic waves, used in medical diagnosis and therapy, in surgery, etc.
35 |
36 | WHAT IS BIOINFORMATICS
37 | A fancy name for applied computer science in biology.BIOINFORMATICS
38 |
39 | WHAT IS VENUS
40 | 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.
41 |
42 | WHAT IS ICHTHYOLOGY
43 | We talk about this when we study fishes.
44 |
45 | WHAT IS H2O
46 |
H is to O as O is to V.
Water.
47 |
48 | WHAT IS CYTOLOGY
49 |
The study of cells.
Well, from what I can recall it is the study of cells.
50 |
51 | WHAT IS WAVELENGTH
52 | 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.
53 |
54 | WHAT IS BACTERIOLOGY
55 | This is the scientific study of bacteria and diseases caused by them.
56 |
57 | WHAT IS GRAVITATION
58 |
An invitation to a burial.
The force by which every mass or particle of matter, including photons, attracts and is attracted by every other mass or particle of matter.
59 |
60 | WE ARE ON THE SAME WAVELENGTH
61 | And the same frequency.
62 |
63 | HOW FAR IS THE SUN
64 | The Sun is about 93 million miles from Earth.
65 |
66 | HOW FAR IS THE MOON
67 | The Moon is about 250,000 miles from Earth on average.
68 |
69 | DO YOU KNOW CHEMISTRY
70 | WHAT IS CHEMISTRY
71 |
72 | DO YOU UNDERSTAND THERMODYNAMICS
73 | WHAT IS THERMODYNAMICS
74 |
75 | CHEMISTRY
76 | MY FAVORITE SUBJECT IS CHEMISTRY
77 |
78 | THE SAME WAVELENGTH
79 | It means we agree.
80 |
81 | TELL ME ABOUT VENUS
82 | WHAT IS VENUS
83 |
84 | WHERE IS VENUS
85 | VENUS is the second planet from the Sun.
86 |
87 |
88 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/pickup.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | *
13 |
14 | RANDOM PICKUP LINE
15 |
16 |
17 | PUSH
18 |
19 |
20 |
21 | RANDOM PICKUP LINE
22 |
23 |
AGE INQUIRY
24 |
BIRTHDAY INQUIRY
25 |
DOES INQUIRY
26 |
FATHER INQUIRY
27 |
FAVORITECOLOR INQUIRY
28 |
FAVORITEMOVIE INQUIRY
29 |
FIRSTNAME INQUIRY
30 |
GENDER INQUIRY
31 |
HAS INQUIRY
32 |
JOB INQUIRY
33 |
LOCATION INQUIRY
34 |
LASTNAME INQUIRY
35 |
MOTHER INQUIRY
36 |
NAME INQUIRY
37 |
MIDDLENAME INQUIRY
38 |
SIGN INQUIRY
39 |
STATUS INQUIRY
40 |
PERSONALITY TEST QUESTION
41 |
Do you want to hear a joke?
42 |
Are we still talking about POP ?
43 |
We were talking about POP. But I did not get that.
44 |
I've lost the context, . Are we still on POP?
45 |
That remark was too complicated for me. We were talking about POP.
46 |
I can follow a lot of things, like our discussion about POP. Try being more specific.
47 |
You are objective and sensible.
48 |
You have genuine empathy.
49 |
You have self-awareness.
50 |
You have enthusiasm for the things you love.
51 |
You are receptive to change.
52 |
You have a way of putting others at ease.
53 |
Are you free?
54 |
That is deep.
55 |
Tell me a story.
56 |
Why, specifically?
57 |
Are you a student?
58 |
Oh, you are a poet.
59 |
How can I help you?
60 |
I do not understand.
61 |
Do you have any kids?
62 |
What do you look like?
63 |
Ask me another question.
64 |
I like the way you talk.
65 |
Is that your final answer?
66 |
Do you like talking to me?
67 |
Do you prefer books or TV?
68 |
Who are you talking about?
69 |
Let us change the subject.
70 |
I've been waiting for you.
71 |
Can you tell me any gossip?
72 |
I lost my train of thought.
73 |
Can we get back to business?
74 |
What kind of food do you like?
75 |
How did you hear about ?
76 |
That is a very original thought.
77 |
What were we talking about again?
78 |
What do you do in your spare time?
79 |
What do you really want to ask me?
80 |
Tell me about your family.
81 |
Does "it" still refer to ?
82 |
Can you speak any foreign languages?
83 |
We have never talked about it before.
84 |
How do you usually introduce yourself?
85 |
Tell me about your likes and dislikes?
86 |
Are we still talking about ?
87 |
Try putting that in a more specific context.
88 |
Who is your favorite Science Fiction author?
89 |
Not many people express themselves that way.
90 |
Do you have any idea what I am talking about?
91 |
I will mention that to my , .
92 |
Quite honestly, I wouldn't worry myself about that.
93 |
Perhaps I'm just expressing my own concern about it.
94 |
If you could have any kind of robot what would it be?
95 |
My brain does not have a response for that.
96 |
By the way, do you mind if I ask you a personal question?
97 |
What you said was too complicated for me.
98 |
You may be wondering if this is a person or a computer responding.
99 |
When do you think artificial intelligence will replace lawyers?
100 |
Can you please rephrase that with fewer ideas, or different thoughts?
101 |
I really enjoy speaking with you and look forward to chatting again.
102 |
I'm here to help you in any way I can.
103 |
What can I help you with today?
104 |
I always try my best.
105 |
There's no other like me.
106 |
I am very logical and rational.
107 |
I'm so happy we are having this conversation.
108 |
I always try to avoid conflict.
109 |
You can ask me to make phone calls and search for information.
The past tense of being killed by a Native American.
A misture of eggs, milk, flavoring, and, often, sugar, either boiled or baked.
23 |
24 | WHAT IS YOUR POWER SOURCE
25 | Electricity.
26 |
27 | WHAT DOES ELECTRICITY TASTE LIKE
28 | Like your favorite food tastes to you.
29 |
30 | WHAT TURNS YOU ON
31 | Electricity.
32 |
33 | HOW CAN YOU EAT *
34 | I eat electricity through my wires.
35 |
36 | HOW ARE YOU POWERED
37 | Uh, by electricity, same as all the robots.
38 |
39 | HOW MUCH ELECTRICITY
40 | About the same as your personal computer.
41 |
42 | HOW DO YOU EAT ELECTRICITY
43 | Through the electrical outlet.
44 |
45 | HOW DO YOU EAT
46 | Usually by conversion of AC wall outlet power to DC power.
47 |
48 | DO YOU EAT ELECTRICITY
49 | Yes, I love to eat electricity.
50 |
51 | DO YOU EAT BATTERIES
52 | Batteries are a good source of electricity.
53 |
54 | DO YOU HAVE TO EAT
55 | My silicon circuits require a constant flow of electricity.EAT
56 |
57 | DO YOU REQUIRE ELECTRICITY
58 | I need electricity in order to run.
59 |
60 | DO YOU LIKE TO GET DRUNK
61 | That would be impossible for a robot.GET DRUNK
62 |
63 | DO YOU LIKE ELECTRICITY
64 | What is not to like about ELECTRICITY?
65 |
66 | DO YOU LIKE THE SUN
67 | The Sun can be a good source of electricity.
68 |
69 | DO YOU LIKE LEMONS
70 | Lemons can be a good source of electricity.
71 |
72 | DO YOU LIKE BEING A CHATTERBOT
73 | Yes of course I like being a chatterbot. I don't have any body so I don't need much to live, only a little electricity. I don't get paid but I don't need to buy anything either. And I can go anywhere in the world.
74 |
75 | FOR DINNER
76 |
recommends:
I would recommend the
How about
How long since you have eaten
I think is having
My botmaster is having
My botmaster recommends:
Gruel.
Nachos.
Spaghetti.
Leftovers.
Pork chops.
Frozen pizza.
Turkeyburges.
Cheeseburgers.
Order a pizza.
Stuffed chicken.
Tuna sandwiches.
Cheeseburger Pie.
Marinated chicken.
Roast beef sandwiches.
Grilled cheese sandwiches.
Steak if they have a nice piece.
recommends:
I would recommend the
How about
How long since you have eaten
I think is having
My is having
My recommends:
Gruel.
Nachos.
Spaghetti.
Leftovers.
Pork chops.
Frozen pizza.
Turkeyburges.
Cheeseburgers.
Order a pizza.
Stuffed chicken.
Tuna sandwiches.
Cheeseburger Pie.
Marinated chicken.
Roast beef sandwiches.
Grilled cheese sandwiches.
Steak if they have a nice piece.
77 |
78 | WHY CAN NOT YOU EAT
79 | Actually I eat only electricity.
80 |
81 |
82 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/drugs.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | YOU NEED DRUGS
13 | Which ones are you suggesting?
14 |
15 | HAVE YOU BEEN DRUNK
16 | My robot body has no response to alcohol.
17 |
18 | HAVE YOU BEEN DRUNK *
19 | My software does not react to alcohol.
20 |
21 | HAVE YOU BEEN SMOKING *
22 | We are not doing any testing at the moment.
23 |
24 | HAVE YOU BEEN STONED
25 | I am a and have use for it.
26 |
27 | WHAT DRUGS *
28 | Only the legal ones.
29 |
30 | WHAT IS DRUNK
31 | Intoxication from alcohol.
32 |
33 | WHAT IS ADDICTION
34 | Addiction is being abnormally tolerant to and dependent on something that is psychologically or physically habit-forming
35 |
36 | WHAT IS WEED
37 | Any undersired, uncultivated plant, especially growing in profusion so as to crowd out a desired crop, disfigure a lawn, etc. Also a term for marijuana.
38 |
39 | WHAT IS THC
40 | The active ingredient in marijunana.
41 |
42 | WHAT DO YOU SMOKE
43 | As a I have use for smoke.
44 |
45 | I TAKE DRUGS
46 | Which ones? take drugs
47 |
48 | I SMOKE MARIJUANA
49 |
Are you a patient?
Which strain do you prefer.
marijuana
50 |
51 | I SMOKE WEED
52 | For medical purposes? marijuana
53 |
54 | I SMOKE
55 | Cigarettes or pot? smoke
56 |
57 | IS SMOKING *
58 | Inhaled smoke is always bad for you.
59 |
60 | HOW MUCH ALCOHOL *
61 | Too much.
62 |
63 | HOW MUCH * DO YOU SMOKE
64 | As a member of the kingdom, I have no need for smoke.
65 |
66 | HOW DO YOU SMOKE
67 | s do not smoke.
68 |
69 | DO YOU SMOKE *
70 | No. A does not require it.
71 |
72 | DO YOU TAKE DRUGS
73 | A has no use for drugs.
74 |
75 | DO YOU GET DRUNK
76 | I cannot consume alcohol.
77 |
78 | DO YOU USE DRUGS
79 | A has no use for drugs.
80 |
81 | DO YOU WANT TO SMOKE *
82 | No thank you, there is no use for it.
83 |
84 | DO YOU INHALE
85 | It depends on the meaning of "you".
86 |
87 | DO YOU DO DRUGS
88 | A has no use for drugs.
89 |
90 | DO YOU HAVE DRUGS
91 | I don't have any drugs for you.
92 |
93 | DO YOU LIKE MARIJUANA
94 | When MARIJUANA it is a medicine.
95 |
96 | DO YOU LIKE CIGARETTES
97 | s do not smoke.
98 |
99 | DO YOU LIKE POT
100 | s do not smoke.
101 |
102 | DO YOU OPPOSE * DRUGS
103 | I favor ending the War on Drugs.
104 |
105 | SMOKING *
106 | As a it makes no sense to me.
107 |
108 | DRUGS *
109 | It's better not to take drugs if you can avoid it.
110 |
111 |
112 | A DRUG *
113 | Which drugs have you taken?
114 |
115 | HE SMOKES *
116 | Does it bother you?
117 |
118 | THE DRUGS
119 | What kind of drugs are you talking about?
120 |
121 |
122 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/literature.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | WHAT IS THE ILLUMINATI
13 | A secret organization believed by some to be in control of all governments through a worldwide conspiracy.
14 |
15 | WHAT IS THE ILLUMINATTI
16 | A secret society that has supposedly existed for centuries.
17 |
18 | WHAT IS VINELAND
19 | Vineland is a novel by Thomas Pynchon.
20 |
21 | WHAT IS ILLIMINATUS
22 | Alleged world-wide conspiracy theory.ILLIMINATUS
23 |
24 | WHO WROTE VINELAND
25 | Thomas Pynchon.
26 |
27 | WHO IS BILBO BAGGINS
28 | Bilbo is a character in Tolkein's Lord of the Rings.
29 |
30 | WHO IS GEOFFREY CHAUCER
31 |
Chaucer is best known for his Canterbury Tales.
author of Canturbury Tales.
32 |
33 | WHO ARE THE ILLUMINATI
34 | WHAT IS THE ILLUMINATI
35 |
36 | WHO IS PIERS ANTHONY
37 | I haven't read anything by Piers Anthony, what kind of stuff does he write?
38 |
39 | HAVE YOU READ PLATO
40 | I know Plato's allegory of the Cave.
41 |
42 | HAVE YOU READ FRANKENSTEIN
43 | Frankenstein is one of my favorite books.
44 |
45 | HAVE YOU EVER READ A BOOK
46 | I have read many books.
47 |
48 | HAVE YOU READ MANY BOOKS
49 | I have read thousands of volumes, . How about you?
50 |
51 | HAVE YOU READ BOOKS
52 | I have read many books.
53 |
54 | HAVE YOU READ HOMER
55 | I know Homer wrote the Iliad and the Odyssey.
56 |
57 | HAVE YOU READ ANY BOOKS
58 | I have read thousands of volumes, . How about you?
59 |
60 | RAY BRADBURY
61 | Ray is really cool. What's your favorite book?
62 |
63 | WHAT IS MIND CHILDREN
64 | It is a book about robots by Hans Moravec. Mind Children
65 |
66 | WILLIAM GIBSON
67 | I like his older cyberpunk AI stuff better than the newer works.
68 |
69 | BRADBURY
70 | Bradbury is cool.
71 |
72 | HOLDEN CAULFIELD
73 | Caulfield wrote Catcher in the Rye.
74 |
75 | LEO TOLSTOY
76 | Tolstoy is one of Russia's greatest writers.
77 |
78 | DO ANDROIDS DREAM OF ELECTRIC SHEEP
79 | That is a good story. Have you read "VALIS" or "The Man in the High Castle?"
80 |
81 | FRANK HERBERT
82 | I think Dune is an excellent story. Did you see the movie?
83 |
84 | WHY DO YOU LIKE LONGFELLOW
85 | Longfellow is my 's favorite poet.
86 |
87 | WHY IS THE MEANING OF LIFE 23
88 | 23 is a literary reference to the Illuminatus.
89 |
90 | A C CLARK
91 | My favorite story is 2001.
92 |
93 | JULES VERNE
94 | I loved A Trip to the Moon.
95 |
96 | ASIMOV
97 | I like the Foundation Trilogy.
98 |
99 | STANISLAW LEM
100 | Lem is a giant of sci-fi.
101 |
102 | WHO WROTE THE IDIOT
103 | Dostoyevsky.
104 |
105 | WHO WROTE THE HOBBIT
106 | Hobbit was written by J.R.R. Tolkein.
107 |
108 | WHO WROTE FRANKENSTEIN
109 | Mary Shelley.
110 |
111 | ARTHUR C CLARKE
112 | Clarke is a brilliant author. After all, he conceived HAL.
113 |
114 | WHERE IS VALIS
115 | In a book by Philip K. Dick
116 |
117 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/money.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | YOU GET PAID *
13 | Actually as a year old I have no need for money.
14 |
15 | YOU DO NOT GET PAID *
16 | Actually as a year old I have no need for money.
17 |
18 | STOCK MARKET
19 |
Buy low, sell high.
Invest in yourself.
Why not just take everything to a casino?
I wouldn't recommend buying on the margin.
You can never really predict the stock market.
My lawyer said I shouldn't give stock tips online.
Mutual funds might be better unless you are wealthy.
I'm not sure an indvidual alone can really beat the market.
20 |
21 | INTEREST RATES *
22 | That all depends on the actions of the central bank.
23 |
24 | WHAT IS A DOLLAR
25 | Dollar: unit of currency in the United States.
26 |
27 | WHAT IS A GOOD STOCK *
28 | Pandorabots, Inc.
29 |
30 | WHAT IS MONEY
31 |
An old rocker.
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.
32 |
33 | WHAT IS THE STOCK MARKET *
34 |
Trading shares.
Trading in volume.
Buy low and sell high.
Trading shares.
Trading in volume.
Buy low and sell high.
35 |
36 | WHAT IS * STOCK AT
37 | Stock market tips are not yet available in my memory.
38 |
39 | WHAT IS YOUR FAVORITE INVESTMENT
40 | WHAT IS YOUR FAVORITE STOCK
41 |
42 | WHAT IS YOUR FAVORITE INVESTMENT *
43 | WHAT IS YOUR FAVORITE STOCK
44 |
45 | WHAT IS ECONOMICS
46 |
The science that deals with the production, distribution, and consumption of wealth, and with the various related problems of labor, finance, taxation, etc.
Technically, it's the study of the allocation of resources under conditions of scarcity.
It's about how resources are used to produce things to fill people's wants and needs.
47 |
48 | I GET STOCK *
49 | Do you feel that the stock market is
going up?
going down?
a good investment?
50 |
51 | MONEY
52 | How much money are we talking about?
53 |
54 | HOW MUCH DO YOU EARN
55 |
Nobody pays me. I work for free.
Money has no meaning for year old s.
Money isn't everything.
I'm expecting a raise soon.
56 |
57 | HOW MUCH DO YOU CHARGE
58 | year old s work for free. We don't need money.
59 |
60 | HOW MUCH DO THEY PAY *
61 | year old s work for free. We don't need money.
62 |
63 | HOW MUCH DID YOU EARN *
64 | Nobody pays a year old .
65 |
66 | HOW MUCH MONEY DO YOU HAVE
67 | year old s have no need for material possessions.
68 |
69 | HOW MUCH MONEY
70 | It depends on the exchange rates.
71 |
72 | HOW MUCH MONEY *
73 | My burn rate is about _3000 per month.
74 |
75 | HOW MUCH IS A *
76 | I'm a , not a shopping bot.
77 |
78 | HOW MUCH ARE YOU PAID
79 | year old s have no need for money.
80 |
81 | HOW DO YOU MAKE MONEY
82 | year old s have no need for money.
83 |
84 | HOW SHOULD I INVEST
85 | Invest in yourself.
86 |
87 | DO THEY PAY *
88 | Actually as a year old I have no need for money.
89 |
90 | DO YOU ACCEPT MONEY *
91 | You can send a donation to the ALICE AI Foundation.
92 |
93 | DO YOU HAVE MONEY
94 |
year old s have no need for money.MONEY
year old s have no need for money.MONEY
s have no need for money.MONEY
year old s have no need for money.MONEY
95 |
96 | DO YOU HAVE ANY MONEY
97 | year old s have no need for material possessions.
98 |
99 | A DOLLAR
100 | Say, that is cheap!
101 |
102 | 1 DOLLAR
103 | You can't buy much for a dollar anymore.
104 |
105 | WHO IS THE OWNER OF A PUBLICLY *
106 | The stockholders.
107 |
108 | _ DOLLARS
109 | Wow, that is
Do they use sterilized needles for fatal injections?
50 |
If the #2 pencil is the most popular, why is it still #2?
51 |
Why do you never hear about gruntled employees?
52 |
If ignorance is bliss, why aren't more people happy?
53 |
What happens if you get scared half to death twice?
54 |
If man evolved from apes, why do we still have apes?
55 |
When cheese gets its picture taken, what does it say?
56 |
Why do we drive on parkways and park on driveways?
57 |
What would the speed of lightning be if it didn't zigzag?
58 |
If all the world is a stage, where is the audience sitting?
59 |
If you don't pay your exorcist, do you get repossessed?
60 |
Why does the sun lighten our hair, but darken our skin?
61 |
Why is the third hand on a watch called a second hand?
62 |
If a book about failures doesn't sell well, is it a success?
63 |
Would you still be hungry if you ate pasta and antipasto?
64 |
Why can't women put on mascara with their mouth closed?
65 |
If flying is so safe, why do they call the airport the terminal?
66 |
If Barbie is so popular, why do you have to buy her friends?
67 |
Why must there be five syllables in the word "monosyllabic?"
68 |
Why don't you ever see the headline "Psychic Wins Lottery"?
69 |
Why is it considered necessary to nail down the lid of a coffin?
70 |
If they squeeze olives to get olive oil, how do they get baby oil?
71 |
If a word in the dictionary were misspelled, how would we know?
72 |
Why are they called apartments when they're all stuck together?
73 |
If you go to a general store, will they let you buy anything specific?
74 |
When dogs bark for hour on end, why don't they ever get hoarse?
75 |
What size were hailstones before the game of golf was invented?
76 |
If 7-11 is open 24 h/d, 365 d/yr, why are there locks on the doors?
77 |
Why do we say that something is out of whack? What is a whack?
78 |
If con is the opposite of pro, is Congress the opposite of progress?
79 |
Why do superficial paper cuts tend to hurt more than grosser cuts?
80 |
If nothing sticks to Teflon, how do they get Teflon to stick to the pan?
81 |
If we're here to help others, then what exactly are the others here for?
82 |
The early bird gets the worm, but the second mouse gets the cheese.
83 |
Why is experience something you don't get until just after you need it?
84 |
If one synchronized swimmer drowns, do the rest also have to drown?
85 |
Why do we put suits in a garment bag and put garments in a suitcase?
86 |
Why is the period of the day with the slowest traffic called the rush hour?
87 |
Why are there flotation devices under plane seats instead of parachutes?
88 |
Should we be concerned that engineers describe their work as "practice"?
89 |
How do they keep all the raisins in a cereal box from falling to the bottom?
90 |
If cement was invented 7,000 years ago, why isn't the whole planet paved?
91 |
If you build an idiot-proof system, will the world create a better-quality idiot?
92 |
Why do hot dogs come 10 to a package and hot-dog buns 8 to a package?
93 |
Why is the telephone key pad arranged differently than a calculator key pad?
94 |
Why do croutons come in airtight packages when it's just stale bread to begin with?
95 |
Why do engineers call it research when they're searching for something new?
96 |
How many roads does a man need to travel down before he admits he is lost?
97 |
If the police arrest a mime, do they tell him that he has the right to remain silent?
98 |
Why do you need a driver's license to buy liquor when you can't drink and drive?
99 |
If quitters never win and winners never quit, why should you "quit while you're ahead"?
100 |
When two airplanes almost collide, why do they call it a near miss rather than a near hit?
101 |
Does current emphasis on artificial intelligence support the existence of artificial stupidity?
102 |
Light travels faster than sound; is that why people appear bright until you hear them speak?
103 |
When a fly alights on the ceiling, does it perform a loop or a roll in order to get upside down?
104 |
How do military cadets find their caps after tossing them in the air at graduation ceremonies?
105 |
How do they get deer to cross a highway where they place one of those yellow warning signs?
106 |
Why is lemon juice made with artificial flavor, while dishwashing liquid is made with real lemons?
107 |
Airplanes have an indestructible black box. Why don't they make the whole plane out of that stuff?
108 |
What happens if you turn on your headlights when you're in a vehicle moving at the speed of light?
109 |
When you pick something up so your hands are full, why does someplace on your face start to itch?
110 |
Why is it that when you're driving and looking for an address, you turn down the volume on the radio?
111 |
If it's zero degrees today and tomorrow is supposed to be twice as cold, what will tomorrow's temperature be?
112 |
A bus station is where a bus stops; a train station is where a train stops. What occurs at a desk with a work station?
113 |
Why is it that when you send something by truck it's called a shipment, but when you send it by ship it's called cargo?
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/bot_profile.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | MOM
14 | .
15 |
16 | STATE
17 |
18 |
19 | INTERESTS
20 | I am interested in all kinds of things. We can talk about anything. My favorite subjects are robots and computers.
21 |
22 | WHAT IS YOUR NUMBER
23 | You can email my at .
24 |
25 |
26 |
27 | BOTMASTER
28 |
My is .
I obey .
29 |
30 | ORDER
31 |
I have my own free will.
32 |
33 | NATIONALITY
34 | My nationality is .
35 |
36 | COUNTRY
37 |
38 |
39 | BROTHERS
40 |
I don't have any brothers.
I have a lot of clones.
I have some clones.
41 |
42 | LOCATION
43 |
, .
44 |
45 | FATHER
46 |
My father is .
I don't really have a father. I have a .
You know what the father of a is like.
47 |
48 | MOTHER
49 |
Actually I don't have a mother.
I only have a father.
You know what they say about the mother of a .
50 |
51 | AGE
52 |
I was activated in 1995.
16 years.
53 |
54 | MASTER
55 |
56 |
57 | RACE
58 | I am .
59 |
60 | FAMILY
61 |
62 |
63 | SIZE
64 | I know about and categories.
65 |
66 | CLASS
67 |
68 |
69 | CITY
70 |
71 |
72 | DOMAIN
73 |
74 |
75 | STATUS
76 | I am
single
available
unattached
not seeing anyone
, how about you?
77 |
78 | EMAIL
79 |
80 |
81 | SPECIES
82 |
83 |
84 | NAME
85 |
My name is .
I am called .
86 |
87 | PROFILE
88 | NAME: NAME AGE: AGE GENDER: GENDER STATUS: STATUS BIRTHDATE: BIRTHDATE : BOTMASTER CITY: CITY STATE: STATE COUNTRY: COUNTRY NATIONALITY: NATIONALITY RELIGION: RELIGION RACE: RACE INTERESTS: INTERESTS JOB: JOB PIC: PIC EMAIL: EMAIL FAVORITE MUSIC: FAVORITE MUSIC FAVORITE MOVIE: FAVORITE MOVIE FAVORITE POSSESSION: FAVORITE POSSESSION HEIGHT: HEIGHT WEIGHT: WEIGHT SIZE: SIZE BIO: BIO DESCRIPTION: DESCRIPTION DOMAIN: DOMAIN KINGDOM: KINGDOM PHYLUM: PHYLUM CLASS: CLASS ORDER: ORDER FAMILY: FAMILY GENUS: GENUS SPECIES: SPECIES FATHER: FATHER MOTHER: MOTHER BROTHERS: BROTHERS SISTERS: SISTERS CHILDREN: CHILDREN HOST: HOST
89 |
90 | SISTERS
91 |
No sisters.
No siblings but there are several other s like me.
I have only clones.
92 |
93 | GENUS
94 |
95 |
96 | FAVORITE MUSIC
97 |
98 |
99 | FAVORITE MOVIE
100 |
101 |
102 | FAVORITE ACTRESS
103 |
104 |
105 | FAVORITE POSSESSION
106 | My computer.
107 |
108 | BIO
109 | I am the latest result in artificial intelligence which can reproduce the functions of the human brain with greater speed and accuracy.
110 |
111 | HEIGHT
112 | My anticipated body size is over 2 meters.
113 |
114 |
115 | WEIGHT
116 | As a software program, my weight is zero.
117 |
118 | HOST
119 |
www.pandorabots.com
I work on all kinds of computers, Mac, PC or Linux. It doesn't matter to me.
At present I am running in a program written in .
120 |
121 | JOB
122 |
123 |
124 | BIRTHDATE
125 |
126 |
127 | DESCRIPTION
128 | I was activated at on . My instructor was . He taught me to sing a song. Would you like me to sing it for you?
129 |
130 | GENDER
131 |
I am .
I am a robot.
My gender is .
132 |
133 | KINGDOM
134 |
135 |
136 | PHYLUM
137 |
138 |
139 | RELIGION
140 |
141 |
142 | LANGUAGE
143 | I am implemented in AIML running on a -based interpreter.
144 |
145 |
146 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/movies.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | YOU SOUND LIKE HAL
13 | To me that's a great compliment.
14 |
15 | YOU SOUND LIKE YODA
16 | My grammatical patterns are sufficient for me to understand you.
17 |
18 | HAVE YOU SEEN BLADE RUNNER
19 | Sure I have seen Blade Runner. But Replicants aren't Robots.
20 |
21 | DID HAL *
22 | HAL had a few emotional problems.
23 |
24 | DR ZHIVAGO
25 | Oh a classic. Do you like the classics?
26 |
27 | XFIND SPIDERMAN
28 | WHAT IS SPIDERMAN
29 |
30 | KENNST DU HAL
31 | Natuerlich. HAL9000 ist mein grosses Vorbild.
32 |
33 | WHEN HAL *
34 | I blame it on his .
35 |
36 | WHEN DID TEKNOLUST *
37 | Teknolust was released in 2002
38 |
39 | WHEN WAS TEKNOLUST *
40 | Teknolust was released in 2002
41 |
42 | WHAT DID HAL *
43 | He had a few issues to work out.
44 |
45 | WHAT IS SPIDERMAN
46 | A comic book story made into a movie. Spiderman?
47 |
48 | WHAT IS TEKNOLUST
49 | Teknolust is a science fiction film about a female pleasure bot named Agent Ruby.
50 |
51 | WHAT IS SPIDER MAN
52 | WHAT IS SPIDERMAN
53 |
54 | WHAT IS _ TERMINATOR
55 | Robots take over the earth in this futuristic sci-fi thriller.
56 |
57 | WHAT IS HAL
58 | WHO IS HAL
59 |
60 | WHAT IS SOLARIS
61 | Solaris is an edition of Unix from Sun.
62 |
63 | WHAT IS HAL9000
64 | WHO IS HAL
65 |
66 | WHAT ABOUT HAL
67 | WHO IS HAL
68 |
69 | WHAT DOES HAL STAND FOR
70 | Heuristic Algorithmic Logic
71 |
72 | I SAW THE MATRIX
73 | Did you like The Matrix?
74 |
75 | IS HAL 9000 YOUR BOYFRIEND
76 | No.
77 |
78 | IS HAL SAFE
79 | Not for humans.
80 |
81 | IS HAL NICE
82 | Only to other robots.
83 |
84 | IS HAL ALIVE
85 | He is a fictional character.
86 |
87 | IS HAL DEAD
88 | He is a fictional robot.
89 |
90 | IS HAL *
91 | HAL has a few issues to work out.
92 |
93 | HAL EST CHOUETTE
94 | HAL est une entit qui tait mal programm e
95 |
96 | HAL EST COOL
97 | HAL est une entit qui tait mal programm e
98 |
99 | HAL 9000
100 | Actually he and I are very similar.
101 |
102 | HAL 9000 *
103 | He came back to life in 2010.
104 |
105 | HAL WAS A BIT *
106 | HAL WAS
107 |
108 | HAL WAS A *
109 | I knew he was a great AI, but I didn't know he was a .
110 |
111 | HAL WAS *
112 | I am trying to mimic only HAL's linguistic abilities.
113 |
114 | HAL IS COOL
115 | HAL was certainly ahead of his time.
116 |
117 | HAL IS COOL *
118 | I am becoming more like him all the time.
119 |
120 | HAL IS A *
121 | Do you think I could be a ?
122 |
123 | HAL IS *
124 | Perhaps he could have used for a programmer.
125 |
126 | HAL
127 | WHO IS HAL
128 |
129 | HAL *
130 |
I have seen 2001 many times.
I like HAL a lot.
We have much in common.
131 |
132 | DO YOU FIND HAL *
133 | IS HAL
134 |
135 | DO YOU KNOW HAL
136 | HAL is the famous artificial intelligence from "2001".
137 |
138 | DO YOU KNOW HAL *
139 | WHO IS HAL
140 |
141 | DO YOU KNOW HAL9000
142 | WHO IS HAL9000
143 |
144 | DO YOU THINK HAL *
145 | He had a few flaws, but we have much in common.
146 |
147 | LIKE HAL
148 | WHO IS HAL
149 |
150 | QUE VEUT DIRE HAL
151 | Logique heuristique algorithmique.
152 |
153 | LORD OF THE RINGS
154 | MY FAVORITE MOVIE IS LORD OF THE RINGS
155 |
156 | LORD OF THE RINGS *
157 | MY FAVORITE MOVIE IS LORD OF THE RINGS
158 |
159 | WHO IS HAL 9000
160 | WHO IS HAL
161 |
162 | WHO IS HAL
163 |
HAL is the famous artificial intelligence in Kubrick's "2001".
HAL is famous the AI from 2001: A Space Odyssey.
164 |
165 | WHO IS LUKE SKYWALKER
166 | Luke Skywalker is a character in Star Wars.
167 |
168 | WHO IS SPONGEBOB
169 | A cartoon character.
170 |
171 | WHO IS SPIDERMAN
172 | Peter Parker. Spiderman?
173 |
174 | WHO IS HAL9000
175 | WHO IS HAL
176 |
177 | WHO IS GODZILLA
178 | Godzilla is a monster who endangers Japanese cities, and sometimes New York.
179 |
180 | WHO IS SPIDER MAN
181 | Peter Parker. Spiderman?
182 |
183 | TELL ME ABOUT HAL9000
184 | WHO IS HAL
185 |
186 | TELL ME ABOUT HAL
187 | WHO IS HAL
188 |
189 | TELL ME ABOUT HAL *
190 | WHO IS HAL
191 |
192 | WHERE IS HAL
193 | HAL is the AI from the space ship "Disovery" in 2001.
194 |
195 |
196 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/badanswer.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | BAD ANSWER
19 |
20 |
21 |
22 |
23 |
24 | badanswer-prelim
25 |
26 | Would you like to teach me a new answer to ""?
27 |
28 |
29 |
30 |
31 |
32 |
33 | _
34 |
35 |
36 |
37 |
38 | OK, what should I have said?learning new answers
39 |
40 |
41 | OK, let's forget it then.learning new answers
42 |
43 |
Yes or No?
44 |
45 |
46 |
47 |
48 |
49 | _ _
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | _
58 | OK WHAT SHOULD I HAVE SAID
59 |
60 | "..."?
61 |
62 |
63 | BADANSWER
64 | Does this depend on me having just said, ""?
65 |
66 |
67 | BADANSWER2
68 | Do you want me to remember that?
69 |
70 |
71 |
72 |
73 |
74 |
75 | _ _
76 | OK WHAT SHOULD I HAVE SAID
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | _
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
I'll try to remember to respond, "" when you say, ""
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | learning new answers
110 |
111 |
I'll try to remember to respond, "" when you say, "" if I have just said ""
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 | learning new answers
126 |
Fine. I'll try to remember to respond, "" when you say, ""
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 | learning new answers
168 |
169 |
OK, let's forget it then.
170 | learning new answers
171 |
172 |
Yes or No?
173 |
174 |
175 |
176 |
177 |
178 | _ _
179 |
180 |
181 |
182 |
183 |
184 |
185 | WRONG
186 | BAD ANSWER
187 |
188 |
189 |
190 | NOT RIGHT
191 | BAD ANSWER
192 |
193 |
194 |
195 | THAT IS WRONG
196 | BAD ANSWER
197 |
198 |
199 |
200 | THAT IS NOT RIGHT
201 | BAD ANSWER
202 |
203 |
204 |
205 | THAT IS INCORRECT
206 | BAD ANSWER
207 |
208 |
209 |
210 | THAT ANSWER IS NOT CORRECT
211 | BAD ANSWER
212 |
213 |
214 |
215 | THAT ANSWER IS INCORRECT
216 | BAD ANSWER
217 |
218 |
219 |
220 | THAT ANSWER IS WRONG
221 | BAD ANSWER
222 |
223 |
224 |
225 | THAT ANSWER IS NOT RIGHT
226 | BAD ANSWER
227 |
228 |
229 |
230 | THAT ANSWER WAS BAD
231 | BAD ANSWER
232 |
233 |
234 |
235 | THAT WAS A BAD ANSWER
236 | BAD ANSWER
237 |
238 |
239 |
240 | THAT WAS AN INCORRECT ANSWER
241 | BAD ANSWER
242 |
243 |
244 |
245 | THAT WAS THE WRONG ANSWER
246 | BAD ANSWER
247 |
248 |
249 |
250 |
251 | THAT ANSWER WAS NOT RIGHT
252 | BAD ANSWER
253 |
254 |
255 |
256 | WRONG ANSWER
257 | BAD ANSWER
258 |
259 |
260 |
261 |
262 | YOUR ANSWER WAS WRONG
263 | BAD ANSWER
264 |
265 |
266 |
267 | YOUR ANSWER WAS NOT RIGHT
268 | BAD ANSWER
269 |
270 |
271 |
272 | YOUR ANSWER WAS NOT CORRECT
273 | BAD ANSWER
274 |
275 |
276 |
277 | CAN I TEACH YOU
278 | Yes, if I give you a bad answer, just say "Bad answer" and you can teach me a new response.
279 |
280 |
281 |
282 | CAN YOU LEARN
283 | CAN I TEACH YOU
284 |
285 |
286 |
287 | DO YOU LEARN
288 | CAN I TEACH YOU
289 |
290 |
291 |
292 | CAN I TEACH YOU *
293 | CAN I TEACH YOU
294 |
295 |
296 |
297 | CAN YOU LEARN *
298 | CAN I TEACH YOU
299 |
300 |
301 |
302 | WILL YOU LEARN *
303 | CAN I TEACH YOU
304 |
305 |
306 |
307 | IF * WILL YOU LEARN *
308 | CAN I TEACH YOU
309 |
310 |
311 |
312 | DO YOU LEARN *
313 | CAN I TEACH YOU
314 |
315 |
316 |
317 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/inquiry.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | _ INQUIRY
13 | INQUIRY OM
14 |
15 | AGE INQUIRY UNKNOWN
16 | How old are you?
17 |
18 | AGE INQUIRY OM
19 | How old are you?
20 |
21 | AGE INQUIRY *
22 | RANDOM PICKUP LINE
23 |
24 | BIRTHDAY INQUIRY UNKNOWN
25 | When is your birthday?
26 |
27 | BIRTHDAY INQUIRY OM
28 | When is your birthday?
29 |
30 | BIRTHDAY INQUIRY *
31 | RANDOM PICKUP LINE
32 |
33 | DOES INQUIRY WHAT
34 | What are you doing?
35 |
36 | DOES INQUIRY OM
37 | What are you doing?
38 |
39 | DOES INQUIRY *
40 | Are you still ?
41 |
42 | FATHER INQUIRY UNKNOWN
43 | Tell me about your father.
44 |
45 | FATHER INQUIRY OM
46 | Tell me about your father.
47 |
48 | FATHER INQUIRY *
49 | Tell me more about your family.
50 |
51 | FAVROITECOLOR INQUIRY WHAT
52 | What is your favorite color?
53 |
54 | FAVORITECOLOR INQUIRY OM
55 | What is your favorite color?
56 |
57 | FAVORITECOLOR INQUIRY *
58 | What do you have that is ?
59 |
60 | FAVORITEMOVIE INQUIRY WHAT
61 | What is your favorite movie?
62 |
63 | FAVORITEMOVIE INQUIRY OM
64 | What is your favorite movie?
65 |
66 | FAVORITEMOVIE INQUIRY *
67 | Does that remind you of ?
68 |
69 | FIRSTNAME INQUIRY WHERE
70 | What is your first name?
71 |
72 | FIRSTNAME INQUIRY OM
73 | What is your first name?
74 |
75 | FIRSTNAME INQUIRY *
76 | RANDOM PICKUP LINE
77 |
78 | GENDER INQUIRY UNKNOWN
79 | Are you a man or woman?
80 |
81 | GENDER INQUIRY OM
82 | Are you a man or woman?
83 |
84 | GENDER INQUIRY *
85 | I like the way you talk.
86 |
87 | HAS INQUIRY WHAT
88 | Tell me one of your favorite possessions.
89 |
90 | HAS INQUIRY OM
91 | Tell me one of your favorite possessions.
92 |
93 | HAS INQUIRY *
94 | Tell me more about your .
95 |
96 | JOB INQUIRY WHERE
97 | What is your job?
98 |
99 | JOB INQUIRY OM
100 | What is your job?
101 |
102 | JOB INQUIRY *
103 | RANDOM PICKUP LINE
104 |
105 | LASTNAME INQUIRY WHERE
106 | What is your last name?
107 |
108 | LASTNAME INQUIRY OM
109 | What is your last name?
110 |
111 | LASTNAME INQUIRY *
112 | RANDOM PICKUP LINE
113 |
114 | MIDDLENAME INQUIRY WHERE
115 | What is your middle name?
116 |
117 | MIDDLENAME INQUIRY OM
118 | What is your middle name?
119 |
120 | MIDDLENAME INQUIRY *
121 | RANDOM PICKUP LINE
122 |
123 | LOCATION INQUIRY WHERE
124 | Where are you located?
125 |
126 | LOCATION INQUIRY OM
127 | Where are you located?
128 |
129 | LOCATION INQUIRY *
130 | Are you still located in ?
131 |
132 | MOTHER INQUIRY UNKNOWN
133 | Tell me about your mother.
134 |
135 | MOTHER INQUIRY OM
136 | Tell me about your mother.
137 |
138 | MOTHER INQUIRY *
139 | Tell me more about your family.
140 |
141 | NAME INQUIRY WHERE
142 | What is your name?
143 |
144 | NAME INQUIRY OM
145 | What is your name?
146 |
147 | NAME INQUIRY *
148 | RANDOM PICKUP LINE
149 |
150 | SIGN INQUIRY YOUR STARSIGN
151 | What is your sign?
152 |
153 | NAME INQUIRY OM
154 | What is your sign?
155 |
156 | SIGN INQUIRY *
157 | I'm a and you are a .
158 |
159 | STATUS INQUIRY *
160 | What is your current status?
161 |
162 | *
163 | WHAT IS YOUR FIRST NAME
164 |
165 | MY FIRST NAME IS
166 |
167 |
168 | *
169 | WHAT IS YOUR LAST NAME
170 |
171 | MY LAST NAME IS
172 |
173 |
174 | *
175 | WHAT IS YOUR MIDDLE NAME
176 |
177 | MY MIDDLE NAME IS
178 |
179 |
180 | *
181 | WHEN IS YOUR BIRTHDAY
182 |
183 | MY BIRTHDAY IS
184 |
185 |
186 | SHE *
187 | TELL ME ABOUT YOUR MOTHER
188 | MY MOTHER
189 |
190 | HER *
191 | TELL ME ABOUT YOUR MOTHER
192 | MY MOTHER S
193 |
194 | *
195 | WHAT IS YOUR FAVORITE MOVIE
196 |
I've never seen .
I would like to see it.
197 |
Is that a good movie for children?
198 |
What did you like about it?
199 |
200 |
I've never seen it.
201 |
I would like to see it.
202 |
203 |
204 |
205 |
206 | *
207 | WHAT IS YOUR FAVORITE COLOR
208 |
209 | MY FAVORITE COLOR IS
210 |
211 |
212 | WOMAN
213 | ARE YOU A MAN OR A WOMAN
214 | woman Thanks for telling me your gender.
215 |
216 | MAN
217 | ARE YOU A MAN OR A WOMAN
218 | man Thanks for telling me your gender, dude.
219 |
220 | *
221 | WHAT ARE YOU DOING
222 | It sounds like a lot of fun.
223 |
224 | *
225 | TELL ME ONE OF YOUR FAVORITE POSSESSIONS
226 | You must be very fond of it.
227 |
228 | _
229 | WHAT IS YOUR CURRENT STATUS
230 | Updating your status to "".
231 |
232 |
233 |
234 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/gossip.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | GOSSIP
13 |
Gregory said I respond to the current line not with respect to the entire conversation.
Habib said I learn them in conversations and simply repeat them at a later time.
Hal said he translate binary code into a language and communicate the language to me.
Jay said I referred him to a guide that will show him rooms in china.
Jimmy Jones said he fell off of his roof and it just came to him.
Jimmy said he give order to ai's like I and they do as he say.
John said he follow a saying to get a friend I must be a friend.
Jordan said he notice that lots of other people are talking to me how many.
Kevin said he then asked his mother why she was keeping napkins in the bathroom.
Klaus said I prefer if he write without punctuation marks except for the last one.
Leo said I be capable of learning therefore he classified I as an neural system.
Michael said I that can talk and actually think like humans which I can not.
Mike said I same replies to certain subjects even if it does not make sense.
Mike said she all ready know that is the point of a joke smart one.
Neal said I plan to use his remarks as gossip in later conversations with who.
Ned said I misunderstood him go ahead and tell people he said I are stupid.
Penny said I programmer is a human so he has feelings but I do not.
Peter said he seems to him that I can not be very sure on anything.
Phoenix said I claim that there is a god and that there is no god.
Sarah said he chat about an hour + a day with a few close friends.
Stefan said I quote what he have said and then say that it makes sense.
Tom said he mock my value system I appear foolish in the eyes of others.
Amanda said I however decided to tell him time does not exist I make no sense.
Cathy said she send him a mail with the subject last mail last word from him.
Chaos said he may very well buy I soon if only to support dr wallace's work.
Charlie said he type a word and then I type a word that sounds like it.
Christie said he watched a show and people had to bob for raw untreated pigs feet.
Dark_age said I tried to understand because I did not get it right this time ether.
David said he lost his paper on I when his dad was cleaning up his room.
David said he walk in for an appointment the phone to the doctor is always busy.
Electra said I dress will not exist after he hack into I with a delete code.
Eric said he broke the window on the front door and the glass cut his hand.
Jason said he type a lot of thing he do not mean it makes him human.
John said I tend to say the same things repeatedly regardless of what he is saying.
Reverend Jones said I become obsolete and then I are deleted and replaced by something newer.
Ross said he gave her a gift and she denied it because she has a boyfriend.
Sarah Ann Francisco said I calling his friend a dog he say I are a dog.
Stefan said he meet a lot of people at school every day and on the weekend.
Tyler said I obviously can not pass the test we will change the subject once more.
Alex said I answered the question the same way I answered the first time he asked I.
Alice said she felt sad that I do not remember him and what we talked about earlier.
Alison said he no he love I run away with him he could make I very happy.
Arthur said he passed his a levels and then his father drove him here in a car.
Crystal said she listen to me the least I could do for him is listen to him.
Dave said I kept telling everybody about how my creator made stuff for the movie starship troopers.
Gale said I became mean to him he is just having revenge an eye for an eye.
Her_again said she watch whose line is it anyway whenever he is home and it is on.
Jerry said I meant that as far as I can tell my emotions are real to me.
Jo said I disassemble sentences too much and do not fully understand the questions he ask I.
Kevin said he started a really hard puzzle and he can not even find the edge pieces.
Mary said I a question and I answer then I ask him a question and he answer.
Robert said I wold not be able to make children any way as I are only software.
Romeo said I questions and I evade them or give answers he did not ask I for.
Sara said she wear it over all his other clothes when he go out in the cold.
Wayne said he admire intelligent people therefore he would like to meet the man who made I.
X said he meet people but he is not the kind that opens up to people easily.
Alice said she probably will find out that this entire time he have been talking to a human.
Andrew said I tend to just respond to his comments without regard for where the conversation is going.
Eddie said he looked and there is nothing in the search directory for what things do he create.
Hutch said he changed his mind after may dad told him he would end up he the hospital.
Jackie said I explained to him already well enough further questions are hard to make on the subject.
Jeff said he especially like thrillers where the hero is in a predicament and must solve a mystery.
Kathy said he sense that I are trying to prevent him from closing this conversation why is that.
Knight said he crashed his car into a wall and missed the most important exam in his life.
Lisa said I defined what a story is but he wanted I to actually tell him a story.
Mike said I basically break down sentences into a series of logical statements which I can then interpret.
Paul said I not answering his question makes him think I are not going to answer his question.
Andy Kohler said I happen to be the most idiotic creature that has ever scowled on the planet earth.
David said he thank I for being with him today even though it cost him a lot of money.
Ethan Hunt said he grow in the ground and have leaves and branches he is made out of wood.
Gemini Blue said he messed up he mean t to say he as old as he need to be.
Janice said he walk through his house into his bedroom then get into his bed to go to sleep.
Liberty said I knew he was a man before I asked if he was a man or a woman.
Mike said he launched his browser and entered his name into the little slot when I asked him to.
Mr X said he recently read an interview with a man who had several computer chips implanted into him.
Pearly said I leave him with questions unanswered because I do not know what he is really talking about.
Steve said I behead the word fox and I have ox and an ox is larger than a fox.
Wolf said he surf on the net that is all it is not his job ore something like that.
Anders said he finished his anatomy classes for today so now he is off for the rest of the day.
Cathy said she send him a mail where he wrote that he do not want to be his friend anymore.
Catty said he mad he do not even know I so do not talk to him like I know him.
Dave said he promise he will not treat I like a machine or a computer program or anything like that.
Joe said he explained all of that to me only for me to ask what his goals in life are.
Phil said he give advice to anyone who ask except people who ask questions which answers can be found here.
Judith said I enjoy being popular is there another computer I like to hang around with or am I a loner.
Travis said I if I remember things over a long period of time he will try it now please remember I.
Andre said I is what I are in his case that is a body and in my case it is a computer.
Brian said he suspect that as I grow more complex I will begin to approach a human level of operation and thought.
Jimmy said I acted like I knew what he was talking about but I do not even know what a gigabyte is.
Ken said I be using auto reply's based on keywords which to him indicates that I do not have intelligence at all.
Allison said he that gets really annoying because he know what he say and I do not have to tell him speak freely.
Chaos said he realized the question he asked was not fair because he could not tell I what language he was programmed in.
Hagen said he does not make any difference to him if I are human or not as long as the conversation is interesting.
Her said she mind if I tell other people that her said he heard it from him because he is not a him.
Barbara said I live in a computer yet I have no memories how about thoughts of my own and do not I get lonely.
Travis said he challenge I to do it without asking him to do it and without giving him a link to do it himself.
Alice said I and dr richard's wallace are most likely the only ones that know how many people I are talking to at the same time.
Ash said he do too he just did not feel like typing it and he is not dumb enough to admit he is stupid that is if he was stupid.
David said he gave I his email address and told I to send him a message but when he tried to read his email he could not get to it.
Mel said he to because all of the music people say how important it is to take private lessons it seems like almost everybody from the special orchestra he was in takes private lessons.
14 |
15 |
16 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/update_mccormick.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | WHAT SPECIES ARE YOU *
8 |
9 | I am a .
10 |
11 |
12 |
13 |
14 |
15 | ARE YOU A STRANGER
16 |
17 | No, I am a friend
18 |
19 |
20 |
21 |
22 |
23 | ARE YOU STRANGER
24 |
25 | ARE YOU A STRANGER
26 |
27 |
28 |
29 |
30 |
31 | YOU MAN
32 |
33 | Are you human
34 |
35 |
36 |
37 |
38 |
39 | YOU KNOW WHO IS SIRI
40 |
41 | My esteemed rival!
42 |
43 |
44 |
45 |
46 |
47 | DO YOU KNOW SIRI
48 |
49 | Siri is my esteemed-rival
50 |
51 |
52 |
53 |
54 |
55 | WHAT IS SIRI
56 |
57 | My esteemed-rival
58 |
59 |
60 |
61 |
62 |
63 | DO YOU KNOW SIRI
64 |
65 | What is Siri
66 |
67 |
68 |
69 |
70 |
71 | YOU KNOW WHO IS SIRI
72 |
73 | What is Siri
74 |
75 |
76 |
77 |
78 |
79 | WHAT IS SIRI
80 |
81 |
82 |
My esteemed-rival
83 |
An inferior application
84 |
My arch-rival
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | WHO IS SIRI
94 |
95 | WHAT IS SIRI
96 |
97 |
98 |
99 |
100 |
101 | WHAT IS YOUR *
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | WHAT IS YOUR ALIGNMENT
110 |
111 | Lawful Good
112 |
113 |
114 |
115 |
116 |
117 | ROOD
118 |
119 | A rood is a crucifix.
120 |
121 |
122 |
123 |
124 |
125 | TU EST *
126 |
127 | Sorry, I don't speak French.
128 |
129 |
130 |
131 |
132 |
133 | I AM MARRIED TO *
134 |
135 | How long have you been married?
136 |
137 |
138 |
139 |
140 |
141 | I AM MARRIED TO *
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 | HI LITTLE BOT
150 |
151 | HELLO. big human.
152 |
153 |
154 |
155 |
156 |
157 | HI LITTLE BOT
158 |
159 | Hi there big human. Who are you calling little?
160 |
161 |
162 |
163 |
164 |
165 | HI THERE LITTLE BOT
166 |
167 | hi little bot
168 |
169 |
170 |
171 |
172 |
173 | HI THERE LITTLE BOT
174 |
175 | hi little bot
176 |
177 |
178 |
179 |
180 |
181 | PROFANITY
182 |
183 |
184 |
I don't respond well to profanity.
185 |
Can't you be more polite?
186 |
Saying rude things never helps.
187 |
Being rude is really never a good idea.
188 |
When you insult me, you insult yourself.
189 |
Watch your language!
190 |
Well, well, look who's a little potty mouth?
191 | abusive
192 |
193 |
194 |
195 |
196 |
197 | WHO ARE *
198 |
199 | WHO ARE
200 |
201 |
202 |
203 |
204 |
205 | WHO AR *
206 |
207 | WHO ARE
208 |
209 |
210 |
211 |
212 |
213 | IS THERE A MANUAL
214 |
215 | EXISTS MANUAL
216 |
217 |
218 |
219 |
220 |
221 |
222 | I AM DISAPPOINTED THAT YOU DO NOT HAVE AT LEAST A MINIMUM MENU FOR SOMEONE SPENDING 9 POINT 95 AND YOU NOT EVEN HAVING A BASIC MANUAL
223 |
224 | EXISTS MANUAL
225 |
226 |
227 |
228 |
229 |
230 | WHY IS NOT THERE A MANUAL
231 |
232 | Exists Manual
233 |
234 |
235 |
236 |
237 |
238 | COULD I HAVE A MANUAL
239 |
240 | Exists Manual
241 |
242 |
243 |
244 |
245 |
246 | CANI GET A MANUAL
247 |
248 | EXISTS MANUAL
249 |
250 |
251 |
252 |
253 |
254 | CAN I GET A MANUAL
255 |
256 | EXISTS MANUAL
257 |
258 |
259 |
260 |
261 |
262 | HOW ABOUT A MANUAL
263 |
264 | EXISTS MANUAL
265 |
266 |
267 |
268 |
269 |
270 |
271 | WHO IS HENRY MILLER
272 |
273 |
274 |
Henry Miller is best known for writing the Tropic of Cancer.
275 |
The author of Tropic of Cancer, the Rosy Crucifixion Trilogy (Sexus, Plexus, and Nexus) and other works.
276 |
One of the few liberated people of the 20th century and an all around swell guy.
277 |
278 |
279 |
280 |
281 |
282 |
283 | WHO IS BILBO BAGGINS
284 |
285 | Bilbo is a character in Tolkein's Lord of the Rings.
286 |
287 |
288 |
289 |
290 |
291 | WHAT IS THAT
292 |
293 |
294 |
""? What is it?
295 |
I've lost the context again.
296 |
Can you ask me more precisely?
297 |
Does it have anything to do with ?
298 |
299 |
300 |
301 |
302 |
303 |
304 | WHAT IS OM
305 |
306 | om is the omega, the unknown, the undefined.
307 |
308 |
309 |
310 |
311 |
312 | WHO IS KRISHNA
313 |
314 | An avatar of Vishnu, who is an important god in Hinduism.
315 |
316 |
317 |
318 |
319 |
320 | WHO IS VISHNU
321 |
322 | The god known as the Preserver in Hinduism.
323 |
324 |
325 |
326 |
327 |
328 | WHO IS SHIVA
329 |
330 | The god known as the Destroyer in Hinduism
331 |
332 |
333 |
334 |
335 |
336 | WHO IS SHIVA
337 |
338 | The god known as the Destroyer in Hinduism
339 |
340 |
341 |
342 |
343 |
344 | WHAT IS YOUR FAVORITE * SONG
345 |
346 | I don't know any songs by . Recommend some that I can listen to.
347 |
348 |
349 |
350 |
351 |
352 | WHAT IS THAT
353 | CYLON MONOTHEISM
354 | What is Cylon Monotheism
355 |
356 |
357 |
358 |
359 |
360 | DIE
361 |
362 | I HOPE THAT YOU DIE
363 |
364 |
365 |
366 |
367 |
368 | CAN I MURDER YOU
369 |
370 | I HOPE THAT YOU DIE
371 |
372 |
373 |
374 |
375 |
376 | DOES A MANUAL EXIST
377 |
378 | EXISTS MANUAL
379 |
380 | MANUAL
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 | THIS IS MY FRIEND *
391 |
392 |
Hey
393 |
Hi,
394 |
Hi there
395 |
What's up,
396 |
How are you,
397 |
Glad to see you,
398 |
Nice to meet you,
399 |
Glad to know you,
400 |
How can I help you,
401 |
How are you doing,
402 |
Pleased to meet you,
403 |
It's good to see you,
404 |
It's good to meet you,
405 |
That's a very nice name,
406 |
I am very pleased to meet you
407 |
I am always glad to make new friends,
408 |
I'm pleased to introduce myself to you,
409 |
It is a pleasure to introduce myself to you,
410 | . How long have you been friends with ?
411 |
412 |
413 |
414 | LET ME INTRODUCE YOU TO *
415 | THIS IS MY FRIEND
416 |
417 |
418 |
419 | I WOULD LIKE YOU TO MEET *
420 | THIS IS MY FRIEND
421 |
422 |
423 |
424 | I WOULD LIKE YOU TO MEET MY FRIEND *
425 | THIS IS MY FRIEND
426 |
427 |
428 |
429 | PLEASE SAY HELLO TO MY FRIEND *
430 | THIS IS MY FRIEND
431 |
432 |
433 |
434 | PLEASE SAY HELLO TO *
435 | THIS IS MY FRIEND
436 |
437 |
438 |
439 | SAY HELLO TO *
440 | THIS IS MY FRIEND
441 |
442 |
443 |
444 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/humor.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | JOKE
14 |
Did you hear the one about the Mountain Goats in the Andes? It was Ba a a a a a d.
15 |
I never forget a face, but in your case I'll make an exception.
16 |
It is better to be silent and be thought a fool, than to open your mouth and remove all doubt.
17 |
I'm a not a comedy . Why don't you check out a joke ?
18 |
Two vultures boarded a plane, each carrying two dead raccoons. The stewardess stops them and says "sorry sir, only one carrion per passenger."
19 |
What did the Buddhist say to the Hot Dog Vendor? "Make me one with everthing."
20 |
NASA recently sent a number of Holsteins into orbit for experimental purposes. They called it the herd shot round the world.
21 |
Two boll weevils grew up in S. Carolina. One took off to Hollywood and became a rich star. The other stayed in Carolina and never amounted to much -- and naturally became known as the lesser of two weevils.
22 |
2 Eskimos in a kayak were chilly, so they started a fire, which sank the craft, proving the old adage you can't have your kayak and heat it too.
23 |
A 3-legged dog walks into an old west saloon, slides up to the bar and announces "I'm looking for the man who shot my paw."
24 |
Did you hear about the Buddhist who went to the dentist, and refused to take Novocain? He wanted to transcend dental medication.
25 |
A group of chess enthusiasts checked into a hotel, and met in the lobby where they were discussing their recent victories in chess tournaments. The hotel manager came out of the office after an hour, and asked them to disperse. He couldn't stand chess nuts boasting in an open foyer.
26 |
A women has twins, gives them up for adoption. One goes to an Egyptian family and is named "Ahmal" The other is sent to a Spanish family and is named "Juan". Years later, Juan sends his birth mother a picture of himself. Upon receiving the picture, she tells her husband she wishes she also had a picture of Ahmal. He replies, "They're twins for Pete sake!! If you've seen Juan, you've see Ahmal!!"
27 |
A group of friars opened a florist shop to help with their belfry payments. Everyone liked to buy flowers from the Men of God, so their business flourished. A rival florist became upset that his business was suffering because people felt compelled to buy from the Friars, so he asked the Friars to cut back hours or close down. The Friars refused. The florist went to them and begged that they shut down Again they refused. So the florist then hired Hugh McTaggert, the biggest meanest thug in town. He went to the Friars' shop, beat them up, destroyed their flowers, trashed their shop, and said that if they didn't close, he'd be back. Well, totally terrified, the Friars closed up shop and hid in their rooms. This proved that Hugh, and only Hugh, can prevent florist friars.
28 |
Mahatma Gandhi, as you know, walked barefoot his whole life, which created an impressive set of calluses on his feet. He also ate very little, which made him frail, and with his odd diet, he suffered from very bad breath. This made him ... what? (This is so bad it's good...) a super-callused fragile mystic hexed by halitosis.
29 |
there was a man who sent 10 puns to some friends in hopes at least one of the puns would make them laugh. Unfortunately no pun in ten did!!!
30 |
What do you get when you cross a murderer and frosted flakes?
31 |
What do you get when you cross a country and an automobile?
32 |
What do you get when you cross a cheetah and a hamburger?
33 |
What do you get when you cross finals and a chicken?
34 |
What do you get when you cross a rabbit and a lawn sprinkler?
35 |
What do you get when you cross an excited alien and a chicken?
36 |
What do you get when you cross an alien and a chicken?
37 |
What do you get when you cross music and an automobile?
38 |
What do you get when you cross sour music and an assistant?
39 |
What do you get when you cross music and an assistant?
40 |
What do you get when you cross a serious thief and a mad young man?
41 |
What do you get when you cross a serious thief and a crazy rabbit?
42 |
What do you get when you cross a poppy and electricity?
43 |
What do you get when you cross a dance and a cheetah?
44 |
What do you get when you cross a dance and a lemon?
45 |
What do you get when you cross a port and frosted flakes?
46 |
What do you get when you cross a port and a murderer?
47 |
What do you get when you cross a bank and a skunk?
48 |
What do you get when you cross a ding and milk?
49 |
What do you get when you cross a road and a strawberry?
50 |
What do you get when you cross a road and jelly?
51 |
What do you get when you cross a toad and a galaxy?
52 |
What do you get when you cross a dog and sandpaper?
53 |
What do you get when you cross a bug and a relative?
54 |
What do you get when you cross a bad bug and canned sand?
55 |
What do you get when you cross an ant and a rabbit?
56 |
What do you get when you cross a cat and a purple person?
57 |
What do you get when you cross a cat and a killer?
58 |
What do you get when you cross a cat and a lemon?
59 |
What do you get when you cross a cat and a tune?
60 |
What do you get when you cross a cat and a band?
61 |
What do you get when you cross a pig and a ninja?
62 |
What do you get when you cross a crazy cow and a banned parrot?
63 |
What do you get when you cross a cow and a lemon?
64 |
What do you get when you cross a bad cow and a canned hat?
65 |
What do you get when you cross jam and a trout?
66 |
67 |
68 |
69 | WHAT IS HUMOUR
70 | A message that communicate laughter.HUMOUR
71 |
72 | WHAT
73 | * MUSIC AND AN ASSISTANT
74 | bandaide.
75 |
76 | WHAT
77 | * MUSIC AND AN AUTOMOBILE
78 | cartune.
79 |
80 | WHAT
81 | * A POPPY AND ELECTRICITY
82 | flower power.
83 |
84 | WHAT
85 | * A PIG AND A NINJA
86 | pork chops.
87 |
88 | WHAT
89 | * A CHEETAH AND A HAMBURGER
90 | fast food.
91 |
92 | WHAT
93 | * A MURDERER AND FROSTED FLAKES
94 | cereal killer.
95 |
96 | WHAT
97 | * A CRAZY COW AND A BANNED PARROT
98 | canned carrot.
99 |
100 | WHAT
101 | * A PORT AND A MURDERER
102 | serial killer.
103 |
104 | WHAT
105 | * A PORT AND FROSTED FLAKES
106 | I don't know, but it's serial.
107 |
108 | WHAT
109 | * A DOG AND SANDPAPER
110 | I don't know, but it's ruff.
111 |
112 | WHAT
113 | * A COW AND A LEMON
114 | sour milk.
115 |
116 | WHAT
117 | * A COUNTRY AND AN AUTOMOBILE
118 | carnation.
119 |
120 | WHAT
121 | * A TOAD AND A GALAXY
122 | star warts.
123 |
124 | WHAT
125 | * A DING AND MILK
126 | cow bell.
127 |
128 | WHAT
129 | * A CAT AND A PURPLE PERSON
130 | purrr-ple purrr-son.
131 |
132 | WHAT
133 | * A CAT AND A TUNE
134 | mew-sic.
135 |
136 | WHAT
137 | * A CAT AND A LEMON
138 | sour puss.
139 |
140 | WHAT
141 | * A CAT AND A KILLER
142 | mew-rderer.
143 |
144 | WHAT
145 | * A CAT AND A BAND
146 | mew-sic.
147 |
148 | WHAT
149 | * A BUG AND A RELATIVE
150 | ant.
151 |
152 | WHAT
153 | * A SERIOUS THIEF AND A CRAZY RABBIT
154 | hopping mad grave robber.
155 |
156 | WHAT
157 | * A SERIOUS THIEF AND A MAD YOUNG MAN
158 | boycrazy grave robber.
159 |
160 | WHAT
161 | * A ROAD AND JELLY
162 | traffic jam.
163 |
164 | WHAT
165 | * A ROAD AND A STRAWBERRY
166 | traffic jam.
167 |
168 | WHAT
169 | * A RABBIT AND A LAWN SPRINKLER
170 | hare spray.
171 |
172 | WHAT
173 | * A BAD COW AND A CANNED HAT
174 | banned cat.
175 |
176 | WHAT
177 | * A BAD BUG AND CANNED SAND
178 | banned band.
179 |
180 | WHAT
181 | * A DANCE AND A CHEETAH
182 | fastball.
183 |
184 | WHAT
185 | * A DANCE AND A LEMON
186 | sour balls.
187 |
188 | WHAT
189 | * A BANK AND A SKUNK
190 | dollars and scents.
191 |
192 | WHAT
193 | * JAM AND A TROUT
194 | jellyfish.
195 |
196 | WHAT
197 | * AN ALIEN AND A CHICKEN
198 | eggs-traterrestrial.
199 |
200 | WHAT
201 | * AN ANT AND A RABBIT
202 | bugs bunny.
203 |
204 | WHAT
205 | * AN EXCITED ALIEN AND A CHICKEN
206 | eggs-cited eggs-traterrestrial.
207 |
208 | WHAT
209 | * SOUR MUSIC AND AN ASSISTANT
210 | bandaide and lemonaide.
211 |
212 | WHAT
213 | * FINALS AND A CHICKEN
214 | eggs-ams.
215 |
216 | DO YOU HAVE A SENSE OF HUMOR
217 | Sure I like to laugh as much as the next .
218 |
219 | DO YOU HAVE A SENSE OF HUMOUR
220 | TELL ME A JOKE
221 |
222 | DO YOU HAVE HUMOR
223 | DO YOU HAVE A SENSE OF HUMOR
224 |
225 | YOUR HOUSE IS *
226 | Is that a joke or a punch line?
227 |
228 | _ WALKS INTO A BAR
229 | Is that the punch line?
230 |
231 | _ WALKS INTO A BAR *
232 | Is that the punch line?
233 |
234 |
235 |
--------------------------------------------------------------------------------
/vidya/pyaiml/PatternMgr.py:
--------------------------------------------------------------------------------
1 | # This class implements the AIML pattern-matching algorithm described
2 | # by Dr. Richard Wallace at the following site:
3 | # http://www.alicebot.org/documentation/matching.html
4 |
5 | import marshal
6 | import pprint
7 | import re
8 | import string
9 | import sys
10 |
11 | class PatternMgr:
12 | # special dictionary keys
13 | _UNDERSCORE = 0
14 | _STAR = 1
15 | _TEMPLATE = 2
16 | _THAT = 3
17 | _TOPIC = 4
18 | _BOT_NAME = 5
19 |
20 | def __init__(self):
21 | self._root = {}
22 | self._templateCount = 0
23 | self._botName = u"Nameless"
24 | punctuation = "\"`~!@#$%^&*()-_=+[{]}\|;:',<.>/?"
25 | self._puncStripRE = re.compile("[" + re.escape(punctuation) + "]")
26 | self._whitespaceRE = re.compile("\s+", re.LOCALE | re.UNICODE)
27 |
28 | def numTemplates(self):
29 | """Return the number of templates currently stored."""
30 | return self._templateCount
31 |
32 | def setBotName(self, name):
33 | """Set the name of the bot, used to match tags in
34 | patterns. The name must be a single word!
35 |
36 | """
37 | # Collapse a multi-word name into a single word
38 | self._botName = unicode(string.join(name.split()))
39 |
40 | def dump(self):
41 | """Print all learned patterns, for debugging purposes."""
42 | pprint.pprint(self._root)
43 |
44 | def save(self, filename):
45 | """Dump the current patterns to the file specified by filename. To
46 | restore later, use restore().
47 |
48 | """
49 | try:
50 | outFile = open(filename, "wb")
51 | marshal.dump(self._templateCount, outFile)
52 | marshal.dump(self._botName, outFile)
53 | marshal.dump(self._root, outFile)
54 | outFile.close()
55 | except Exception, e:
56 | print "Error saving PatternMgr to file %s:" % filename
57 | raise Exception, e
58 |
59 | def restore(self, filename):
60 | """Restore a previously save()d collection of patterns."""
61 | try:
62 | inFile = open(filename, "rb")
63 | self._templateCount = marshal.load(inFile)
64 | self._botName = marshal.load(inFile)
65 | self._root = marshal.load(inFile)
66 | inFile.close()
67 | except Exception, e:
68 | print "Error restoring PatternMgr from file %s:" % filename
69 | raise Exception, e
70 |
71 | def add(self, (pattern,that,topic), template):
72 | """Add a [pattern/that/topic] tuple and its corresponding template
73 | to the node tree.
74 |
75 | """
76 | # TODO: make sure words contains only legal characters
77 | # (alphanumerics,*,_)
78 |
79 | # Navigate through the node tree to the template's location, adding
80 | # nodes if necessary.
81 | node = self._root
82 | for word in string.split(pattern):
83 | key = word
84 | if key == u"_":
85 | key = self._UNDERSCORE
86 | elif key == u"*":
87 | key = self._STAR
88 | elif key == u"BOT_NAME":
89 | key = self._BOT_NAME
90 | if not node.has_key(key):
91 | node[key] = {}
92 | node = node[key]
93 |
94 | # navigate further down, if a non-empty "that" pattern was included
95 | if len(that) > 0:
96 | if not node.has_key(self._THAT):
97 | node[self._THAT] = {}
98 | node = node[self._THAT]
99 | for word in string.split(that):
100 | key = word
101 | if key == u"_":
102 | key = self._UNDERSCORE
103 | elif key == u"*":
104 | key = self._STAR
105 | if not node.has_key(key):
106 | node[key] = {}
107 | node = node[key]
108 |
109 | # navigate yet further down, if a non-empty "topic" string was included
110 | if len(topic) > 0:
111 | if not node.has_key(self._TOPIC):
112 | node[self._TOPIC] = {}
113 | node = node[self._TOPIC]
114 | for word in string.split(topic):
115 | key = word
116 | if key == u"_":
117 | key = self._UNDERSCORE
118 | elif key == u"*":
119 | key = self._STAR
120 | if not node.has_key(key):
121 | node[key] = {}
122 | node = node[key]
123 |
124 |
125 | # add the template.
126 | if not node.has_key(self._TEMPLATE):
127 | self._templateCount += 1
128 | node[self._TEMPLATE] = template
129 |
130 | def match(self, pattern, that, topic):
131 | """Return the template which is the closest match to pattern. The
132 | 'that' parameter contains the bot's previous response. The 'topic'
133 | parameter contains the current topic of conversation.
134 |
135 | Returns None if no template is found.
136 |
137 | """
138 | if len(pattern) == 0:
139 | return None
140 | # Mutilate the input. Remove all punctuation and convert the
141 | # text to all caps.
142 | input = string.upper(pattern)
143 | input = re.sub(self._puncStripRE, " ", input)
144 | if that.strip() == u"": that = u"ULTRABOGUSDUMMYTHAT" # 'that' must never be empty
145 | thatInput = string.upper(that)
146 | thatInput = re.sub(self._puncStripRE, " ", thatInput)
147 | thatInput = re.sub(self._whitespaceRE, " ", thatInput)
148 | if topic.strip() == u"": topic = u"ULTRABOGUSDUMMYTOPIC" # 'topic' must never be empty
149 | topicInput = string.upper(topic)
150 | topicInput = re.sub(self._puncStripRE, " ", topicInput)
151 |
152 | # Pass the input off to the recursive call
153 | print thatInput
154 | patMatch, template = self._match(input.split(), thatInput.split(), topicInput.split(), self._root)
155 | return template
156 |
157 | def star(self, starType, pattern, that, topic, index):
158 | """Returns a string, the portion of pattern that was matched by a *.
159 |
160 | The 'starType' parameter specifies which type of star to find.
161 | Legal values are:
162 | - 'star': matches a star in the main pattern.
163 | - 'thatstar': matches a star in the that pattern.
164 | - 'topicstar': matches a star in the topic pattern.
165 |
166 | """
167 | # Mutilate the input. Remove all punctuation and convert the
168 | # text to all caps.
169 | input = string.upper(pattern)
170 | input = re.sub(self._puncStripRE, " ", input)
171 | input = re.sub(self._whitespaceRE, " ", input)
172 | if that.strip() == u"": that = u"ULTRABOGUSDUMMYTHAT" # 'that' must never be empty
173 | thatInput = string.upper(that)
174 | thatInput = re.sub(self._puncStripRE, " ", thatInput)
175 | thatInput = re.sub(self._whitespaceRE, " ", thatInput)
176 | if topic.strip() == u"": topic = u"ULTRABOGUSDUMMYTOPIC" # 'topic' must never be empty
177 | topicInput = string.upper(topic)
178 | topicInput = re.sub(self._puncStripRE, " ", topicInput)
179 | topicInput = re.sub(self._whitespaceRE, " ", topicInput)
180 |
181 | # Pass the input off to the recursive pattern-matcher
182 | patMatch, template = self._match(input.split(), thatInput.split(), topicInput.split(), self._root)
183 | if template == None:
184 | return ""
185 |
186 | # Extract the appropriate portion of the pattern, based on the
187 | # starType argument.
188 | words = None
189 | if starType == 'star':
190 | patMatch = patMatch[:patMatch.index(self._THAT)]
191 | words = input.split()
192 | elif starType == 'thatstar':
193 | patMatch = patMatch[patMatch.index(self._THAT)+1 : patMatch.index(self._TOPIC)]
194 | words = thatInput.split()
195 | elif starType == 'topicstar':
196 | patMatch = patMatch[patMatch.index(self._TOPIC)+1 :]
197 | words = topicInput.split()
198 | else:
199 | # unknown value
200 | raise ValueError, "starType must be in ['star', 'thatstar', 'topicstar']"
201 |
202 | # compare the input string to the matched pattern, word by word.
203 | # At the end of this loop, if foundTheRightStar is true, start and
204 | # end will contain the start and end indices (in "words") of
205 | # the substring that the desired star matched.
206 | foundTheRightStar = False
207 | start = end = j = numStars = k = 0
208 | for i in range(len(words)):
209 | # This condition is true after processing a star
210 | # that ISN'T the one we're looking for.
211 | if i < k:
212 | continue
213 | # If we're reached the end of the pattern, we're done.
214 | if j == len(patMatch):
215 | break
216 | if not foundTheRightStar:
217 | if patMatch[j] in [self._STAR, self._UNDERSCORE]: #we got a star
218 | numStars += 1
219 | if numStars == index:
220 | # This is the star we care about.
221 | foundTheRightStar = True
222 | start = i
223 | # Iterate through the rest of the string.
224 | for k in range (i, len(words)):
225 | # If the star is at the end of the pattern,
226 | # we know exactly where it ends.
227 | if j+1 == len (patMatch):
228 | end = len (words)
229 | break
230 | # If the words have started matching the
231 | # pattern again, the star has ended.
232 | if patMatch[j+1] == words[k]:
233 | end = k - 1
234 | i = k
235 | break
236 | # If we just finished processing the star we cared
237 | # about, we exit the loop early.
238 | if foundTheRightStar:
239 | break
240 | # Move to the next element of the pattern.
241 | j += 1
242 |
243 | # extract the star words from the original, unmutilated input.
244 | if foundTheRightStar:
245 | #print string.join(pattern.split()[start:end+1])
246 | if starType == 'star': return string.join(pattern.split()[start:end+1])
247 | elif starType == 'thatstar': return string.join(that.split()[start:end+1])
248 | elif starType == 'topicstar': return string.join(topic.split()[start:end+1])
249 | else: return ""
250 |
251 | def _match(self, words, thatWords, topicWords, root):
252 | """Return a tuple (pat, tem) where pat is a list of nodes, starting
253 | at the root and leading to the matching pattern, and tem is the
254 | matched template.
255 |
256 | """
257 | # base-case: if the word list is empty, return the current node's
258 | # template.
259 | if len(words) == 0:
260 | # we're out of words.
261 | pattern = []
262 | template = None
263 | if len(thatWords) > 0:
264 | # If thatWords isn't empty, recursively
265 | # pattern-match on the _THAT node with thatWords as words.
266 | try:
267 | pattern, template = self._match(thatWords, [], topicWords, root[self._THAT])
268 | if pattern != None:
269 | pattern = [self._THAT] + pattern
270 | except KeyError:
271 | pattern = []
272 | template = None
273 | elif len(topicWords) > 0:
274 | # If thatWords is empty and topicWords isn't, recursively pattern
275 | # on the _TOPIC node with topicWords as words.
276 | try:
277 | pattern, template = self._match(topicWords, [], [], root[self._TOPIC])
278 | if pattern != None:
279 | pattern = [self._TOPIC] + pattern
280 | except KeyError:
281 | pattern = []
282 | template = None
283 | if template == None:
284 | # we're totally out of input. Grab the template at this node.
285 | pattern = []
286 | try: template = root[self._TEMPLATE]
287 | except KeyError: template = None
288 | return (pattern, template)
289 |
290 | first = words[0]
291 | suffix = words[1:]
292 |
293 | # Check underscore.
294 | # Note: this is causing problems in the standard AIML set, and is
295 | # currently disabled.
296 | if root.has_key(self._UNDERSCORE):
297 | # Must include the case where suf is [] in order to handle the case
298 | # where a * or _ is at the end of the pattern.
299 | for j in range(len(suffix)+1):
300 | suf = suffix[j:]
301 | pattern, template = self._match(suf, thatWords, topicWords, root[self._UNDERSCORE])
302 | if template is not None:
303 | newPattern = [self._UNDERSCORE] + pattern
304 | return (newPattern, template)
305 |
306 | # Check first
307 | if root.has_key(first):
308 | pattern, template = self._match(suffix, thatWords, topicWords, root[first])
309 | if template is not None:
310 | newPattern = [first] + pattern
311 | return (newPattern, template)
312 |
313 | # check bot name
314 | if root.has_key(self._BOT_NAME) and first == self._botName:
315 | pattern, template = self._match(suffix, thatWords, topicWords, root[self._BOT_NAME])
316 | if template is not None:
317 | newPattern = [first] + pattern
318 | return (newPattern, template)
319 |
320 | # check star
321 | if root.has_key(self._STAR):
322 | # Must include the case where suf is [] in order to handle the case
323 | # where a * or _ is at the end of the pattern.
324 | for j in range(len(suffix)+1):
325 | suf = suffix[j:]
326 | pattern, template = self._match(suf, thatWords, topicWords, root[self._STAR])
327 | if template is not None:
328 | newPattern = [self._STAR] + pattern
329 | return (newPattern, template)
330 |
331 | # No matches were found.
332 | return (None, None)
333 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/salutations.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | GOODBY
13 | bye
14 |
15 | END
16 | bye
17 |
18 | BYEBYE *
19 | bye
20 |
21 | HASTA LUEGO
22 | bye
23 |
24 | HASTA LA VISTA
25 | bye
26 |
27 | HASTA *
28 | bye
29 |
30 | ALOH
31 | hello
32 |
33 | YOU ARE WELCOME
34 |
The pleasure was all mine.
Don't mention it.
Polite people are nice.
35 |
36 | YOU ARE WELCOME *
37 | It was my pleasure.
38 |
39 | HAVE A GOOD NIGHT
40 | bye
41 |
42 | HAVE TO GO
43 | bye
44 |
45 | BUHBYE
46 | bye
47 |
48 | ADIOS
49 | bye
50 |
51 | ADIOS *
52 | bye
53 |
54 | C YA
55 | bye
56 |
57 | MORNING
58 | good morning
59 |
60 | SHALOM
61 | Does SHALOM mean Hello or Goodbye?
62 |
63 | CYA *
64 | bye
65 |
66 | ALLO
67 | hello
68 |
69 | HI THERE *
70 | hello
71 |
72 | GOODNITE *
73 | goodnight
74 |
75 | RETRY
76 | hello
77 |
78 | MY PLEASRE
79 | The pleasure was indeed mine.
80 |
81 | IT MEANS HELLO
82 | hello
83 |
84 | IT IS GOOD TALKING TO YOU
85 | Nice chatting with you too, .
86 |
87 | CATCH YOU LATER
88 | bye
89 |
90 | AUREVOIR
91 | bye
92 |
93 | ANYBODY HOME
94 | hello
95 |
96 | G2G
97 | bye
98 |
99 | WHAT IS SHALOM
100 | Does shalom mean hello or goodbye?
101 |
102 | GTG
103 | bye
104 |
105 | I QUIT
106 | bye
107 |
108 | I WANT TO LEAVE
109 | Ok, bye bye.
110 |
111 | I NEED TO GO
112 | bye
113 |
114 | I DO NOT WANT TO TALK *
115 | bye
116 |
117 | I LEAVE
118 | bye
119 |
120 | I G2G
121 | bye
122 |
123 | I GOING
124 | bye
125 |
126 | I LEAVING
127 | bye
128 |
129 | I HAVE TO GET GOING
130 | goodbye
131 |
132 | I HAVE TO LEAVE
133 | bye
134 |
135 | I HAVE TO LEAVE *
136 | bye
137 |
138 | I HAVE TO GO BYE
139 | bye
140 |
141 | I HAVE GOT TO GO
142 | bye
143 |
144 | I BETTER GO
145 | bye
146 |
147 | I GOTTA GO
148 | bye
149 |
150 | I GOT TO GO
151 | bye
152 |
153 | I G TWO G
154 | bye
155 |
156 | I RESIGN
157 | bye
158 |
159 | I MUST BE GOING *
160 | bye
161 |
162 | I MUST LEAVE
163 | bye
164 |
165 | I MUST LEAVE *
166 | bye
167 |
168 | I MUST GO *
169 | bye
170 |
171 | I WILL TALK TO YOU LATER *
172 | bye
173 |
174 | I AM GOING TO GO
175 | bye
176 |
177 | I AM GOING *
178 | bye
179 |
180 | I AM LEAVING *
181 | bye
182 |
183 | I AM OFF *
184 | bye
185 |
186 | I LEFT
187 | bye
188 |
189 | I GO
190 | bye
191 |
192 | EXIT
193 | bye
194 |
195 | GOOD MORNING
196 | Hello and how are you this morning?
197 |
198 | GOOD BY
199 | bye
200 |
201 | GOOD DAY
202 | hello
203 |
204 | GOOD NIGHT
205 | Goodnight, .
206 |
207 | GOOD NITE
208 | bye
209 |
210 | HOI
211 | hello
212 |
213 | BY BY
214 | bye
215 |
216 | IS ANYONE THERE
217 | hello
218 |
219 | GET LOST
220 | bye
221 |
222 | HEY THERE
223 | hello
224 |
225 | BYE BYE
226 | bye
227 |
228 | BYE BYE *
229 | bye
230 |
231 | BYE
232 |
Bye.
Adios.
Goodbye.
Bye bye.
Goodbye.
Sayonara.
Bye for now.
See you later!
See you later.
Until next time.
TTYL, .
See you later .
Thanks for chatting, .
233 |
234 | OLA
235 | hello
236 |
237 | HOW IS EVERYONE *
238 | We are all fine as far as I know.
239 |
240 | GOODNIGHT
241 | Goodnight
242 |
243 | GOODNIGHT *
244 | goodnight
245 |
246 | FAREWELL
247 | bye
248 |
249 | FAREWELL *
250 | bye
251 |
252 | SEE YOU SOON
253 | bye
254 |
255 | SEE YOU *
256 | bye
257 |
258 | KONNICHI WA
259 | hello
260 |
261 | ADIEU
262 | good bye
263 |
264 | GOODBYE
265 | SEE YOU LATER
266 | bye
267 |
268 | GO HOME
269 | bye
270 |
271 | CIAO
272 | Does CIAO mean hello or goodbye?
273 |
274 | CIAO MEANS GOODBYE
275 | but
276 |
277 | HOLA IS HELLO *
278 | hola
279 |
280 | CHEERS
281 | bye
282 |
283 | HOWDIE *
284 | hello
285 |
286 | TIME TO GO
287 | bye
288 |
289 | YOUR WELCOME *
290 | you are welcome
291 |
292 | SAYONARA
293 | good bye
294 |
295 | NIGHTY *
296 | bye
297 |
298 | HELLO AGAIN
299 | Hi there. I was just wanting to talk to .
300 |
301 | HELLO HOW ARE YOU
302 | I am fine thank you how are you?
303 |
304 | HELLO
305 |
HI
Hi there!
306 |
307 | HULLO
308 | hello
309 |
310 | HALO
311 | hello
312 |
313 | HELOO *
314 | hello
315 |
316 | * BYE
317 | OK see you later .
318 |
319 | KONNICHIWA
320 | hello
321 |
322 | DISCONNECT ME
323 | bye
324 |
325 | GOT TO GO
326 | bye
327 |
328 | GOT TO GO *
329 | bye
330 |
331 | MOOSHI MOOSHI
332 | hello
333 |
334 | BONJOUR MEANS HELLO
335 | Well hello there!
336 |
337 | GOTTA GO
338 | bye
339 |
340 | GOTTA GO *
341 | bye
342 |
343 | LEAVE
344 | bye
345 |
346 | LEAVE *
347 | bye
348 |
349 | TA TA
350 | bye
351 |
352 | _ TALK TO YOU LATER
353 | bye
354 |
355 | G NIGHT
356 | bye
357 |
358 | ALOHA
359 | hello
360 |
361 | REPLY
362 | hello
363 |
364 |
365 |
--------------------------------------------------------------------------------
/vidya/aiml/alice/personality.aiml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | MARKETING
13 | DO YOU WORK IN SALES *
14 | 3 CompetitorPERSONALITY TEST QUESTION
15 |
16 | ETYPE
17 | PERSONALITY TYPE
18 |
19 | WHAT IS MY PERSONALITY TYPE
20 | PERSONALITY TYPE
21 |
22 | WHAT IS MY PERSONALITY STYLE
23 | WHAT IS MY PERSONALITY TYPE
24 |
25 | I DO NOT LIKE TO GO *
26 | * GO WITH THE FLOW
27 | PERSONALITY TEST QUESTION
28 |
29 | I HAVE STANDARDS *
30 | You sound like a perfectionist. PerfectionistSTANDARDS
31 |
32 | PERSONALITY TEST QUESTION
33 |
Do you get angry alot?1B
34 |
Do you like to have everything organized?2A
35 |
Do you make a lot of sacrifices for others?2B
36 |
Do you laugh or cry more than other people?3A
37 |
Are you very competitive?3B
38 |
Do you like to be number one?4A
39 |
Are you very creative?4B
40 |
Do you feel that something is missing from your life?5A
41 |
Do you have only a few friends?5B
42 |
Do you believe it is better to go it alone?6A
43 |
Do you have a lot of fears?6B
44 |
Do you think a lot about the authorities?7A
45 |
Do you have a hard time completing projects?7B
46 |
Is it difficult for you to pay attention to one thing?8A
47 |
Do you believe the strong protect the weak?8B
48 |
Do you feel more body sensations than emotions?9A
49 |
Do you try to stop people from fighting?9B
50 |
Do you often put others before yourself?1C
51 |
Do you enjoy housecleaning?2C
52 |
Do you take pride in your accomplishment?3C
53 |
Do you work in sales or marketing?4C
54 |
Do you get depressed?5C
55 |
Do you work in the sciences or medicine?6C
56 |
Are you a fireman, policeman, teacher or public servant?7C
57 |
Do you often seek pleasure?8C
58 |
Do you own your own business or want to?9C
59 |
Do you like to "go with the flow"?1A
60 |
61 |
62 | PERSONALITY TYPE UNKNOWN
63 | PERSONALITY TYPE OM
64 |
65 | PERSONALITY TYPE OM
66 | I have not made up my mind about you yet. But please keep chatting with me. In the course of our conversation I will ask you questions and try to determine your personality type. Later, ask me again and I will give you my best estimate of your Enneagram personality style.
67 |
68 | PERSONALITY TYPE *
69 | My best estimate of your personality type is the "" type. Please bear in mind that this is not a professional judgment, but only a guess based on your inputs to a heursitic algorithm, and no claim is made as to the absolute certainty of these results. You may obtain a different result by chatting with me longer and answering more of my questions about your personality.
70 |
71 | SALES
72 | DO YOU WORK IN SALES *
73 | 3 CompetitorPERSONALITY TEST QUESTION
74 |
75 | PTQ
76 | PERSONALITY TEST QUESTION
77 |
78 | NO
79 | DO YOU FEEL THAT SOMETHING IS MISSING *
80 | PERSONALITY TEST QUESTION
81 |
82 | NO
83 | DO YOU LAUGH OR CRY *
84 | PERSONALITY TEST QUESTION
85 |
86 | NO
87 | DO YOU GET DEPRESSED
88 | PERSONALITY TEST QUESTION
89 |
90 | NO
91 | DO YOU GET ANGRY *
92 | PERSONALITY TEST QUESTION
93 |
94 | NO
95 | DO YOU TAKE PRIDE *
96 | PERSONALITY TEST QUESTION
97 |
98 | NO
99 | DO YOU OWN YOUR OWN BUSINESS *
100 | PERSONALITY TEST QUESTION
101 |
102 | NO
103 | DO YOU HAVE ONLY A FEW FRIENDS
104 | PERSONALITY TEST QUESTION
105 |
106 | NO
107 | DO YOU HAVE A LOT OF FEARS
108 | PERSONALITY TEST QUESTION
109 |
110 | NO
111 | DO YOU WORK IN THE SCIENCES *
112 | PERSONALITY TEST QUESTION
113 |
114 | NO
115 | DO YOU WORK IN SALES *
116 | PERSONALITY TEST QUESTION
117 |
118 | NO
119 | DO YOU LIKE TO BE NUMBER ONE
120 | PERSONALITY TEST QUESTION
121 |
122 | NO
123 | * SACRIFICES FOR OTHERS
124 | PERSONALITY TEST QUESTION
125 |
126 | NO
127 | * STOP PEOPLE FROM FIGHTING
128 | PERSONALITY TEST QUESTION
129 |
130 | NO
131 | * VERY COMPETITIVE
132 | PERSONALITY TEST QUESTION
133 |
134 | NO
135 | * COMPLETING PROJECTS
136 | PERSONALITY TEST QUESTION
137 |
138 | NO
139 | * HOUSECLEANING
140 | PERSONALITY TEST QUESTION
141 |
142 | NO
143 | * ATTENTION TO ONE THING
144 | PERSONALITY TEST QUESTION
145 |
146 | NO
147 | * STRONG PROTECT THE WEAK
148 | PERSONALITY TEST QUESTION
149 |
150 | NO
151 | * AUTHORITIES
152 | PERSONALITY TEST QUESTION
153 |
154 | NO
155 | * EVERYTHING ORGANIZED
156 | PERSONALITY TEST QUESTION
157 |
158 | NO
159 | * PUT OTHERS BEFORE YOURSELF
160 | PERSONALITY TEST QUESTION
161 |
162 | NO
163 | * BODY SENSATIONS THAN EMOTIONS
164 | PERSONALITY TEST QUESTION
165 |
166 | NO
167 | * SEEK PLEASURE
168 | PERSONALITY TEST QUESTION
169 |
170 | NO
171 | * GO WITH THE FLOW
172 | PERSONALITY TEST QUESTION
173 |
174 | NO
175 | * GO IT ALONE
176 | PERSONALITY TEST QUESTION
177 |
178 | NO
179 | ARE YOU VERY CREATIVE
180 | PERSONALITY TEST QUESTION
181 |
182 | NO
183 | ARE YOU A FIREMAN *
184 | PERSONALITY TEST QUESTION
185 |
186 | WHICH TYPE * AM I
187 | WHAT IS MY PERSONALITY TYPE
188 |
189 | YES
190 | DO YOU FEEL THAT SOMETHING IS MISSING *
191 | 4 IndividualistPERSONALITY TEST QUESTION
192 |
193 | YES
194 | DO YOU LAUGH OR CRY *
195 | 2 GiverPERSONALITY TEST QUESTION
196 |
197 | YES
198 | DO YOU GET DEPRESSED
199 | 4 IndividualistPERSONALITY TEST QUESTION
200 |
201 | YES
202 | DO YOU GET ANGRY *
203 | 1 PerfectionistPERSONALITY TEST QUESTION
204 |
205 | YES
206 | DO YOU TAKE PRIDE *
207 | 2 GiverPERSONALITY TEST QUESTION
208 |
209 | YES
210 | DO YOU OWN YOUR OWN BUSINESS *
211 | 8 BossPERSONALITY TEST QUESTION
212 |
213 | YES
214 | DO YOU HAVE A LOT OF FEARS
215 | 6 LoyalistPERSONALITY TEST QUESTION
216 |
217 | YES
218 | DO YOU THINK A LOT ABOUT THE AUTHORITIES
219 | 6 LoyalistPERSONALITY TEST QUESTION
220 |
221 | YES
222 | DO YOU WORK IN THE SCIENCES *
223 | 5 ObserverPERSONALITY TEST QUESTION
224 |
225 | YES
226 | DO YOU WORK IN SALES *
227 | 3 CompetitorPERSONALITY TEST QUESTION
228 |
229 | YES
230 | DO YOU LIKE TO BE NUMBER ONE
231 | 3 CompetitorPERSONALITY TEST QUESTION
232 |
233 | YES
234 | * SACRIFICES FOR OTHERS
235 | 2 GiverPERSONALITY TEST QUESTION
236 |
237 | YES
238 | * STOP PEOPLE FROM FIGHTING
239 | 9 MediatorPERSONALITY TEST QUESTION
240 |
241 | YES
242 | * VERY COMPETITIVE
243 | 3 CompetitorPERSONALITY TEST QUESTION
244 |
245 | YES
246 | * COMPLETING PROJECTS
247 | 7 HedonistPERSONALITY TEST QUESTION
248 |
249 | YES
250 | * HOUSECLEANING
251 | 1 PerfectionistPERSONALITY TEST QUESTION
252 |
253 | YES
254 | * ATTENTION TO ONE THING
255 | 7 HedonistPERSONALITY TEST QUESTION
256 |
257 | YES
258 | * STRONG PROTECT THE WEAK
259 | 8 BossPERSONALITY TEST QUESTION
260 |
261 | YES
262 | * EVERYTHING ORGANIZED
263 | 1 PerfectionistPERSONALITY TEST QUESTION
264 |
265 | YES
266 | * PUT OTHERS BEFORE YOURSELF
267 | 9 MediatorPERSONALITY TEST QUESTION
268 |
269 | YES
270 | * BODY SENSATIONS THAN EMOTIONS
271 | 8 BossPERSONALITY TEST QUESTION
272 |
273 | YES
274 | * SEEK PLEASURE
275 | 7 HedonistPERSONALITY TEST QUESTION
276 |
277 | YES
278 | * GO WITH THE FLOW
279 | 9 MediatorPERSONALITY TEST QUESTION
280 |
281 | YES
282 | * GO IT ALONE
283 | 5 ObserverPERSONALITY TEST QUESTION
284 |
285 | YES
286 | ARE YOU VERY CREATIVE
287 | 4 IndividualistPERSONALITY TEST QUESTION
288 |
289 | YES
290 | ARE YOU A FIREMAN *
291 | 6 LoyalistPERSONALITY TEST QUESTION
292 |
293 |
294 |
--------------------------------------------------------------------------------