Integrate the knowledge ASAP.
If we do this before the parsing we can leverage that semantics in the matching phase.
This commit is contained in:
parent
02f909269a
commit
2bfe676b2d
2 changed files with 17 additions and 5 deletions
|
@ -24,6 +24,13 @@ class KnowledgeBase(object):
|
|||
# Parse everything
|
||||
parsed_examples = []
|
||||
for example in examples:
|
||||
# If there's parsed data, leverage it ASAP
|
||||
if 'parsed' in example:
|
||||
result = knowledge_evaluation.integrate_information(self.knowledge, {
|
||||
"parsed": example['parsed'],
|
||||
})
|
||||
self.act_upon(result)
|
||||
|
||||
logging.info("\x1b[7;32m> {} \x1b[0m".format(example))
|
||||
tokens, decomposition, inferred_tree = parsing.integrate_language(self, example)
|
||||
logging.info(tokens)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue