scrapinghub / scrapinghub/dateparser

Dates not getting recognised or wrongly recognised if there are some numbers in the text

Open
#787 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

search_dates Type: Bug
Dominant language
Python
Stars
2.9k
Forks
520
Avg merge
22h 56m
Merged PRs (30d)
6

Description

search_dates("At 30 September 2018 E'000", languages=['en']) # No Output

search_dates("20 30 September 2018", languages=['en']) # WRONG OUTPUT, though text doesn't make sense but the output should be 30 September rather than 20 September
Out[34]: [('20 30 September 2018', datetime.datetime(2018, 9, 20, 0, 0))]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two search_dates examples from the issue and trace the parser entry point they exercise. Done means the text containing “30 September 2018 E'000” is recognised and the malformed numeric prefix does not cause 20 September to be selected instead of 30 September.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.