Hi,
I have the method below:
public final TokenStream tokenStream(String fieldName, Reader reader)
{
TokenStream result = new LowerCaseTokenizer(reader);
result = new StopFilter(true, result, stopWords, true);
result = new PorterStemFilter(result);
return result;
}
Using PorterStemFilter and removing the stopwords, but how can I use
TokenStream in release 3.0 (print the result this method).
I tried to use:
public static void main(String[] args) throws IOException,
ParseException
{
StringReader sr = new StringReader("The man is very good. He talked
about many thigs");
PorterStemAnalyzer ps = new PorterStemAnalyzer();
TokenStream tokenstream = ps.tokenStream(null, sr);
//Tokenizer token = (Tokenizer) ps.tokenStream(null, sr);
while(tokenstream.incrementToken())
{
????????
}
}
Thanks.
---------------------------------------------------------------------
Mário André
Instituto Federal de Educação, Ciência e Tecnologia de Sergipe - IFS
Mestrando em MCC - Universidade Federal de Alagoas - UFAL
http://www.marioandre.com.br/
Skype: mario-fa
----------------------------------------------------------------------------
----------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]