ADPOSSampleStream stream = new ADPOSSampleStream(
new PlainTextByLineStream(new ResourceAsStreamFactory(
ADParagraphStreamTest.class, "/opennlp/tools/formats/ad.sample"),
"UTF-8"), true, false);
POSSample sample = stream.read();
assertEquals(27, sample.getSentence().length);
assertEquals("Inicia", sample.getSentence()[0]);
assertEquals("v-fin", sample.getTags()[0]);
assertEquals("em", sample.getSentence()[1]);
assertEquals("prp", sample.getTags()[1]);
assertEquals("o", sample.getSentence()[2]);
assertEquals("art", sample.getTags()[2]);
assertEquals("Porto", sample.getSentence()[9]);
assertEquals("B-prop", sample.getTags()[9]);
assertEquals("Poesia", sample.getSentence()[10]);
assertEquals("I-prop", sample.getTags()[10]);
}