Parser Generator?

Jack nospam at invalid.com
Sun Aug 19 14:21:28 EDT 2007


Thanks for the suggestion. I understand that more work is needed for natural 
language
understanding. What I want to do is actually very simple - I pre-screen the 
user
typed text. If it's a simple syntax my code understands, like, Weather in 
London, I'll
redirect it to a weather site. Or, if it's "What is ... " I'll probably 
redirect it to wikipedia.
Otherwise, I'll throw it to a search engine. So, extremelyl simple stuff ...

"samwyse" <dejanews at email.com> wrote in message 
news:xHWxi.1073$vU4.633 at nlpi068.nbdc.sbc.com...
> Jack wrote:
>> Thanks for all the replies!
>>
>> SPARK looks promising. Its doc doesn't say if it handles unicode
>> (CJK in particular) encoding though.
>>
>> Yapps also looks powerful: http://theory.stanford.edu/~amitp/yapps/
>>
>> There's also PyGgy http://lava.net/~newsham/pyggy/
>>
>> I may also give Antlr a try.
>>
>> If anyone has experiences using any of the parser generators with CJK
>> languages, I'd be very interested in hearing that.
>
> I'm going to echo Tommy's reply.  If you want to parse natural language, 
> conventional parsers are going to be worse than useless (because you'll 
> keep thinking, "Just one more tweak and this time it'll work for sure!"). 
> Instead, go look at what the interactive fiction community uses.  They 
> analyse the statement in multiple passes, first picking out the verbs, 
> then the noun phrases.  Some of their parsers can do on-the-fly 
> domain-specific spelling correction, etc, and all of them can ask the user 
> for clarification.  (I'm currently cobbling together something similar for 
> pre-teen users.) 





More information about the Python-list mailing list