Improved PyhtonEvaluator in order to use methods that need context

This commit is contained in:
2020-05-18 22:35:59 +02:00
parent c822ff6a7f
commit 95dc147bbd
14 changed files with 187 additions and 74 deletions
@@ -89,10 +89,10 @@ class SheerkaComparisonManager(BaseService):
cache = Cache()
self.sheerka.cache_manager.register_cache(self.RESOLVED_COMPARISON_ENTRY, cache, persist=False)
self.sheerka.bind_service_method(self, SheerkaComparisonManager.is_greater_than)
self.sheerka.bind_service_method(self, SheerkaComparisonManager.is_less_than)
self.sheerka.bind_service_method(self, SheerkaComparisonManager.get_partition)
self.sheerka.bind_service_method(self, SheerkaComparisonManager.get_concepts_weights)
self.sheerka.bind_service_method(self.is_greater_than)
self.sheerka.bind_service_method(self.is_less_than)
self.sheerka.bind_service_method(self.get_partition)
self.sheerka.bind_service_method(self.get_concepts_weights)
def is_greater_than(self, context, prop_name, concept_a, concept_b, comparison_context="#"):
"""