Java Reference
In-Depth Information
System.out.print("ClusterId: " + corefChain.getChainID());
CorefMention mention =
corefChain.getRepresentativeMention();
System.out.println(" CorefMention: " + mention
+ " Span: [" + mention.mentionSpan + "]");
List<CorefMention> mentionList =
corefChain.getMentionsInTextualOrder();
Iterator<CorefMention> mentionIterator =
mentionList.iterator();
while(mentionIterator.hasNext()) {
CorefMention cfm = mentionIterator.next();
System.out.println("\tMention: " + cfm
+ " Span: [" + mention.mentionSpan + "]");
System.out.print("\tMention Mention Type: "
+ cfm.mentionType + " Gender: " + cfm.gender);
System.out.println(" Start: " + cfm.startIndex
+ " End: " + cfm.endIndex);
}
System.out.println();
The output is as follows. Only the first and last mentions are displayed to conserve space:
CorefChain: CHAIN1-["He" in sentence 1, "his" in sentence 1]
ClusterId: 1 CorefMention: "He" in sentence 1 Span: [He]
Mention: "He" in sentence 1 Span: [He]
Mention Type: PRONOMINAL Gender: MALE Start: 1 End: 2
Mention: "his" in sentence 1 Span: [He]
Mention Type: PRONOMINAL Gender: MALE Start: 3 End: 4
CorefChain: CHAIN8-["their lunch" in sentence 1]
ClusterId: 8 CorefMention: "their lunch" in sentence 1
Span: [their lunch]
Mention: "their lunch" in sentence 1 Span: [their lunch]
Mention Type: NOMINAL Gender: UNKNOWN Start: 14 End: 16
Search WWH ::




Custom Search