use of org.dkpro.statistics.agreement.IAnnotationUnit in project webanno by webanno.
the class AgreementUtils method configurationSetsWithItemsToCsv.
private static void configurationSetsWithItemsToCsv(CSVPrinter aOut, AgreementResult<ICodingAnnotationStudy> aAgreement, List<ConfigurationSet> aSets) throws IOException {
List<String> headers = new ArrayList<>(asList("Type", "Collection", "Document", "Layer", "Feature", "Position"));
headers.addAll(aAgreement.getCasGroupIds());
aOut.printRecord(headers);
int i = 0;
for (ICodingAnnotationItem item : aAgreement.getStudy().getItems()) {
Position pos = aSets.get(i).getPosition();
List<String> values = new ArrayList<>();
values.add(pos.getClass().getSimpleName());
values.add(pos.getCollectionId());
values.add(pos.getDocumentId());
values.add(pos.getType());
values.add(aAgreement.getFeature());
values.add(aSets.get(i).getPosition().toMinimalString());
for (IAnnotationUnit unit : item.getUnits()) {
values.add(String.valueOf(unit.getCategory()));
}
aOut.printRecord(values);
i++;
}
}
use of org.dkpro.statistics.agreement.IAnnotationUnit in project webanno by webanno.
the class AgreementUtils method dumpAgreementConfigurationSetsWithItems.
private static void dumpAgreementConfigurationSetsWithItems(PrintStream aOut, AgreementResult<ICodingAnnotationStudy> aAgreement, List<ConfigurationSet> aSets) {
int i = 0;
for (ICodingAnnotationItem item : aAgreement.getStudy().getItems()) {
StringBuilder sb = new StringBuilder();
sb.append(aSets.get(i).getPosition());
for (IAnnotationUnit unit : item.getUnits()) {
if (sb.length() > 0) {
sb.append(" \t");
}
sb.append(unit.getCategory());
}
aOut.println(sb);
i++;
}
}
Aggregations