Extract more contextual info from the words.
A property dictionary is now only to be considered equal to a word when it shares at least one group, or neither has groups.
This commit is contained in:
parent
d3b604efca
commit
0fbb9238eb
5 changed files with 36 additions and 6 deletions
|
@ -395,8 +395,7 @@ def is_definite_minisegment(minisegment):
|
|||
|
||||
def match_token(knowledge, next_token, minisegment):
|
||||
if isinstance(minisegment, dict):
|
||||
# TODO: check if the dictionary matches the values
|
||||
return True
|
||||
return knowledge_evaluation.can_be_used_in_place(knowledge, next_token, minisegment)
|
||||
elif isinstance(minisegment, str):
|
||||
# TODO: check if the two elements can be used in each other place
|
||||
return next_token == minisegment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue