The Homepage of

(Explanation) (Definition) (Examples) (Download) (Links)

[2001-04-15] The current NLQ version is 0.1 - Beware!

Explanation is a quick and dirty (with an emphasis on both) python module that attempts to parse an incoming "Natural Language" query, like "How many keywords does Python have?" and "Why do I get this rash when I pet my cat?" I needed something like this for a project that I was working on and this is what I came up with in the course of an evening. is implemented as a Python class (class NLQ). For every NLQ you have, you declare an NLQ object and give it the string. The object takes the string, chops it up and attempts classify it and extract the relevant pieces. This is all gone over more in the class definition. is pre-pre-pre-alpha. I have no AI experience. I have no relevant language experience. The design of this may change at any time. The woman that you think is your mother is really a being from another planet placed there to raise you until you're old enough to have your True Purpose revealed to you. Pro wrestling is real.


The module

...contains a handful of definitions.

...and one function - determine_type. D_t is used by the NLQ objects to assess the string and fit it into one of the pigeon-hole types defined above. Absurdly simplistic right now...

Class NLQ...



abg@stegosaurus ~/src/nlq $ ./ "Who is the greatest baseball player?"
type: 1
keywords: ['greatest', 'baseball', 'player']
abg@stegosaurus ~/src/nlq $ ./ "Why should I file my taxes?"
type: 3
keywords: ['should', 'file', 'taxes']
abg@stegosaurus ~/src/nlq $ ./ "Should I dye my hair pink?"
type: 0
keywords: ['dye', 'hair', 'pink']


There are only about a zillion AI/NL links out there. These are only a few. For more than you can shake a stick at, try searching for "natural language query" on google or yahoo.

Computer Stuff

Index - Personal - Bleat - Computer - Links
Adam - Linnea - About