Repository navigation
split a list of text ordinals - #1259
Merged
spencermountain merged 1 commit intoNov 2, 2026
Merged
Conversation
numbers() only split 'seventh fifth' when no match in the whole document had a tens word before an ordinal, so one 'twenty seventh' anywhere kept 'the fifth, sixth' together and parsed it as 0. An ordinal always ends its number, so splitting after it can't break up 'twenty first'. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
|
very nice! |
Merged
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.
numbers() only split 'seventh fifth' when no match in the whole view had a tens word before an ordinal, so one 'twenty seventh' anywhere kept the others together:
An ordinal always ends its number, so splitting after it can't break up 'twenty first'; I dropped that check. These now give [5, 6, 27] and [1, 2, 23]. Running numbers() over the nlp-corpus sentences that contain ordinals gives the same output as before. Added a test to number-edge-cases.test.js; it fails on dev and passes with the change. The full suite and the plugin suites pass.
I used Claude Code to write this change.