Exemplo n.º 1
0
 private void verify(List<String> tokens, boolean[] isHashtag) {
   for (int i = 0; i < tokens.size(); i++) {
     assertTrue(stream.incrementToken());
     assertEquals(tokens.get(i), termAttr.getTermString());
     assertEquals(isHashtag[i], TokenType.HASHTAG.equals(typeAttr.getType()));
   }
   assertFalse(stream.incrementToken());
 }
Exemplo n.º 2
0
 private void verify(List<String> tokens, TokenType... types) {
   for (int i = 0; i < tokens.size(); i++) {
     assertTrue(stream.incrementToken());
     assertEquals(tokens.get(i), termAttr.getTermString());
     assertEquals(types[i], typeAttr.getType());
   }
   assertFalse(stream.incrementToken());
 }