Fixed #100 : SheerkaAdmin: Add builtins() command

Fixed #99 : SheerkaQueryManager: I can manage contains predicate when filtering objects
Fixed #97 : ERROR: list indices must be integers or slices, not Concept
Fixed #96 : SequenceNodeParser: SequenceNodeParser must correctly handle concept definition
Fixed #95 : ResolveAmbiguity must not remove concepts that do not require evaluation
Fixed #94 : Concepts with the same key are lost when new ontology
Fixed #93 : Introduce BuiltinConcepts.EVAL_GLOBAL_TRUTH_REQUESTED
Fixed #92 : ExpressionParser: Implement compile_disjunctions()
Fixed #91 : Implement get_concepts_complexity(context, concepts, concept_parts)
Fixed #90 : ResolveAmbiguity : where predicate is not used to resolve ambiguity
Fixed #89 : ResolveAmbiguityEvaluator: Concepts embedded in ConceptNode are not resolved
Fixed #88: SyaNodeParser: Parse multiple parameters when some of the are not recognized
Fixed #87: SyaNodeParser : Parse the multiple parameters
This commit is contained in:
2021-07-31 08:52:00 +02:00
parent 7dcaa9c111
commit e69745adc8
70 changed files with 1561 additions and 455 deletions
+12 -10
View File
@@ -1105,13 +1105,14 @@ class TestSheerkaConceptManager(TestUsingMemoryBasedSheerka):
Concept("hundreds", definition="number hundred"),
)
sheerka.set_isa(context, sheerka.new("one"), number)
sheerka.set_isa(context, sheerka.new("two"), number)
sheerka.set_isa(context, sheerka.new("twenty"), number)
sheerka.set_isa(context, sheerka.new("thirty"), number)
sheerka.set_isa(context, sheerka.new("hundred"), number)
sheerka.set_isa(context, sheerka.new("twenties"), number)
sheerka.set_isa(context, sheerka.new("hundreds"), number)
global_truth_context = self.get_context(sheerka, global_truth=True)
sheerka.set_isa(global_truth_context, sheerka.new("one"), number)
sheerka.set_isa(global_truth_context, sheerka.new("two"), number)
sheerka.set_isa(global_truth_context, sheerka.new("twenty"), number)
sheerka.set_isa(global_truth_context, sheerka.new("thirty"), number)
sheerka.set_isa(global_truth_context, sheerka.new("hundred"), number)
sheerka.set_isa(global_truth_context, sheerka.new("twenties"), number)
sheerka.set_isa(global_truth_context, sheerka.new("hundreds"), number)
sheerka.clear_bnf_definition() # reset all the grammar to simulate Sheerka restart
@@ -1129,12 +1130,12 @@ class TestSheerkaConceptManager(TestUsingMemoryBasedSheerka):
}
def test_i_can_resolve_when_concepts_have_multiple_levels_of_sets(self):
sheerka, context, adjective, color, red, qualified_table = self.init_concepts(
sheerka, context, adjective, color, red, qualified_table = self.init_test(global_truth=True).with_concepts(
"adjective",
"color",
"red",
Concept("qualified table", definition="adjective 'table'"),
)
).unpack()
sheerka.set_isa(context, color, adjective)
sheerka.set_isa(context, red, color)
@@ -1404,7 +1405,8 @@ class TestSheerkaConceptManager(TestUsingMemoryBasedSheerka):
def test_i_cannot_smart_get_attr_when_attribute_does_not_exist(self):
sheerka, context, adjective, color, red, size, table = self.init_concepts("adjective",
"color",
Concept("red", body="red").auto_init(),
Concept("red",
body="red").auto_init(),
"size",
"table",
create_new=True)