forked from NatLanGroup/NatLan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestfile.txt
297 lines (247 loc) · 19.6 KB
/
testfile.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
e/ A garden is a place. m/ C(garden,place)
e/ Persons are the same as people. m/ D(person,people)
e/ Animals are not people. m/ C(animal,people)p=0
e/ People are not animals. m/ C(people,animal)p=0
e/ What is a garden? m/ C(garden,?) a/ C(garden,place)p=1
e/ What is a place? m/ C(place,?) a/ not found:C(place,?)
e/ What is a toy? m/ C(toy,?) a/ not found:C(toy,?)
e/ What is a person? m/ C(person,?) a/ not found:C(person,?)
e/ Who are persons? m/ D(person,?) a/ D(person,people)p=1
e/ Who are people? m/ D(people,?) a/ not found:D(people,?)
e/ Is the garden a place? m/ C(garden,place)? a/ C(garden,place)p=1
e/ Is the place a garden? m/ C(place,garden)? a/ C(place,garden)p=0.5
e/ Are toys dogs? m/ C(toy,dog)? a/ C(toy,dog)p=0.5
e/ Are people same as persons? m/ D(people,person)? a/ D(people,person)p=0.5
e/ Are persons same as people? m/ D(person,people)? a/ D(person,people)p=1
e/ Are people animals? m/ C(people,animal)? a/ C(people,animal)p=0
e/ What are people? m/ C(people,?) a/ C(people,animal)p=0
e/ Dogs are animals. m/ C(dog,animal)
e/ What are animals? m/ C(animal,?) a/ not found:C(animal,?)
e/ What animals are there? m/ C(?,animal) a/ C(people,animal)p=0 C(dog,animal)p=1
e/ People walk. m/ A(people,walk)
e/ People talk. m/ A(people,talk)
e/ What do people do? m/ A(people,?) a/ A(people,walk)p=1 A(people,talk)p=1
e/ Who walks? m/ A(?,walk) a/ A(people,walk)p=1
e/ Do people walk? m/ A(people,walk)? a/ A(people,walk)p=1
e/ Do people sing? m/ A(people,sing)? a/ A(people,sing)p=0.5
e/ What do dogs do? m/ A(dog,?) a/ not found:A(dog,?)
e/ Dogs are not the same as people. m/ D(dog,people)p=0
e/ Do dogs walk? m/ A(dog,walk)? a/ A(dog,walk)p=0.5
e/ Tired dogs walk slowly. m/ F(A(F(dog,tired),walk),slowly)
e/ How do tired dogs walk? m/ F(A(F(dog,tired),walk),?) a/ F(A(F(dog,tired),walk),slowly)p=1
e/ Do tired dogs walk slowly? m/ F(A(F(dog,tired),walk),slowly)? a/ F(A(F(dog,tired),walk),slowly)p=1
e/ What dogs walk slowly? m/ F(A(F(dog,?),walk),slowly) a/ F(A(F(dog,tired),walk),slowly)p=1
e/ What do tired dogs do slowly? m/ F(A(F(dog,tired),?),slowly) a/ F(A(F(dog,tired),walk),slowly)p=1
// D-reasoning
m/ IM(AND(D(%1,%2),X(%1,%3)),X(%2,%3))
m/ IM(D(%1,%2),D(%2,%1))
e/ Who are people? m/ D(people,?) a/ D(people,person)p=1
e/ Are people same as persons? m/ D(people,person)? a/ D(people,person)p=1
e/ Do persons walk? m/ A(person,walk)? a/ A(person,walk)p=1
e/ Are persons animals? m/ C(person,animal)? a/ C(person,animal)p=0
// generating C from D
e/ What are people? m/ C(people,?) a/ C(people,animal)p=0 C(people,person)p=1
e/ What are persons? m/ C(person,?) a/ C(person,animal)p=0 C(person,people)p=1
// C-reasoning. In the fox example we see an implicit C relation.
m/ IM(AND(C(%1,%2),X(%2,%3)),X(%1,%3))
e/ Animals move. m/ A(animal,move)
e/ What do dogs do? m/ A(dog,?) a/ A(dog,move)p=1
e/ What moves? m/ A(?,move) a/ A(animal,move)p=1 A(dog,move)p=1
e/ Do dogs move? m/ A(dog,move)? a/ A(dog,move)p=1
e/ Do dogs walk? m/ A(dog,walk)? a/ A(dog,walk)p=0.5
e/ Joe is a person. m/ C(Joe,person)
e/ Mary is a girl. m/ C(Mary,girl)
e/ Does Joe walk? m/ A(Joe,walk)? a/ A(Joe,walk)p=1
e/ Does Mary walk? m/ A(Mary,walk)? a/ A(Mary,walk)p=0.5
e/ Girls are people. m/ C(girl,people)
e/ Boys are people. m/ C(boy,people)
e/ Does Mary walk? m/ A(Mary,walk)? a/ A(Mary,walk)p=1
e/ The fox hunts in the forest. m/ F(A(fox,hunt),R(in,forest))
e/ Does the brown fox hunt? m/ A(F(fox,brown),hunt)? a/ A(F(fox,brown),hunt)p=1
// IM-reasoning
e/ If a person runs, then that person moves. m/ IM(A(person,run),A(person,move))
e/ Does a person run? m/ A(person,run)? a/ A(person,run)p=0.5
e/ Does a person move? m/ A(person,move)? a/ A(person,move)p=0.5
e/ Who moves? m/ A(?,move) a/ A(person,move)p=0.5
e/ People run. m/ A(people,run)
e/ Who moves? m/ A(?,move) a/ A(person,move)p=1
e/ Do animals walk? m/ A(animal,walk)? a/ A(animal,walk)p=0.5
e/ If animals are people, then animals walk. m/ IM(C(animal,people),A(animal,walk))
e/ Are animals people? m/ C(animal,people)? a/ C(animal,people)p=0
e/ Do animals walk? m/ A(animal,walk)? a/ A(animal,walk)p=0.5
e/ Joe sits. m/ A(Joe,sit)
e/ If people sit, then people do not move. m/ IM(A(people,sit),A(people,move)p=0)
e/ Do people sit? m/ A(people,sit)? a/ A(people,sit)p=0.5
e/ Does Joe sit? m/ A(Joe,sit)? a/ A(Joe,sit)p=1
e/ Does Joe move? m/ A(Joe,move)? a/ A(Joe,move)p=0
e/ If a person does not move, then the person stays. m/ IM(A(person,move)p=0,A(person,stay))
e/ Does Joe stay? m/ A(Joe,stay)? a/ A(Joe,stay)p=1
// AND-reasoning
e/ Mary and Joe walk. m/ A(AND(Mary,Joe),walk)
e/ Does Mary walk? m/ A(Mary,walk)? a/ A(Mary,walk)p=1
e/ Mary plays. m/ A(Mary,play)
e/ Joe plays. m/ A(Joe,play)
e/ Do Mary and Joe play? m/ A(AND(Mary,Joe),play)? a/ A(AND(Mary,Joe),play)p=1
e/ What does Joe do? m/ A(Joe,?) a/ A(Joe,walk)p=1 A(Joe,talk)p=1 A(Joe,play)p=1 A(Joe,run)p=0.5 A(Joe,move)p=0.5 A(Joe,sit)p=1
e/ Does Joe sit and play? m/ A(Joe,AND(sit,play))? a/ A(Joe,AND(sit,play))p=1
e/ Does Joe run? m/ A(Joe,run)? a/ A(Joe,run)p=0.5
e/ Does Joe run and sit? m/ A(Joe,AND(run,sit))? a/ A(Joe,AND(run,sit))p=0.5
// %-reasoning
m/ IM(AND(C(%1,%2)p1,%(%2,%3)p2),%(%1,%3)p=pclas)p=1 // this replaces the python code for C-reasoning. This uses a (p1,p2)->pc grid to calculate p.
m/ IM(XOR(%1p1,%2)p2,%2p=pxor)
m/ IM(XOR(%1,%2p1)p2,%1p=pxor) // these replace the XOR-reasoning
m/ IM(%(AND(%x,%2)p1,%3)p2,%(%2,%3)p=pand) // this replaces AND-reasoning
e/ If %1 consists of %2, then %2 is part of %1. m/ IM(F(A(%1,consist),R(of,%2)),P(%2,%1))
e/ The family consists of father, mother and Joe. m/ F(A(family,consist),R(of,AND(father,mother,Joe))
e/ Is Joe part of the family? m/ P(Joe,family)? a/ P(Joe,family)p=1
e/ Is Mary part of the family? m/ P(Mary,family)? a/ P(Mary,family)p=0.5
// Features
e/ Foxes are animals. m/ C(fox,animal)
e/ The fox is red. m/ F(fox,red)
e/ The fox is white. m/ F(fox,white)
e/ The fox is smart. m/ F(fox,smart)
e/ The fox hunts in the forest. m/ F(A(fox,hunt),R(in,forest))
e/ The fox hunts in the forest at dawn. m/ F(A(fox,hunt),R(in,forest),R(at,dawn))
e/ What are foxes like? m/ F(fox,?) a/ F(fox,red)p=1 F(fox,white)p=1 F(fox,smart)p=1
e/ How do foxes hunt? m/ F(A(fox,hunt),?) a/ F(A(fox,hunt),R(in,forest),R(at,dawn))p=1
e/ Where do foxes hunt? m/ F(A(fox,hunt),R(in,?)) a/ F(A(fox,hunt),R(in,forest))p=1
e/ When do foxes hunt? m/ F(A(fox,hunt),T(?)) a/ not found:F(A(fox,hunt),T(?))
//C-reasoning for feature
e/ Does the Red Fox hunt? m/ A(F(fox,red),hunt)? a/ A(F(fox,red),hunt)p=1
e/ Does the brown fox hunt? m/ A(F(fox,brown),hunt)? a/ A(F(fox,brown),hunt)p=1 //although F(fox,brown)p=0.5
// XOR-reasoning Understanding exclusive features and any kind of exclusive concepts
e/ Does Joe run? m/ A(Joe,run)? a/ A(Joe,run)p=0.5
e/ People either sit or run. m/ A(people,XOR(sit,run))
e/ Does Joe run? m/ A(Joe,run)? a/ A(Joe,run)p=0
e/ The fox is either red or white. m/ F(fox,XOR(red,white)) // this is contradiction, not yet understood
e/ Is the fox red? m/ F(fox,red)? a/ F(fox,red)p=1
e/ Is the fox white? m/ F(fox,white)? a/ F(fox,white)p=1
m/ D(XOR(%(%1,%2),%(%1,%3)),%(%1,XOR(%2,%3)) // this is a general XOR-transformation
// understanding dimensions
e/ Every object has a shape. m/ P(shape,object)
e/ The shape of an object can be a circle, a trianlge, a square, a sphere, or a cube. m/ C(P(shape,object),XOR(circle,triangle,square,sphere,cube))
e/ The color of a toy can be either red, green, blue, or yellow. m/ F(P(color,toy),XOR(red,green,blue,yellow))
e/ The button is an object. m/ C(button,object)
e/ The button`s shape is a circle. m/ C(P(shape,button),circle)
e/ What shape is the button? m/ C(P(shape,button),?) a/ C(P(shape,button),circle)p=1
e/ Is the button`s shape a circle? m/ C(P(shape,button),circle)? a/ C(P(shape,button),circle)p=1
e/ Is the button`s shape a cube? m/ C(P(shape,button),cube)? a/ C(P(shape,button),cube)p=0
e/ Is the button a circle? m/ C(button,circle)? a/ C(button,circle)p=0.5
e/ Shape is a feature. m/ C(shape,feature)
e/ Shape is a dimension. m/ C(shape,dimension)
e/ If %1 is a dimension and %2`s %1 is %3, then %2 is %3. m/ IM(AND(C(%1,dimension),F(P(%1,%2),%3)),F(%2,%3))
e/ Is the button a circle? m/ C(button,circle)? a/ C(button,circle)p=1
e/ Color is a feature. m/ C(color,feature)
e/ The toy`s color is red. m/ F(P(color,toy),red)
e/ Is the toy`s color green? m/ F(P(color,toy),green)? a/ F(P(color,toy),green)p=0
e/ Is the toy yellow? m/ F(toy,yellow)? a/ F(toy,yellow)p=0
// Implicit C-reasoning for features
e/ Bob is a nice person. m/ C(bob,F(person,nice))
e/ Does Bob talk? m/ A(bob,talk)? a/ A(bob,talk)p=1
e/ Girls are people. m/ C(girl,people)
e/ Do little girls talk? m/ A(F(girl,little),talk)? a/ A(F(girl,little),talk)p=1
// Split word meaning using XOR reasoning
e/ Are flies animals? m/ C(fly,animal)? a/ C(fly,animal)p=0.5
e/ Fly means either a kind of move or a kind of animal. m/ XOR(C(fly,move)p=1,C(fly,animal)p=1)
// XOR-reasoning generates two meanings for fl 1:move 2:animal and creates the C-concepts
e/ Is fly a kind of move? m/ C(fly,move)? a/ C(fly,move)p=1
e/ Are flies animals? m/ C(fly,animal)? a/ C(fly,animal)p=0 // XOR reasoning generates this!!
e/ Birds fly. m/ A(bird,fly) // this concept will have the first meaning of fly as parent
e/ Do birds move? m/ A(bird,move)? a/ A(bird,move)p=1 // because it takes fly first meaning, move
// C-reasoning to detect disjunct classes - not necessary for this specific example
// If two classes have no (very few) common members then they are disjunct
e/ Are flies animals? m/ C(fly,animal)? a/ C(fly,animal)p=0 // 'move' and 'animal' classes are disjunct
// the system could reason that XOR(C(%1,move)p=1,C(%1,animal)p=1)
// split the meaning of "the" using XOR reasoning
e/ The fox is big. m/ F(Q(the,fox),big)
e/ Is the fox big? m/ F(Q(the,fox),big)? a/ F(Q(the,fox),big)p=1
e/ Are foxes big? m/ F(fox,big)? a/ F(fox,big)p=0.5 //what we know about "the fox" is not known about "fox"
e/ The %1 is either the same as %1, or is a kind of %1. m/ XOR(D(Q(the,%1),%1)p=1,C(Q(the,%1),%1)p=1)
// XOR-reasoning generates two meanings of "the" and creates the D and C concepts
e/ The fox is big. m/ F(Q(the,fox),big) // F(fox,big) is now generated as we take the1
e/ Are foxes big? m/ F(fox,big)? a/ F(fox,big)p=1 // we take meaning 1 and use D(Q(the,%1),%1)p=1
// Word sense disambiguation using assumption branches and likelihood.
e/ Foxes are either big or small. m/ F(fox,XOR(big,small))
e/ The fox is small. m/ F(Q(the,fox),small) //the2, "special" is taken as we now F(fox,big)
e/ Are foxes small? m/ F(fox,small)? a/ F(fox,small)p=0 //the2 was taken so the answer is no
e/ Are flies people? m/ C(fly,people)? a/ C(fly,people)p=0
// two assumptions are taken for 'fly' meaning. In 1 we generate C(fly,move), in 2 we generate C(fly,animal)p=1 and C(fly,people)p=0.
e/ What are flies? m/ C(fly,?) a/ C(fly,move)p=1 // for now, meaning 1 will be taken.
// Quantifiers, unique instance versus general
m/ IM(
m/ D(Q(all,%1),%1)p=1 // this defines 'all' as general
m/ D(F(%1,general),%1)p=1 // this defines "general" to mean general
m/ D(F(%1,R(in,general)),%1)p=1 // this defines "in general" to mean general
m/ D(F(Q(%2,%1),R(in,general)),%1)p=1 // this defines "in general" to mean general for any Q()
m/ D(F(Q(%2,%1),general),%1)p=1 // this defines "general" to mean general for any Q()
m/ D(F(Q(%2,%1),specific),%1)p=0 // this defines "specific" not meaning general
m/ C(F(Q(%2,%1),specific),%1)p=1 // this defines "specific" meaning an instance
m/ D(Q(some,%1),%1)p=0.5 // this defines some as partially general
m/ D(Q(all,%1),%1)p=1 // this defines all as general
m/ The %1 is the same as a specific %1. m/ D(Q(the,%1),F(Q(a,%1),specific)) // this concept will use the second meaning of 'the'
// we already should have D(Q(the2,%1),%1)p=0 which means that the second meaning of 'the' is instance, not generalizing.
e/ Are foxes smart? m/ F(fox,smart)? a/ F(fox,smart)p=1
e/ Is the fox smart? m/ F(Q(the,fox),smart)? a/ F(Q(the,fox),smart)p=1
e/ Foxes are fast. m/ F(fox,fast)
e/ Are foxes fast? m/ F(fox,fast)? a/ F(fox,fast)p=1
e/ Are foxes slow? m/ F(fox,slow)? a/ F(fox,slow)p=0.5
e/ An animal is either fast or slow. m/ F(animal, XOR(fast,slow))
e/ Are foxes fast? m/ F(fox,fast)? a/ F(fox,fast)p=1
e/ Are foxes slow? m/ F(fox,slow)? a/ F(fox,slow)p=0
e/ The fox is slow. m/ F(Q(the,fox),slow) // second meaning of 'the' used
e/ If the fox is slow then the fox runs slowly. m/ IM(F(Q(the,fox),slow),F(A(Q(the,fox),run),slowly))
e/ The fox runs slowly. m/ F(A(Q(the,fox),run),slowly)
e/ If the fox runs slowly then the fox is slow. m/ IM(F(A(Q(the,fox),run),slowly),F(Q(the,fox),slow))
e/ Are foxes fast? m/ F(fox,fast)? a/ F(fox,fast)p=1
e/ Are foxes slow? m/ F(fox,slow)? a/ F(fox,slow)p=0
e/ Is the fox fast? m/ F(Q(the,fox),fast)? a/ F(Q(the,fox),fast)p=1 // first meaning of 'the' used
e/ Is the fox slow? m/ F(Q(the,fox),slow)? a/ F(Q(the,fox),slow)p=1 // second meaning of 'the' used
// because we know the fox runs slowly, so we have 2 sources of the fox being slow, this will add likelihood.
// %-rules for mean and may
m/ IM(A(%1,I(mean,%2)),D(%1,%2)) // explains mean
m/ IM(A(%1,I(Q(may,%2),%3)),A(%1,I(%2,%3))p=0.5) // explains may
// reasoning on necessary condition (N)
e/ IM(N(%1,%2p1)p2,%1p=pcond) // reasoning rule for N relation - necessary condition.
e/ Mary eats muffins if Mary is hungry. m/ N(A(Mary,I(eat,muffin)),F(Mary,hungry))
e/ Mary is not hungry. m/ F(Mary,hungry)p=0
e/ Does Mary eat muffins? m/ A(Mary,I(eat,muffin))? a/ A(Mary,I(eat,muffin))p=0
e/ Mary is hungry. m/ F(Mary,hungry)p=1
e/ Does Mary eat muffins? m/ A(Mary,I(eat,muffin))? a/ A(Mary,I(eat,muffin))p=0.5
// Mapping: assign referents to pronouns and other references
// from now on we may use sessions to show text boundaries for mapping
e/ He may mean a boy. m/ D(he,boy)p=0.5
e/ She in general may mean a girl. m/ D(F(she,R(in,general)),girl)p=0.5
e/ He does not mean a girl. m/ D(he,girl)p=0
e/ She does not mean a boy. m/ D(she,boy)p=0
e/ He must always be identified with a person. m/ N(D(he,%1)r=1,C(%1,person)) //D(%) launches the mapping assumption branch, r=1 ensures great reward
e/ She must always be identified with a person. m/ N(D(she,%1)r=1,C(%1,person)) //D(%) launches the mapping assumption branch, r=1 ensures great reward
session/
e/ Joe is a boy. m/ C(Joe,boy)
e/ Mary and Joe are playing in the garden. m/ F(A(AND(Mary,Joe),play),R(in,garden))
e/ She is pretty. m/ F(she,pretty) r/ D(she,Mary)
e/ He is a knight. m/ C(he,knight) r/ D(he,Joe)
e/ What is Mary like? m/ F(Mary,?) a/ F(Mary,pretty)p=1
e/ What is Joe like? m/ F(Joe,?) a/ Not found: F(Joe,?)
e/ What is Mary? m/ C(Mary,?) a/ C(Mary,person) C(Mary,people) C(Mary,girl)
e/ What is Joe? m/ C(Joe,?) a/ C(Joe,person) C(Joe,people) C(Joe,boy) C(Joe,knight)
session/
// Updating p-value based on multiple statements and various degrees of certainity and generality (some, most, approximately, ...)
// Inductive reasoning, generalization (propagate knowledge from instances to general concept)
// Unify word meaning
// Understanding groups
// Family example
// Understanding child story, personalization, real and unreal
// Understanding people talking, knowing, thinking, assuming, denying
// Understanding goal, intention, ability, plan, ask, promise, obligation, permission etc
// Understanding comparisons, more, less, earlier, later
// Understanding time
e/ When do foxes hunt? m/ F(A(fox,hunt),T(?)) a/ not found:F(A(fox,hunt),T(?))
e/ "at dawn" means a time. m/ C(R(at,dawn),time)
e/ If %1 is a time, then the time is %1. m/ IM(C(%1,time),T(%1))
e/ When do foxes hunt? m/ F(A(fox,hunt),T(?)) a/ F(A(fox,hunt),T(R(at,dawn)))
// Understanding space and movements
// Updating relevance (r-values) of concepts: make unused concepts less relevant so that they dont become activated.
// Activate concepts to determine limited range of reasoning.
// Increased activation (elaboration) if understanding is too low.
// Learn - partial copy of WM to KB.
// Understanding numbers