Home | Trees | Indices | Help |
|
---|
|
object --+ | Chat
|
|||
None
|
|
||
string
|
|
||
|
|||
string
|
|
||
|
|||
Inherited from |
|
|||
Inherited from |
|
Initialize the chatbot. Pairs is a list of patterns and responses. Each pattern is a regular expression matching the user's statement or question, e.g. r'I like (.*)'. For each such pattern a list of possible responses is given, e.g. ['Why do you like %1', 'Did you ever dislike %1']. Material which is matched by parenthesized sections of the patterns (e.g. .*) is mapped to the numbered positions in the responses, e.g. %1.
|
Substitute words in the string, according to the specified reflections, e.g. "I'm" -> "you are"
|
Generate a response to the user input.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Wed Aug 27 15:08:51 2008 | http://epydoc.sourceforge.net |