opencog / link-grammar

The CMU Link Grammar natural language parser
GNU Lesser General Public License v2.1
389 stars 119 forks source link

eliminate_duplicate_disjuncts(): Return the discarded disjunct count #1518

Closed ampli closed 6 months ago

ampli commented 6 months ago

I created this branch to keep the number of disjuncts up-to-date by adding or substructing it every time a disjunct is added/discarded. The idea was to avoid wasting time on CPU cache misses while iterating long disjunct lists. However, it became very cumbersome, so I discarded this code.

This change in eliminate_duplicate_disjuncts() and the addition of the number of discarded disjuncts to - verbosity=2 remained.