chat
The Natural Language Processing component of open-allure-ds.
Based on the Chat bot class from NLTK
TODO: Test the open functionality.
TODO: Fix the natural language math parsing
TODO: - make all test cases pass
TODO: - move the math parsing out of the generic responses tuple
TODO: - move the math processing out of the respond function
-
class chat.Chat(tuples, reflections={})
-
respond(inputString)
Generate a response to the users input.
@type inputString: C{string}
@param inputString: The string to be mapped
@rtype: C{string}
-
class chat.TestChat(methodName='runTest')
-
setUp()
-
testHello()
-
testQuitWorks()
- Ask the chatbot to quit
-
testWordLookup()
-
testWordLookup2()
-
class chat.TestChatMath(methodName='runTest')
-
setUp()
-
testAddition()
-
testAdditionNumbers()
-
testAdditionPlus()
-
testAdditionWords1()
-
testAdditionWords2()
-
testMultiply()
-
testSubtractionLargeNumbers()
-
testSubtractionSymbol()
-
testSubtractionWords()
-
testSubtractionWords1()