private static ImmutableSet<CharOffsetSpan> matchJustificationsForDoc(
final Iterable<DocEventFrameReference> eventFramesMatchedInDoc,
final DocumentSystemOutput2015 docSystemOutput) {
final Optional<ImmutableBiMap<String, ResponseSet>> responseSetMap =
docSystemOutput.linking().responseSetIds();
checkState(responseSetMap.isPresent());
final ImmutableSet.Builder<CharOffsetSpan> offsetsB = ImmutableSet.builder();
for (final DocEventFrameReference docEventFrameReference : eventFramesMatchedInDoc) {
final ResponseSet rs =
checkNotNull(responseSetMap.get().get(docEventFrameReference.eventFrameID()));
final ImmutableSet<Response> responses = rs.asSet();
final ImmutableSet<CharOffsetSpan> spans = FluentIterable.from(responses)
.transformAndConcat(ResponseFunctions.predicateJustifications()).toSet();
offsetsB.addAll(spans);
}
return offsetsB.build();
}
QueryResponseFromERE.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:tac-kbp-eal
作者:
评论列表
文章目录