Package org.apache.uima.lucas.indexer.analysis

Examples of org.apache.uima.lucas.indexer.analysis.UpperCaseFilter


    tokens.add(newToken("token2", 7, 13));
    tokens.add(newToken("token3", 14, 20));
   
    TokenStream tokenStream = new CollectionTokenStream(tokens );
   
    UpperCaseFilter upperCaseTokenFilter = new UpperCaseFilter(tokenStream);
   
    Token next = new Token();
    upperCaseTokenFilter.next(next);
   
    String nextString = new String(next.termBuffer(), 0, next.termLength());
    assertEquals("TOKEN1", nextString);

    next = upperCaseTokenFilter.next(next);   
    nextString = new String(next.termBuffer(), 0, next.termLength());
    assertEquals("TOKEN2", nextString);

    next = upperCaseTokenFilter.next(next);   
    nextString = new String(next.termBuffer(), 0, next.termLength());
    assertEquals("TOKEN3", nextString);

  }
View Full Code Here

TOP

Related Classes of org.apache.uima.lucas.indexer.analysis.UpperCaseFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.