Part of lib.pyniall View Source View In Hierarchy
Method | __init__ | Undocumented |
Method | learn | Undocumented |
Method | reply | Undocumented |
Method | import_brain | Undocumented |
Method | export_brain | Undocumented |
Method | _addRelation | #adds "hello world" and "hello user" without endrelation |
Method | _addEndRelation |
>>> n=pyNiall()
|
Method | _rankWord | rank a word by length and probability |
Method | _createRandomSentence | Undocumented |
Method | _createReply | Undocumented |
>>> n=pyNiall() >>> n._addRelation(">", "hello") >>> n._addRelation("hello", "world") >>> n._addEndRelation("world") #"hello world"
>>> n._addRelation(">", "hello") >>> n._addEndRelation("hello") #"hello" >>> n.next {0: set([1]), 1: set([2, -1]), 2: set([-1])} >>> n.prev {1: set([0]), 2: set([1]), -1: set([1, 2])} >>> n.prob {(0, 1): 2, (1, 2): 1, (2, -1): 1, (1, -1): 1} >>> n.rank #the same as in _addRelation {1: 2, 2: 1}