One function
split_glues in careless25/text2digits
The author described this change as “fix: treat end-of-string as non-digit in separator regex (#50)”. It counts as a record because the checks below fail on the code as it stood at 2fb3cad67 and pass on cab40600f, with nothing else changed between the two runs.
Projectcareless25/text2digits
Fix saved2026-04-24
Sharing licenceMIT · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
Splits a string and preserves the glue, i.e. the separator fragments. This is useful when words of a sentence should be processed while still keeping the possibility to recover the original sentence. :param text: The string to be split. :param separator: The separator to use for splitting (defaults to whitespace). :return: A generator yielding (match, glue) pairs, e.g. the word and the whitespace next to it. If no glue is left, an empty string is returned.
The change
| 1 | - | def split_glues(text: str, separator=r'\s+|(?<=\D)[.,;:\-_](?=\D)') -> Iterator[str]: | |
| 1 | + | def split_glues(text: str, separator=r'\s+|(?<=\D)[.,;:\-_](?=\D|$)') -> Iterator[str]: | |
| 2 | 2 | """ | |
| 3 | 3 | Splits a string and preserves the glue, i.e. the separator fragments. | |
| 4 | 4 | This is useful when words of a sentence should be processed while still |
The check that tells the two apart
fail→pass·tests/test_number_conversion.py::test_trailing_sentence_punctuation[He
fail→pass·tests/test_number_conversion.py::test_trailing_sentence_punctuation[I
fail→pass·tests/test_number_conversion.py::test_trailing_sentence_punctuation[She
Check file tests/test_number_conversion.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it2fb3cad67afb88f1e8bf83671a76a02f19746047
Broken version dated2026-04-24
Moduletext2digits.text_processing_helpers
Units changedsplit_glues
Fingerprintee89a1c44c9b7964
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in careless25/text2digits
- 2026-04-28Fix how 'oh' is handled
- 2026-04-28Raise valueError if value/scale didnt match
- 2026-04-28find_similar_word
- 2026-04-28bigram_similarity
- 2020-04-29Fix handling of time formats, add tests (from PR #27)