Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mk_partse_set: Avoid empty Parse_set elements #1480

Merged
merged 6 commits into from
Mar 28, 2024
Merged

Conversation

ampli
Copy link
Member

@ampli ampli commented Mar 27, 2024

Significantly reduce the number of the Parse_set elements. It addresses the issue where mk_parse_set() encounters unconnected elements in the absence of a complete parse for a word range. This not only conserves memory but also reduces CPU usage.

In the same occasion:

  • Refactor for readability.
  • Improve the x_table stats (also needed to check the Parse_set saving).
  • Add a comment on a bug if PERFORM_COUNT_HISTOGRAMMING is defined.

@linas
Copy link
Member

linas commented Mar 27, 2024

This fails the python unit tests; I get

bindings/python-examples/lg_testutils.py'>
............................................s...............sFs.........E.............s.s..............link-grammar: Fatal error:
Assertion (pc != NULL) failed in list_links() (../../link-grammar/parse/extract-links.c:920): walked off the end in list_links

@ampli
Copy link
Member Author

ampli commented Mar 27, 2024

I have to remember to run the tests...
I force-pushed the fix, and also some minor changes.

@linas linas merged commit cb7b946 into opencog:master Mar 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants