Fixed #68: Implement SheerkaQL

Fixed #70: SheerkaFilterManager : Pipe functions
Fixed #71: SheerkaFilterManager : filter_objects
Fixed #75: SheerkaMemory: Enhance memory() to use the filtering capabilities
Fixed #76: SheerkaEvaluateConcept: Concepts that modify the state of the system must not be evaluated during question
This commit is contained in:
2021-04-26 19:13:47 +02:00
parent bef5f3208c
commit 1059ce25c5
57 changed files with 5759 additions and 1302 deletions
+19 -9
View File
@@ -3,9 +3,9 @@ push_ontology("english")
def concept q from q ? as question(q) pre is_question() auto_eval True
set_is_lesser(__PRECEDENCE, q, 'Sya')
def concept the x ret memory(x)
def concept a x where 'x is a concept' ret x
def concept an x where 'x is a concept' ret x
def concept the x where isinstance(x, Concept) ret memory(x)
def concept a x where isinstance(x, Concept) ret x
def concept an x where isinstance(x, Concept) ret x
set_is_greatest(__PRECEDENCE, c:the x:, 'Sya')
set_is_greatest(__PRECEDENCE, c:a x:, 'Sya')
set_is_greatest(__PRECEDENCE, c:an x:, 'Sya')
@@ -37,18 +37,24 @@ set_is_greater_than(__PRECEDENCE, c:x and y:, c:x or y:, 'Sya')
set_is_less_than(__PRECEDENCE, c:q:, c:x or y:, 'Sya')
# some words
def concept human
def concept male
def concept female
def concept man
man is a male
def concept woman
woman is a female
def concept human
man is a human
woman is a human
def concept boy
def concept boys
def concept girl
man is a male
man is a human
boy is a male
boy is a human
woman is a female
woman is a human
girl is a female
girl is a human
def concept boys
def concept girls
def concept shirt
def concept table
@@ -66,3 +72,7 @@ def concept sunday
def concept how is x pre is_question() as smart_get_attr(x, adjective)
def concept what x is y pre is_question() where x is an adjective as smart_get_attr(y, x)
def concept what is the x of y pre is_question() where x is an adjective as smart_get_attr(y, x)
#
def concept he ret memory("self is a human and self is a male")
def concept she ret memory("self is a human and self is a female")