public Chunk newChunk ( String phrase , Span < Term > span ) { String newId = idManager . getNextId ( AnnotationType . CHUNK ) ; Chunk newChunk = new Chunk ( newId , span ) ; newChunk . setPhrase ( phrase ) ; annotationContainer . add ( newChunk , Layer . CHUNKS , AnnotationType . CHUNK ) ; return newChunk ; }
Creates a new chunk . It assigns an appropriate ID to it . The Chunk is added to the document object .