Java Reference
In-Depth Information
<CharacterOffsetEnd>3</CharacterOffsetEnd>
<POS>DT</POS>
</token>
<token id="2">
<word>voyage</word>
<CharacterOffsetBegin>4</CharacterOffsetBegin>
<CharacterOffsetEnd>10</CharacterOffsetEnd>
<POS>NN</POS>
</token>
<token id="17">
<word>.</word>
<CharacterOffsetBegin>83</CharacterOffsetBegin>
<CharacterOffsetEnd>84</CharacterOffsetEnd>
<POS>.</POS>
</token>
</tokens>
</sentence>
</sentences>
</document>
</root>
The prettyPrint method works in a similar manner:
pipeline.prettyPrint(document, System.out);
However, the output is not really that pretty, as shown here. The original sentence is dis-
played followed by each word, its position, and its tag. The output has been formatted to
make it more readable:
The voyage of the Abraham Lincoln was for a long time
marked by no special incident.
[Text=The CharacterOffsetBegin=0 CharacterOffsetEnd=3
PartOfSpeech=DT]
[Text=voyage CharacterOffsetBegin=4 CharacterOffsetEnd=10
PartOfSpeech=NN]
[Text=of CharacterOffsetBegin=11 CharacterOffsetEnd=13
PartOfSpeech=IN]
[Text=the CharacterOffsetBegin=14 CharacterOffsetEnd=17
Search WWH ::




Custom Search