getChunkWithIndex method

ChunkWithIndex getChunkWithIndex(
  1. List<SentenceIndex> span,
  2. String text
)

Implementation

ChunkWithIndex getChunkWithIndex(List<SentenceIndex> span, String text) {
  int start = span.elementAt(0).getStart();
  int end = span.last.getEnd();

  return ChunkWithIndex(start: span.first.getStart(), text: text.substring(start, end));
}