本文整理汇总了Java中de.tudarmstadt.ukp.dkpro.statistics.agreement.coding.CodingAnnotationStudy类的典型用法代码示例。如果您正苦于以下问题:Java CodingAnnotationStudy类的具体用法?Java CodingAnnotationStudy怎么用?Java CodingAnnotationStudy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CodingAnnotationStudy类属于de.tudarmstadt.ukp.dkpro.statistics.agreement.coding包,在下文中一共展示了CodingAnnotationStudy类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeItemAnnotationStudy
import de.tudarmstadt.ukp.dkpro.statistics.agreement.coding.CodingAnnotationStudy; //导入依赖的package包/类
protected ICodingAnnotationStudy makeItemAnnotationStudy(final
List<Dataset> datasets, boolean[] filter, final String groupFilter) {
// Count the desired number of raters.
int raterCount = 0;
for (int i = 0; i < datasets.size(); i++)
if (!filter[i])
raterCount++;
// Add annotation items.
int itemCount = datasets.get(0).countAnnotations(); // should be the same in all!
CodingAnnotationStudy result = new CodingAnnotationStudy(raterCount);
for (int itemIdx = 0; itemIdx < itemCount; itemIdx++) {
if (groupFilter != null && !datasets.get(0).getAnnotation(itemIdx).getMethod().equals(groupFilter))
continue;
Integer[] values = new Integer[raterCount];
int raterIdx = 0;
int valueIdx = 0;
for (Dataset dataset : datasets)
if (!filter[raterIdx++])
values[valueIdx++] = dataset.getAnnotationValue(itemIdx);
result.addItemAsArray(values);
}
return result;
}