QueryResponseFromERE.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:tac-kbp-eal 作者:
/**
 * Collapses DocEventFrameReferences into their PJs for the particular document at hand.
 */
public static ImmutableSetMultimap<Symbol, QueryResponse2016> response2016CollapsedJustifications(
    final Iterable<Map.Entry<Symbol, Collection<DocEventFrameReference>>> matchesByDocument,
    final SystemOutputStore2016 store, final CorpusQuery2016 query)
    throws IOException {
  final ImmutableSetMultimap.Builder<Symbol, QueryResponse2016> retB =
      ImmutableSetMultimap.builder();
  for (final Map.Entry<Symbol, Collection<DocEventFrameReference>> matchEntry : matchesByDocument) {
    final Symbol docID = matchEntry.getKey();
    final Collection<DocEventFrameReference> eventFramesMatchedInDoc =
        matchEntry.getValue();
    final DocumentSystemOutput2015 docSystemOutput = store.read(docID);
    final ImmutableSet<CharOffsetSpan> matchJustifications =
        matchJustificationsForDoc(eventFramesMatchedInDoc, docSystemOutput);

    final QueryResponse2016 queryResponse2016 =
        QueryResponse2016.builder().docID(docID).queryID(query.id())
            .addAllPredicateJustifications(matchJustifications).build();
    retB.put(docID, queryResponse2016);
  }
  return retB.build();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号