Fixed #61 : SheerkaDebugManager: Add get_value()
Fixed #60 : Hash error when ReturnValue is a list of list Fixed #59 : Implement smart_get() Fixed #58 : SheerkaPromptCompleter: Cannot parse concept token Fixed #57 : SheerkaPrompt: Add concept autocompletion Fixed #56 : automatically backup command Fixed #54 : I can record execution status Fixed #53 : ConceptManager: modify_concept fails
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
# question
|
||||
push_ontology("english")
|
||||
def concept q from q ? as question(q) pre is_question()
|
||||
set_is_lesser(__PRECEDENCE, q, 'Sya')
|
||||
set_auto_eval(c:q:)
|
||||
|
||||
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
|
||||
set_is_greatest(__PRECEDENCE, c:the x:, 'Sya')
|
||||
set_is_greatest(__PRECEDENCE, c:a x:, 'Sya')
|
||||
set_is_greatest(__PRECEDENCE, c:an x:, 'Sya')
|
||||
|
||||
def concept "x is a concept" as isinstance(x, Concept) pre is_question()
|
||||
|
||||
# is a
|
||||
def concept x is a y as set_isa(x, y) ret x
|
||||
set_auto_eval(c:x is a y:)
|
||||
def concept x is an y as set_isa(x, y) ret x
|
||||
set_auto_eval(c:x is an y:)
|
||||
def concept x is a y as isa(x,y) pre is_question()
|
||||
# no need to auto eval as it's a question
|
||||
def concept x is an y as isa(x,y) pre is_question()
|
||||
# no need to auto eval as it's a question
|
||||
|
||||
|
||||
# has a
|
||||
def concept x has a y as set_hasa(x, y) ret x
|
||||
set_auto_eval(c:x has a y:)
|
||||
def concept x has an y as set_hasa(x, y) ret x
|
||||
set_auto_eval(c:x has an y:)
|
||||
def concept x has a y as hasa(x,y) pre is_question()
|
||||
# no need to auto eval as it's a question
|
||||
def concept x has an y as hasa(x,y) pre is_question()
|
||||
# no need to auto eval as it's a question
|
||||
|
||||
# AND
|
||||
def concept x and y as x and y pre is_question()
|
||||
set_is_lesser(__PRECEDENCE, c:x and y:, 'Sya')
|
||||
set_is_less_than(__PRECEDENCE, c:q:, c:x and y:, 'Sya')
|
||||
|
||||
# OR
|
||||
def concept x or y as x or y pre is_question()
|
||||
set_is_lesser(__PRECEDENCE, c:x or y:, 'Sya')
|
||||
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')
|
||||
|
||||
|
||||
|
||||
# default
|
||||
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
|
||||
def concept girls
|
||||
def concept shirt
|
||||
|
||||
# days of the week
|
||||
def concept monday
|
||||
def concept tuesday
|
||||
def concept wednesday
|
||||
def concept thursday
|
||||
def concept friday
|
||||
def concept saturday
|
||||
def concept sunday
|
||||
|
||||
# questions
|
||||
def concept what x is y pre is_question() where isa(x, adjective) as smart_get_attr(y, x)
|
||||
def concept how is x pre is_question() as smart_get_attr(x, adjective)
|
||||
Reference in New Issue
Block a user