Live data from Hacker News

Knwl.js – A JavaScript NLP

loadfive.com

11–20 of 38 posts

Re: Knwl.js – A JavaScript NLP

#11

Can someone explain to me how that demo matches "Chicago"? From the source provided, I don't see how that is possible.

https://github.com/loadfive/Knwl.js/blob/master/experimental... knwl.english.prepositionalPhrases = [ ["about"], ["below"], ["in", "spite", "of"], ["regarding"], ["above"], ["beneath"], ["instead", "of"], ["since"], ["according", "to"], ["beside"], ["into"], ["through"], ["across"], ["between"], ["like"], ["throughout"], ["after"], ["beyond"], ["near"], ["to"], ["against"], ["but"], ["of"], ["toward"], ["along"], ["b…

[deleted]

Re: Knwl.js – A JavaScript NLP

#14
post #2

This is going to look like "oh typical HN shooting things down", but: Parses 13/4/2012 as: year: 2012 month: 13 day: 4

Yeah seems obvious, but I don't think it really makes sense to guess that it's a UK format date based on whether one of the numbers is bigger than 12. 4/5/2012 could be 4th May or 5th April and it would be impossible to tell programmatically. People really need to start using yyyy/mm/dd :-)

dd/mm/yyyy and yyyy/mm/dd are as valid as each other, since it proceeds in either increasing or decreasing unit size. Having dates as mm/dd/yyyy makes about as much logical sense as writing: 10492 as 49210.

Re: Knwl.js – A JavaScript NLP

#15
post #6

Earlier quoted context omitted.

Not at all, it's a valid bug that's indicitaive of a deeper problem, presenting uncertain and locale-specific conclusions as being certain. Even if you do language and locale-sniffing using n-grams you still have a certainty problem. In the UK we traditionally use DD/MM/YY format, although since "9/11" the papers have started slipping into MM/DD format, and younger people have followed suit somewhat. In the UK it's t…

With that being said, it still needs to do sanity check. Is it a valid date? if not, will it be if we change the format? Nobody really knows what you mean when you write a data as xx/xx/xx. It has to be assumed from context. I've even have border control ask me about the expiration date of my passport since they couldn't figure out if it was day-month or month-day. I couldn't tell them either, because it wasn't writt…

Not to be overly inflamattory, but whoever designed that passport (an inherently international object) without taking into account international date format deserves to be fired. Then re-hired. Then fired again.

Re: Knwl.js – A JavaScript NLP

#18
post #14

Earlier quoted context omitted.

Yeah seems obvious, but I don't think it really makes sense to guess that it's a UK format date based on whether one of the numbers is bigger than 12. 4/5/2012 could be 4th May or 5th April and it would be impossible to tell programmatically. People really need to start using yyyy/mm/dd :-)

dd/mm/yyyy and yyyy/mm/dd are as valid as each other, since it proceeds in either increasing or decreasing unit size. Having dates as mm/dd/yyyy makes about as much logical sense as writing: 10492 as 49210.

It doesn't make sense mathematically because it isn't a mathematical notation, it's linguistic in nature.

In Europe, '4th May' is shortened to 4/5.

In the US, 'May 4th' is shortened to 5/4.

Neither is right, wrong or illogical.

I'm from the UK, but have spent a lot of time working with US based clients/colleagues. They only way I've found to avoid confusion and ambiguity is to use YYYY/MM/DD.

Post reply on HN