public final CorpusQueryAssessments filterForAssessment(final Set<QueryAssessment2016> assessment2016) {
final ImmutableSet.Builder<QueryResponse2016> matchingQueriesB = ImmutableSet.builder();
for (final QueryResponse2016 queryResponse2016 : assessments().keySet()) {
if (assessment2016.contains(assessments().get(queryResponse2016))) {
matchingQueriesB.add(queryResponse2016);
}
}
final ImmutableSet<QueryResponse2016> matchingQueries = matchingQueriesB.build();
final CorpusQueryAssessments.Builder ret = CorpusQueryAssessments.builder();
ret.queryReponses(matchingQueries);
ret.putAllQueryResponsesToSystemIDs(
Multimaps.filterKeys(queryResponsesToSystemIDs(), in(matchingQueries)));
ret.putAllMetadata(Maps.filterKeys(metadata(), in(matchingQueries)));
ret.putAllAssessments(Maps.filterKeys(assessments(), in(matchingQueries)));
return ret.build();
}
_CorpusQueryAssessments.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:tac-kbp-eal
作者:
评论列表
文章目录