[antlr-interest] A "lexicon" for ANTLR

Matt Benson gudnabrsam at yahoo.com
Wed Jan 29 06:44:06 PST 2003


Disclaimer:
  I have an extremely limited understanding of Antlr
myself, and haunt this list in an attempt to slowly
absorb related knowledge by constant bombardment.  
Also I am really looking forward to Ter's notes from
the class he's about to teach, but ANYWAY...

It occurs to me that it might be possible to write
your grammar almost as you present it here, with only
a few "sample" nouns/verbs/other parts of speech, then
modify the generated parser code to go match against a
database or something instead.  The experts will have
to say whether this approach is at all sensible.

Also, there is a Java natural-language processing
project called Grok on Sourceforge.  Again, I know
very little about it, but it might be worth checking
out as well.

-Matt

--- "ttsoris <ttsoris at yahoo.com>" <ttsoris at yahoo.com>
wrote:
> Hi,
> I was wondering if it is possible to create a parser
> with ANTLR 
> to parse simple english sentences. The problem that
> I am thinking of
> is the amount of recognized words. If I create rules
> like:
> NOUN_SIN : "ant" | "cat" | "mouse" .... ;
> NOUN_PLU : "ants" | "cats" | "mice" .... ;
> with thousands of alternatives for nouns and some
> more for verbs and 
> other parts of speech, it will produce enormous
> source files
> and an enormous executable (and probably completely
> inefficient).
> Is there a way of specifing an external "lexicon"
> for the lexemes 
> (words), that is more efficient? Or is there another
> way I haven't 
> think of?
> 
> Thank you,
> Theofilos
> 
> 
>  
> 
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/ 
> 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list