-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrequirements.txt
68 lines (52 loc) · 3.46 KB
/
requirements.txt
1
2
3
4
5
6
7
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Stages of development for ScalaBot:
Done : 1. return responds to messages
Will use a trie/map to keep in memory a client/bot message exchange.
No regexes at this stage.
2. provide continuity of conversation
Done : For a certain bot answer, the bot might want to expect a certain response
Done : Or send a "disapproval" message otherwise, while still answering to the client's question/wtv.
DONE -
3. provide regexes in messages and memory
For a given response, the bot might want to remember certain details of a particular object.
This will be done using a trie whose nodes are occupied by regexes OR words.
And the final node is a list of possible replies.
4. customized responses depending on memory ( consider also including intervals )
A template of the user will be composed of
List[(partOfSentence, attribNameIfNecessary: Option[Attribute])]
Attribute will be a trait which will be extended to create new attributes.
attribNameIfNecessary will be a regex if set and will become part of the memory.
The data structure holding the brain will be a Trie composed of
partOfReply will be words - better for scaling rather than having a part of sentence
Example: "This is a sentence" will be trie-rized as this -> is -> a -> sentence, rather than
"this is a sentence" -> .
Node((partOfReply: Regex, attribName = Option[String]), children: Set[Node], leafs: set[Leaf])
Leaf(possibleReplies: List[String])
In order to have customized replies depending on arguments, there will exist a method called
get() which will receive a list of functions receiving an attribute and a boolean expression,
returning a string in case of true.
get(f: (a: Atrib) => Boolean): String
Steps:
DONE - 1. Trie data structure
DONE - 2. Add/Find methods. No need for remove/edit for now.
DONE - 3. Connect it with the learner.
DONE - 4. Provide method to memories attributes.
DONE - 5. Connect it with the handler.
DONE - 6. Provide methods to provide customised messages.
DONE - [Logic Bug] 7. Change trie so it remembers the previous message
and a function that returns a Set[String].
Done - [Logic ] 8. Add support so that previous bot message can be selected from a set[string]
which is returned by a function.
FOR NOW, IT WILL RECALL EVENTS FROM THE CURRENT SESSION.
5. previous sessions' memory - DONE
One huge file will all the previous conversations' details.
If there is to identify one person from the List, its details will be updated at the end of the convo
and persisted.
6. topics
The bot might categorise different topics and have an honest opinion about any of them, or learn more.
For example:
Might know that scala is FP language, that it's awesome, and it's current version is 2.12.
7. maybe implement a whole actor system to make everything concurrent - DOING
8. Definitions - add definitions to words and create the trie upon that - DONE
- the ideal case would be to store in the trie ONLY the possible definitions from which to choose from
- think its done... ?
9. having being given an unknown word, question about it and then learn the word :)