public void annotateGroup(int group, Map<String, String> attributes) {
   int groupStart = start(group);
   if (groupStart >= 0) {
     int groupEnd = end(group);
     ChunkAnnotationUtils.annotateChunks(elements, groupStart, groupEnd, attributes);
   }
 }
 public SequenceMatchResult<T> apply(SequenceMatchResult<T> matchResult, int... groups) {
   for (int group : groups) {
     int groupStart = matchResult.start(group);
     if (groupStart >= 0) {
       int groupEnd = matchResult.end(group);
       ChunkAnnotationUtils.annotateChunks(
           matchResult.elements(), groupStart, groupEnd, attributes);
     }
   }
   return matchResult;
 }