Thank you very much, it works!!

But what is the meaning of "field"?

Thanks a lot :)

On Fri, Jun 15, 2012 at 2:23 PM, Simon Svensson <si...@devhost.se> wrote:
>            var analyzer = new StandardAnalyzer(Version.LUCENE_29);
>            var textReader = new StringReader("hola mi nombre es Vicente");
>            var tokenStream = analyzer.TokenStream("field", textReader);
>            var terms = new List<String>();
>            var termAttribute =
> (TermAttribute)tokenStream.GetAttribute(typeof(TermAttribute));
>            while(tokenStream.IncrementToken()) {
>                terms.Add(termAttribute.Term());
>            }
>
>            // terms = { "hola", "mi", "nombre", "es", "vicente" ]
>
>
> On 2012-06-15 14:01, vicente garcia wrote:
>>
>> Hi, I have a little doubt.
>>
>> I'd like to tokenize a string. Something like this:
>>
>> StandardAnalyzer analyzer = new StandardAnalyzer("hola mi nombre es
>> Vicente");
>>
>> List<string>  tokens = analyzer.GetTokens();
>>
>> And tokens is: [hola] [mi] [nombre] [es] [Vicente]
>>
>> is this possible?
>>
>> Thanks :)
>>
>>
>



-- 
LinkedIn profile: http://www.linkedin.com/in/vicentegarcia

Twiter: http://twitter.com/clrstack

Blog: http://geeks.ms/blogs/vgarcia

Reply via email to