Comments (6)
I've tried to modify example and when I modify this line (for DATES_PATTERN
variable)
(?P<months>{months})
to this
(?P<months>{months})(?P<month_ending>\W|$)
it solves the problem.
In case if this solution is fine - I can make a pull request.
P.S. All tests work fine. Also I can add a few more tests to make sure that this problem will not occur later.
from datefinder.
There also exists the same issue related to timezones
E assert 't at 2p.m. m...ndard time on' == 'at 2p.m. moun...ndard time on'
E - t at 2p.m. mountain standard time on
E ? --
E + at 2p.m. mountain standard time on
tests/test_extract_date_strings.py:20: AssertionError
for
['the big fight at 2p.m. mountain standard time on ufc.com', 'at 2p.m. mountain standard time on']
it cuts letter t
, because it's one of the choices
from datefinder.
Go ahead and put up a PR. Just want to make sure we aren't removing other valid matches before merging it in. Great work!
from datefinder.
I've solve issue related to month, but I failed to solve it for extra_tokens
.
It still extracts
t at 2p.m. mountain standard time on ufc.com
from
the big fight at 2p.m. mountain standard time on ufc.com
The same trick didn't help for this case.
from datefinder.
In fact such ending-guards ( "...\W|$" ) will be needed for DateFinder.REPLACEMENTS strings too, since source replacement can be easily done within words, corrupting them. Doing tokenization would be better approach, though very different one
from datefinder.
This was resolved.
from datefinder.
Related Issues (20)
- Major Bug while detecting day in year starting dates HOT 1
- Broken in 0.7.3 : date not detected with specific surrounding text HOT 1
- Can't find specific dates in %d.%m.%Y format HOT 2
- "On <month_name>" gives a weirdly extracted date value HOT 1
- Reference Date
- strict mode fills in and return incomplete dates (that are not supposed to be dates)
- Searching "Date: Tue, 23 Apr 1996 13:28:27 -0400" fails to obtain date HOT 3
- "French 75" is identified as date due to the presence if 75
- Datefind mistakenly identifies "pre-qualification may" as a date resulting in the date list as "on may"
- update print in example to Python 3
- Release version 0.7.4?
- UnknownTimezoneWarning warning HOT 1
- "datefinder" fails with this text "25/7//2023".
- REPLACEMENTS not comprehensive enough?
- Fails to detect correct day if text is '9.6 20:30'.
- Failed To detect the Date : 2022 05 October if Strict is True.
- Fails to detect date if text is '2023-10-04 decision' or '2023-10-04 novel'
- Detects datetime.datetime(2015, 12, 18, 0, 0) when given " 2015 " HOT 2
- Something wrong with no english strin months?
- find_dates fails when there's a number after a date HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datefinder.