scrapinghub / scrapinghub/dateparser
Intermittent fault when finding dates.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
A bit of an edge case but something I don't understand, when I attempt to parse using the command dateparser.search.search_dates on the text:-
the dates 3pm on 5/6/2007 and 11/12/2015.
I get the datetimes:-
('3pm', datetime.datetime(2018, 7, 11, 15, 0))
('5/6/2007', datetime.datetime(2007, 6, 5, 0, 0))
('11/12/2015', datetime.datetime(2015, 12, 11, 0, 0))
but when I attempt to parse:-
the dates 3pm on 5/6/2007 and 11/12/2015. This is an example from last Tuesday, Can it extract dates like 1-1-1994 and can it understand text like the 3rd of august 2043?
I only get the dates
('tuesday', datetime.datetime(2018, 7, 10, 0, 0))
('1-1-1994', datetime.datetime(1994, 1, 1, 0, 0))
('the 3rd of august 2043', datetime.datetime(2043, 8, 3, 0, 0))
The same as if I were to attempt to parse:-
This is an example from last Tuesday, Can it extract dates like 1-1-1994 and can it understand text like the 3rd of august 2043?
Can anyone think of a reason this may be happening, have I done something wrong? The command dateparser.parse(text) returns a None
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
Reproduce the two examples through dateparser.search.search_dates and compare them with dateparser.parse, focusing on why the presence of earlier time and date expressions changes the extracted results. Trace the parsing behavior from those entry points and define done as consistent extraction of the dates shown in the report, with regression coverage for both inputs.
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
- 35/100