Live data from Hacker News

Knwl.js – A JavaScript NLP

loadfive.com

1–10 of 38 posts

Re: Knwl.js – A JavaScript NLP

#4
This could be a little more robust... Miss a dot and you get weird places like "if". Relative times don't get extracted.

Something like: "Hi Frank,

I've looked up the OIDs in the Cisco manual. Let's meet for lunch at burger king tomorrow at noon.

S" yields only "Cisco" - as a place. Well.

I know parsing natural language is hard. So keep up the good work and keep on tweaking :-)

Re: Knwl.js – A JavaScript NLP

#5
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 :-)

Re: Knwl.js – A JavaScript NLP

#6
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

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 therefore completely crazy to rely on NLP to interpret "6/7/12" which might mean 7th June or 6th July. If you're going to capture it you need to ask the user, so you need both.

Re: Knwl.js – A JavaScript NLP

#8
post #6
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

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 written explicitly. Later I realised I could deduce it from my birthdate.

Re: Knwl.js – A JavaScript NLP

#9

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"], ["by"], ["off"], ["under"], ["amid"], ["concerning"], ["on"], ["underneath"], ["among"], ["down"], ["on", "account", "of"], ["until"], ["around"], ["during"], ["onto"], ["up"], ["at"], ["except"], ["out"], ["upon"], ["atop"], ["for"], ["out", "of"], ["with"], ["because", "of"], ["from"], ["outside"], ["within"], ["before"], ["in"], ["over"], ["without"], ["behind"], ["inside"], ["past"], ["away", "from"] ];

Post reply on HN