Jump to content




How does a natural language parser work?


  • You cannot reply to this topic
7 replies to this topic

#1 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 01 April 2015 - 08:29 PM

Hi guys,

for my app Aware, I have decided that it would be best if I used a natural langauge parser. How do these work? And how would I implement in in CC. It does not have to be complicated, and it is OK if it only supports correct gramar.

Tanks in advance,

Creator

PS: Aware is like Siri, but a little less advanced.

Edited by Creator, 01 April 2015 - 08:29 PM.


#2 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 01 April 2015 - 08:32 PM

You might want to have a look at NLTK. Its written in python but I've used it in the past for some things. Basically it is driven by a load of data. I mean a LOT of data. I'd have a look through some of the code, it shouldn't be too complicated to port the key bits to Lua.

#3 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 01 April 2015 - 09:16 PM

Yeah, but is there not a simplified algorithm for this, like several thuosand line, but no more. The data could be stored in github, so that should not be a problem. What I want to know is how it works.

#4 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 02 April 2015 - 07:09 AM

Read the source Luke. Its pretty well documented and it comes with an online book which guides you through everything from the basics to pretty complicated stuff. You'd be surprised how much you can learn just by reading other people's code.

#5 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 02 April 2015 - 07:36 AM

View PostSquidDev, on 02 April 2015 - 07:09 AM, said:

Read the source Luke. Its pretty well documented and it comes with an online book which guides you through everything from the basics to pretty complicated stuff. You'd be surprised how much you can learn just by reading other people's code.

Thank you, I'll do that when I get some time.

#6 The Lone Wolfling

  • Members
  • 43 posts

Posted 02 April 2015 - 12:44 PM

It may be best to offload the actual NLP part to an online NLP parser. For example.

#7 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 02 April 2015 - 12:55 PM

View PostThe Lone Wolfling, on 02 April 2015 - 12:44 PM, said:

It may be best to offload the actual NLP part to an online NLP parser. For example.

Is what you mean that the app should send the string to the online parser and then get the result online, so there is no actual parsing done by Aware?

#8 The Lone Wolfling

  • Members
  • 43 posts

Posted 02 April 2015 - 03:42 PM

Well, the online parser won't do anything beyond "tree"-ifying the sentence. You'll still have to do the rest.

Here's a simple proof-of-concept I threw together using the JSON API and the HTTP API, and the aforementioned online NLP parser:

pastebin get DvkeHmUd nlp





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users