示例#1
0
 private List<String> filter(TokenFilter filter) throws IOException {
   List<String> tas = new ArrayList<>();
   CharTermAttribute termAtt = filter.getAttribute(CharTermAttribute.class);
   filter.reset();
   while (filter.incrementToken()) {
     tas.add(termAtt.toString());
   }
   filter.end();
   filter.close();
   return tas;
 }
示例#2
0
 @Override
 public void close() throws IOException {
   super.close();
   if (VERBOSE) System.out.println(input.getClass().getSimpleName() + ".close()");
 }
示例#3
0
 public void close() throws IOException {
   super.close();
   tokenQueue.clear();
 }