scrapinghub / scrapinghub/dateparser
Recommended setting, minimal search
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 520
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 6
Description
I have been using chrono for a long time for date parsing, as it was reliable and effective to my needs, but I decided to drop it as it doesn't support Python3.
Moving from chrono to dateparser was not trivial. I couldn't find any mention that adding languages=['en'], a common use case, would be 50 times faster than without it, I think this should be a recommended setting. Using this setting it is now almost as fast as chrono, which is ok for my needs. (I need to try to parse millions of small strings)
I also tried your search_dates, a great method, that can replace my own implementation of trying to parse every substring from the sentence, however, I found that it does not give the minimal result.
For example, "he retired on September 1st, 1969." would find a date "on September 1st, 1969" and not just "September 1st, 1969". Is there a way to add a minimal setting?
Thanks for this amazing repo!
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 at the search_dates entry point and review how the languages=['en'] recommendation is documented. The work is complete when the recommendation is clear and the requested minimal-result behavior has an agreed, verified outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100