Re: token type question

2005-04-22 Thread Paul Libbrecht
Le 22 avr. 05, à 09:36, Pierrick Brihaye a écrit : Are you say that I should construct Token in analyzer like new Token ("chem_H2O", 100, 103, "chem"); note that chem_ is added prefix to H2O, and 100 to 103 is length of H2O rather than chem_H2O? Well... 100 to 103 are offsets provided by the reade

Re: token type question

2005-04-22 Thread Pierrick Brihaye
Hi, [EMAIL PROTECTED] a écrit : Thanks Pierrick. Are you say that I should construct Token in analyzer like new Token ("chem_H2O", 100, 103, "chem"); note that chem_ is added prefix to H2O, and 100 to 103 is length of H2O rather than chem_H2O? Well... 100 to 103 are offsets provided by the reader (

Re: token type question

2005-04-21 Thread ethandev
Thanks Pierrick. Are you say that I should construct Token in analyzer like new Token ("chem_H2O", 100, 103, "chem"); note that chem_ is added prefix to H2O, and 100 to 103 is length of H2O rather than chem_H2O? I also have some further problem and not sure if can be solved by this approch. I

Re: token type question

2005-04-16 Thread Paul Libbrecht
Le 16 avr. 05, à 08:31, Pierrick Brihaye a écrit : How do I search all the tokens with "chem" type token, such as H2O, O2, etc? Any sample like this? If this approach doesn't work, what's the best approach? Nifty question... I'm working on indexing text with math formulae... there may be similar

Re: token type question

2005-04-15 Thread Pierrick Brihaye
[EMAIL PROTECTED] a écrit : I am working on a program to index/search chemical element/compound. Say I write an analyzer to filter out chemical terms, such as H2O. I noticed that I can specify a tocken's type. Can I construct a token as new Token ("H2", start, end, "chem"); My questions is How do

token type question

2005-04-15 Thread ethandev
Hi, I am working on a program to index/search chemical element/compound. Say I write an analyzer to filter out chemical terms, such as H2O. I noticed that I can specify a tocken's type. Can I construct a token as new Token ("H2", start, end, "chem"); My questions is How do I search all the to