Fixed #3: Added sheerka.resolve_rule()
Fixed #5: Refactored SheerkaComparisonManager Fixed #6: Sya parser no longer works after restart
This commit is contained in:
@@ -136,7 +136,7 @@ class SyaConceptDef:
|
||||
|
||||
# otherwise, use sheerka # KSI 20210109 otherwise or override ??
|
||||
if sheerka:
|
||||
concept_weight = parser.sheerka.get_concepts_weights(BuiltinConcepts.PRECEDENCE, CONCEPT_COMPARISON_CONTEXT)
|
||||
concept_weight = parser.sheerka.get_weights(BuiltinConcepts.PRECEDENCE, CONCEPT_COMPARISON_CONTEXT)
|
||||
if concept.str_id in concept_weight:
|
||||
sya_concept_def.precedence = concept_weight[concept.str_id]
|
||||
|
||||
@@ -1210,7 +1210,10 @@ class SyaNodeParser(BaseNodeParser):
|
||||
debugger.debug_log(debug_prefix + f", all parsers are locked")
|
||||
continue
|
||||
|
||||
concepts_def = self.get_concepts(token, self._is_eligible, to_map=SyaConceptDef.get_sya_concept_def)
|
||||
concepts_def = context.sheerka.get_concepts_by_first_token(token,
|
||||
self._is_eligible,
|
||||
to_map=SyaConceptDef.get_sya_concept_def,
|
||||
parser=self)
|
||||
if not concepts_def:
|
||||
if debugger.is_enabled():
|
||||
debugger.debug_log(debug_prefix + f", no concept found")
|
||||
|
||||
Reference in New Issue
Block a user