[pull] master from scrapinghub:master - #111
Merged
Merged
Conversation
) * Improve Czech (cs) language data (#1172) - Add month locative/dative forms (lednu, únoru, březnu, dubnu, květnu, červnu, červenci, srpnu, říjnu, prosinci) for dates like "v lednu 2023" - Add July abbreviation "črv" - Fix "za měsíc/týden/rok" not parsing: add accusative simplification patterns (previous patterns only matched instrumental -em forms) - Add tests covering the new expressions Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Find a date written next to a relative one without a comma (#695) search_dates('Today 13 Feb 2020') found no dates at all, while 'Today, 13 Feb 2020' found both. A chunk that does not parse as one date is split by looking for a separator that the translation and the text it was translated from hold the same number of times, and "today" is translated into "0 day ago": the translation gains two spaces the text never had, so the whitespace splitter is refused and the whole chunk is dropped. The comma form works because the comma survives the translation one for one. Cut such a chunk where the relative expression ends instead. The cut is taken only when the expression sits at one end of the chunk, when the rest of the translation keeps one word per remaining original word, when the word at that end really is the one the expression was translated from -- which the locale is asked to confirm by translating it on its own -- and when what is left of the chunk is a date. A chunk that fails any of these is left alone rather than cut at a guess, which is why 'Today 13 Feb 2020 and 14 Mar 2021', whose "and" the translation drops, still finds nothing. The cut is only looked for when no separator lined up, so a chunk that splits today keeps splitting exactly the way it does now. Fixes #695 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )