uk.ac.essex.malexa.nlp.dp.GuiTAR
Class NeAlignment

java.lang.Object
  extended byuk.ac.essex.malexa.nlp.dp.GuiTAR.NeAlignment

public class NeAlignment
extends Object

A class that contains static methods used to align a list of nes marked-up by a chunker with a list of nes marked-up by human subjects (from a corpus).


Constructor Summary
NeAlignment()
           
 
Method Summary
static Map constructCorpusIdToParsedId(Document documentCorpus, Document documentParsed)
          Returns a neId-to-vector mapping, used to translate a given neId from the corpus to a vector of matching nes from a parsed file.
private static int[] lastMatchedWords(Element corpusNe, Element parsedNe, int lastIndexCorpus, int lastIndexParsed)
          A private method used by method constructCorpusIdToParsedId() that returns an array of three integers: 1- number of words matched, 2- index of the last word matched from the corpus ne, and 3- index of the last word matched from the parsed ne.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NeAlignment

public NeAlignment()
Method Detail

constructCorpusIdToParsedId

public static Map constructCorpusIdToParsedId(Document documentCorpus,
                                              Document documentParsed)
Returns a neId-to-vector mapping, used to translate a given neId from the corpus to a vector of matching nes from a parsed file.

Parameters:
documentCorpus - The DOM document containing the Corpus annotation
documentParsed - The DOM document containing the automatically generated annotation

lastMatchedWords

private static int[] lastMatchedWords(Element corpusNe,
                                      Element parsedNe,
                                      int lastIndexCorpus,
                                      int lastIndexParsed)
A private method used by method constructCorpusIdToParsedId() that returns an array of three integers: 1- number of words matched, 2- index of the last word matched from the corpus ne, and 3- index of the last word matched from the parsed ne.

Parameters:
corpusNe - A pointer to the DOM node holding the corpus ne to be matched
parsedNe - A pointer to the DOM node holding the parsed ne to be matched
lastIndexCorpus - previous index of the last word matched from the corpus ne
lastIndexParsed - previous index of the last word matched from the parsed ne