Knwl.js – A JavaScript NLP
loadfive.com
loadfive.com
I have hundreds of digital documents that need to be sorted and archived. I am able to extract a document's text via OCR, but now have to find a way to sort/file them based off certain keywords present within the document (date, time, place, etc).
I think Knwl.js will be a perfect fit for this. So far I have only spent a couple of minutes looking through the demo and GitHub repository, but it looks like with this library I will be able to write an extension that can help detect restaurants and stores I frequently visit (which will further help me sort all those pesky paper receipts).
I will definitely start playing around with Knwl.js once I get home. Good job!
http://www.quora.com/Why-are-rule-based-methods-becoming-unp...
NLP. You keep using that word. I do not think it means what you think it means.
Nice library!
Parses 13/4/2012 as:
year: 2012
month: 13
day: 4
People really need to start using yyyy/mm/dd :-)
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.
I was filling in a web form using Google Translate. It took me several phone calls and about two weeks to sort out the problems caused when Translate back-converted some (but not all) of the dates that I'd entered into the form from DD.MM.YYYY to MM.DD.YYYY before submitting.
/self rage
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.
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.
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 :-)
There are mess ups around sanity checks, but looking at their source it's actually trivial to fix. Forking it, I hope they accept community pull requests.
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"] ];