scrapinghub / scrapinghub/dateparser

False positives when searching dates

Open
#582 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

OS: Windows 10.0.17763.805
dateparser version: 0.7.2

When using the search_dates() function some numerical and punctuation mark combinations that don't resemble any date format I've ever seen get picked up as dates.

To reproduce run the following code and replace <false positive> with any one of the following:

  • 8: 100M2_
  • 100M
  • 10,00 2
  • 19,60 5
  • 73 20
from dateparser.search import search_dates

search_dates("The following isn't a correct date <false positive>")

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 running the provided search_dates() reproduction with each listed string and inspect the search implementation and its existing tests. Done means these non-date combinations are no longer returned as dates while valid date searches continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.