date.parse() in nlp_core
See original GitHub issueI tried all the readme examples, and I got very mixed results. Did something in the library break or am I doing something wrong?
nlp.text('She sells seashells').to_past()
// An array containing the object shown below. Object contains text from original string.
nlp.noun("dinosaur").pluralize();
// This works
nlp.verb("speak").conjugate();
// This works
nlp.text('She sells seashells').negate()
// Same issue as above
nlp.sentence('I fed the dog').replace('the [Noun]', 'the cat')
// Same issue as above
nlp.text("Tony Hawk did a kickflip").people();
// This works
nlp.person("Tony Hawk").article();
// "a" instead of "he"
nlp.value("five hundred and sixty").number;
// This works
I’m using Chrome Version 49.0.2623.112 (64-bit) on OS X I got the same results in Node.js 5.10.1
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (9 by maintainers)
Top Results From Across the Web
SUTime custom date parsing - stanford nlp - Stack Overflow
Need to parse a sentence like "Bob was born on Jan fifteen nineteen seventy nine." and extract the date. How do I create...
Read more >SUTime - CoreNLP - Stanford NLP Group
Running SUTime in a Stanford CoreNLP Pipeline Use a tab-delimited file to specify doc dates. First column is document ID, second column is...
Read more >Date.parse() - JavaScript - MDN Web Docs
The Date.parse() method parses a string representation of a date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or...
Read more >Parser FAQ - The Stanford Natural Language Processing Group
How can the PCFG parser produce typed dependency parses? Why if I use the getBestDependencyParse() method do I get null or an untyped...
Read more >JavaScript Date parse() Method - W3Schools
parse() parses a date string and returns the time difference since January 1, 1970. parse() returns the time difference in milliseconds.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hey KahWee, yeah, this is the softest part of nlp_compromise by a long shot. That’s a great, (and brutal!) example 😉
So for sure it should remain an array of results, you can mention two independent dates per sentence, but the result format is pretty lame.
My intention with the format was to support strings like
"in june"
, without assuming a particular year, likewise for hour/second/etc information - returning a date object forces choices about which year/second it is, even when you don’t have information about it.The second thing is date intervals, like
"june 5th to 6th"
, which i originally supported but stepped-back from.The third thing is repeating dates, like
"every tuesday"
, which needs some kind of result format that respects the wonky calendar-systems, leap-years etc.So you can see how limp-wristed the date-parsing method, and result-format is in current form. What it is good at though, is identifying which part of a text is a date. Maybe date.parse() should be removed completely, or created as a plugin, or something like this. I just added a URL.parse() method with the same feel, so maybe we’re onto something.
Anybody with ideas or ambitious with this, that’d be sweet cheers!
On Chrome, i’m getting errors on:
The error is: