public void testKeywordAttribute() throws IOException {
  MockTokenizer tokenizer=whitespaceMockTokenizer("lucene is awesome");
  tokenizer.setEnableChecks(true);
  HunspellStemFilter filter=new HunspellStemFilter(tokenizer,dictionary);
  assertTokenStreamContents(filter,new String[]{"lucene","lucen","is","awesome"},new int[]{1,0,1,1});
  tokenizer=whitespaceMockTokenizer("lucene is awesome");
  CharArraySet set=new CharArraySet(Arrays.asList("Lucene"),true);
  filter=new HunspellStemFilter(new SetKeywordMarkerFilter(tokenizer,set),dictionary);
  assertTokenStreamContents(filter,new String[]{"lucene","is","awesome"},new int[]{1,1,1});
}

public void testKeywordAttribute ( ) throws IOException { MockTokenizer tokenizer = whitespaceMockTokenizer ( "lucene is awesome" ) ; tokenizer . setEnableChecks ( true ) ; HunspellStemFilter filter = new HunspellStemFilter ( tokenizer , dictionary ) ; assertTokenStreamContents ( filter , new String [ ] { "lucene" , "lucen" , "is" , "awesome" } , new int [ ] { 1 , 0 , 1 , 1 } ) ; tokenizer = whitespaceMockTokenizer ( "lucene is awesome" ) ; CharArraySet set = new CharArraySet ( Arrays . asList ( "Lucene" ) , true ) ; filter = new HunspellStemFilter ( new SetKeywordMarkerFilter ( tokenizer , set ) , dictionary ) ; assertTokenStreamContents ( filter , new String [ ] { "lucene" , "is" , "awesome" } , new int [ ] { 1 , 1 , 1 } ) ; }
simple test for keywordattribute
