Repository navigation
extraction: add Russian month names (#156) - #210
Open
hasandenizuk wants to merge 1 commit into
Open
hasandenizuk wants to merge 1 commit into
hasandenizuk wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #210 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 886 886
=========================================
Hits 886 886 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Owner
|
Could you rebase it on master now that #207 is merged? |
Text-based extraction now knows the nominative and genitive Russian month names, so dates such as "30 июля 2015" are found in fast mode and no longer fall back to a wrong day in extensive mode.
hasandenizuk
force-pushed
the
fix/156-russian-month-names
branch
from
November 6, 2026 17:39
d6a5bbe to
3110aa4
Compare
Author
|
Rebased on master. The conflict was in the month tuples, the docs line and the dateparser language list; both the Polish and the Russian names are kept. Tests, ruff, mypy and eval_gate pass locally (fast F1 0.9270, extensive 0.9490). |
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.
Adds the Russian month names (nominative and genitive, e.g. "июль" and "июля") to
MONTHS, as suggested in #156.Before, a page with only a Russian text date such as
30 Июля 2015gaveNonein fast mode. In extensive mode,12 марта 2021came back as2021-01-01. Both now give the right date.Changes:
htmldate/extractors.py: Russian names added to each month tuple (the tuples are now multi-line afterruff format).tests/unit_tests.py: every Russian name intest_regex_parse(lower and upper case),ruadded to the dateparser consistency check, and afind_datetest for both modes.docs/index.rstandCHANGELOG.md: Russian added to the supported languages.Tested:
pytest,ruff check .,ruff format --check htmldate tests,mypy -p htmldateandeval_gate.py(TZ=Europe/Berlin). Fast F1 goes from 0.9265 to 0.9270, extensive stays at 0.9490. The only test failures are the four that need network access, and they fail the same way on master.This touches the same tuples as #207 (Polish), so whichever goes second needs a small rebase. I can do that.
Fixes #156