use of org.dkpro.tc.api.type.TextClassificationTarget in project dkpro-tc by dkpro.
the class TestFoldUtil method countNumberOfTextClassificationUnitsPerCas.
private List<Integer> countNumberOfTextClassificationUnitsPerCas(List<File> writtenBins) throws Exception {
List<Integer> arrayList = new ArrayList<Integer>();
for (File f : writtenBins) {
JCas jcas = JCasFactory.createJCas();
CollectionReader createReader = createReader(jcas, f);
createReader.getNext(jcas.getCas());
Collection<TextClassificationTarget> units = JCasUtil.select(jcas, TextClassificationTarget.class);
arrayList.add(units.size());
}
return arrayList;
}
Aggregations