scrapinghub / scrapinghub/dateparser
Dateparser can not handle accute accent
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
We have a text string where the unicode character U+00b4 (accute accent; ´) is right before the date. Datparser is able to detect the date, but the detected string is empty.
Minimal example:
from dateparser.search import search_dates
text = "ABC´1997."
dates = search_dates(text)
print(dates)
Output:
[('', datetime.datetime(1997, 5, 2, 0, 0))]
Expected output:
[('1997', datetime.datetime(1997, 5, 2, 0, 0))]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal example using dateparser.search.search_dates and the input "ABC´1997.". Trace how the date text is extracted when U+00B4 precedes the date, then add a regression test covering this input and verify that the result contains "1997" with the parsed datetime.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100