forked from NatLanGroup/NatLan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreason.py
13 lines (10 loc) · 825 Bytes
/
reason.py
1
2
3
4
5
6
7
8
9
10
11
12
13
import gl, conc
class Rule:
def __init__(self,actualconcept): # an instance represents a single rule to apply for the actual concept
self.actual = actualconcept # index of concept in WM for which we found a rule
self.rule = -1 # index of rule in KB, an IM(g,k) concept
self.condition = [] # indices (in KB) of a,b,c in IM(Z(a,b),k) . here c=Z(a,b)
self.match=[] # indices of m,n,q in WM, where m matches a, n matches b etc
self.matchrelation=-2 # if for example b=X(%2,%3) and n matches b, then we store the relation found in m
self.matchvalue = [] # %1 %2 %3 matching concepts
self.matchp = [] # p1 p2 etc matching p values