Skip to content

[BUGFIX] Pruning fix plus CI fixes - #261

Open
unprovable wants to merge 5 commits into
Quantinuum:mainfrom
QuantumVillage:pruning_fix
Open

unprovable wants to merge 5 commits into
Quantinuum:mainfrom
QuantumVillage:pruning_fix

Conversation

@unprovable

Copy link
Copy Markdown

Pruning in the codebase was good, but would conflate some instances. _prune_indices looked nouns up by their text instead of their position. The issues/fixes are essentially:

  • min_noun_freq could 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.
  • Pruning missed mentions. Only the first mention in every other sentence was pruned, with other mentions in the starting sentence being skipped, and later occurrences of an element of pruned_nouns, not coreferent with its first occurrence, were never pruned.

_prune_indices is here reworked to operate entirely from (sentence, token) positions. An entity is pruned if it has fewer than min_noun_freq mentions, or if any of its mentions are a word in pruned_nouns (then every mention of it is removed). The frequency logic is moved out of text2circuit into _prune_indices, and _get_index removed.

Also included are CI fixes, but many are upstream stuff that non-Quantinuum/CQC folk cannot fix.

This branch has not been deployed

No deployments
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.

1 participant