New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All dates in text #12
Comments
To be honest you can feed the parse() routine whole lines and paragraphs of text and it will locate the date and parse it... but it doesn't report back where it found the date. Most people who want to locate a date normally want to know what text is around the date because they want to extract the context of the date. This isn't a problem that I've needed to solve so I never coded for it. I've heard of others solving for it by putting chunks of text thru parse() and if a date was found then putting each line thru to narrow down the place. |
ok, thanks for your answer and your great work on this library. |
Hi elyase, if you pull down the latest, you can use the nlp() function. It sounds like this is what you are looking for. It's working quite well and even includes location information of where it was found within the string. Here's an example and the result differences, run @ 9:28 PM on August 2nd: "I'm so excited!! At 8PM on August 5th i'm going to fly to Florida. Then next Friday at 9PM i'm going to dog n bone! And in 5 minutes i'm going to eat some food!" Regular parse() function returns this: The nlp() function returns this (a tuple of tuples containing datetime, flag, startpos, endpos, and matchedtext): |
Geoffrey, I really really want to add you to the committers for adding this I seriously love this addition to the code! On Fri, Aug 2, 2013 at 7:00 PM, Geoffrey Floyd notifications@github.comwrote:
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
I am also really glad to hear it is implemented, thanks, will try as soon as I have a chance. |
I'd love to be on the committers list! Where do i sign? :) |
Nothing to sign, just let me know what your github handle is and I'll add On Fri, Aug 2, 2013 at 7:46 PM, Geoffrey Floyd notifications@github.comwrote:
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
geoffreyfloyd |
done! On Sun, Aug 4, 2013 at 7:44 AM, Geoffrey Floyd notifications@github.comwrote:
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
marking this as closed - I feel that it's been resolved with the nlp() code, if not please do re-open it. thanks! |
Hi, is it possible to recursively look for all dates in a text, for example extract one, eliminate this chunk of text, parse again for the next one, and so on? Any tips on how I should go for this using parsedatetime?
The text was updated successfully, but these errors were encountered: