[antlr-interest] how to use my own lexer?
Li Li
fancyerii at gmail.com
Fri Dec 23 02:36:30 PST 2011
Hello Christian,
I am writing a search query rewriter.
e.g. input: sony mp3 -> brand:sony product:mp3
the user query is "sony mp3", then I will rewrite it to "brand:sony
product:mp3" which means I need search product mp3 and product's brand is
sony.
The example is English, and I need parse Chinese.
The tokenizer for Chinese is harder than English because there is no
seperator between words in Chinese. in Chinese, it looks like "sonymp3" and
I need use Chinese Segmentor to split it to "sony mp3".
As far as I know, lexer/scanner will product tokens for parser.
I think lexer should only have one method to implement, that may be Token
next();
On Fri, Dec 23, 2011 at 6:04 PM, Christian <chwchw at gmx.de> wrote:
> Hello Li,
>
> great to hear that you want to use ANTLR! However, for now, I do not
> know whether it is the right choice because you do not say in detail
> what you want to do. Furthermore, you will probably not get information
> about how to define a specific interface. But if you have that
> interface, the community would be happy to help you in *using* ANTLR to
> *implement* your interface. You will admit that a forum about kitchen
> utensils is the wrong place to discuss recipes, won't you?
>
> Regards,
> Christian
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
More information about the antlr-interest
mailing list