r0ller / alice

A Language Interpreter as semantiC Experiment in natural language processing
8 stars 0 forks source link

dependent functor/d_key pair calculated as found for each functor as many times as it is found for different functors of the same node #8

Closed r0ller closed 9 years ago

r0ller commented 9 years ago

To make it clear with an example: if IN1 is a dependency of LIST1 and LIST2 as well and it's found for both functors (once for LIST1 and once for LIST2) during the longest matching semantic rule calculation then it's cumulated and in is_longest_match_for_semantic_rules_found() shows up as having been found twice! Currently, a fix takes care of avoiding that for the functor being the argument of the first call of the recursive method find_dependencies_for_node() but that logic should be extended to all levels of recursion. Fixing that has the corollary that the algorithm to calculate the longest match needs to be adjusted as well.

r0ller commented 9 years ago

Ignore the title, it's confusing...

r0ller commented 9 years ago

Solved with commit 5aa3ff0a396a9c0f36a0617d5fa00b4e28c48014.