Include token in subgraph even if not covered by segmentation node#334
Open
matthias-stemmler wants to merge 2 commits intokorpling:mainfrom
Open
Include token in subgraph even if not covered by segmentation node#334matthias-stemmler wants to merge 2 commits intokorpling:mainfrom
matthias-stemmler wants to merge 2 commits intokorpling:mainfrom
Conversation
Contributor
Author
|
I added another test to close the (pre-existing) gap in test coverage. The remaining CI failure seems to be a permissions issue. |
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.
This fixes a regression I introduced in #289: When
subgraphis called with a token and a segmentation, and the token is not covered by any segmentation node, then the token is not included in the subgraph.In #289 I had filtered out matched tokens to ensure that tokens are sorted, claiming that
new_overlapped_nodes_iteratoralready included the matched tokens. However, if a segmentation is specified, this is only true for tokens that are covered by a segmentation node.The fix changes
get_left_right_token_with_offset_with_segmentationso that instead of failing, it returns just the covered tokens without context in case none of them is covered by a segmentation node.I hope this doesn't break any other invariants. At least the existing tests are still green. 🙂