Jet.Refres
Class CorefCompare

java.lang.Object
  extended byJet.Refres.CorefCompare

public class CorefCompare
extends java.lang.Object

static methods to compare entity annotations (coreference) in two documents or collections.
These methods add 'status' attribute to entities in the response Document(s) which can then be used by entityView.


Constructor Summary
CorefCompare()
           
 
Method Summary
static void compareCollections(DocumentCollection response, DocumentCollection key)
          compare the entity annotations (coreference) in all documents in Document Collections 'response' and 'key', updating the documents in DocumentCollection 'response'.
static void compareDocuments(Document response, Document key)
          compare the entity annotations (coreference) in Documents 'response' and 'key', updating Document 'response'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorefCompare

public CorefCompare()
Method Detail

compareDocuments

public static void compareDocuments(Document response,
                                    Document key)
compare the entity annotations (coreference) in Documents 'response' and 'key', updating Document 'response'. The two Documents should be different annotations of the same text.

Two mentions are considered the same if their spans (or the spans of their heads, if they have headC attributes) are the same. Two entities are considered the same if they have the same set of mentions ("mentions" attribute).

There are three cases:

In addition, if there are any differences between the entities in the two documents, the annotation 'entitiesDiffer' is added to Document 'response'.


compareCollections

public static void compareCollections(DocumentCollection response,
                                      DocumentCollection key)
compare the entity annotations (coreference) in all documents in Document Collections 'response' and 'key', updating the documents in DocumentCollection 'response'. The two collections should be the same size and have Documents which are different annotations of the same text.