Repository navigation
[BUGFIX] Pruning fix plus CI fixes - #261
Open
unprovable wants to merge 5 commits into
Open
unprovable wants to merge 5 commits into
unprovable wants to merge 5 commits into
Conversation
Add tests for DisCoCircReader pruning functionality.
Pruning can be done more sensitively to entities.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pruning in the codebase was good, but would conflate some instances.
_prune_indiceslooked nouns up by their text instead of their position. The issues/fixes are essentially:min_noun_freqcould prune the wrong entity. Rarely mentioned entities were found by position, turned into their words, then looked up again as text, taking the first match. If a rare entity's word (e.g. "it") appeared earlier as a different, frequently mentioned entity, that frequent entity was pruned and the rare one kept.pruned_nouns, not coreferent with its first occurrence, were never pruned._prune_indicesis here reworked to operate entirely from(sentence, token)positions. An entity is pruned if it has fewer thanmin_noun_freqmentions, or if any of its mentions are a word inpruned_nouns(then every mention of it is removed). The frequency logic is moved out oftext2circuitinto_prune_indices, and_get_indexremoved.Also included are CI fixes, but many are upstream stuff that non-Quantinuum/CQC folk cannot fix.