Skip to content

Conversation

@pisong314
Copy link
Contributor

The issue
whether the config.general.show_nested_entities flag is True or False, there seems to be no effect to the output.

Example
if the text is “chest pain” which matches 1) “chest pain” greedily 2) “chest” 3) “pain”, it seems to produce all 3 entities at the end at all time regardless of the flag.

What's wrong

  • the current logic in postprocessing.py doesn't seem to be filtering anything.
  • the filtering logic doesn't appear to look at the flag at all.

The fix

  • re-implementation of the filtering logic to simply use token index to filter.
  • the flag is passed on and checked during post-processing.

Copy link
Collaborator

@mart-r mart-r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! Much appreciated!

This was handled somewhat differently on v1, but I do think this approach makes a lot of sense!

And kudos for the actual unit tests!

Copy link
Collaborator

@mart-r mart-r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the changes from the workflow needed.

@pisong314
Copy link
Contributor Author

I just added # type: ignore from the original code back. seems to build ok now.

@pisong314
Copy link
Contributor Author

The failing bit now seems to be due to that I don't have access to your environment variables.

@mart-r
Copy link
Collaborator

mart-r commented Oct 2, 2025

Yes. Don't worry about that. All good otherwise.

@mart-r mart-r merged commit ab21034 into CogStack:main Oct 2, 2025
17 of 18 checks passed
@pisong314
Copy link
Contributor Author

thanks!

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