edu.illinois.cs.cogcomp.lbj.coref.ir.docs
Class DocACEPhase2

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.ir.docs.DocBase
      extended by edu.illinois.cs.cogcomp.lbj.coref.ir.docs.DocXMLBase
          extended by edu.illinois.cs.cogcomp.lbj.coref.ir.docs.DocACEPhase2
All Implemented Interfaces:
Doc, java.io.Serializable

public class DocACEPhase2
extends DocXMLBase

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.illinois.cs.cogcomp.lbj.coref.ir.docs.DocBase
DocBase.PosSource
 
Field Summary
private static long serialVersionUID
           
 
Fields inherited from class edu.illinois.cs.cogcomp.lbj.coref.ir.docs.DocBase
goodEnds, goodStarts, m_annotationAuthor, m_baseFN, m_bNeedsCasing, m_caser, m_dateTime, m_docID, m_docType, m_encoding, m_headline, m_slug, m_source, m_text, m_version, medEnds, totalMentions
 
Constructor Summary
DocACEPhase2()
          Default constructor: Not recommended.
DocACEPhase2(java.lang.String filename)
          Loads filename file and reads in the xml representation.
DocACEPhase2(java.lang.String filename, LBJ2.classify.Classifier caser)
           
 
Method Summary
protected  java.lang.String getBaseFilename(java.lang.String filename)
          Trim possible extension from file.
protected  Entity loadEntity(org.w3c.dom.Node nEntity)
          Loads an entity from an xml representation and returns it.
protected  Chunk processChunk(org.w3c.dom.Element element)
          Load a chunk.
protected  java.lang.String toXMLString(Chunk c)
           
protected  java.lang.String toXMLString(Entity e)
           
 void write(boolean usePredictions)
          Writes this Doc in the appropriate format.
 void write(java.lang.String filenameBase, boolean usePredictions)
          Writes this Doc in the appropriate format.
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.ir.docs.DocXMLBase
getOptAttrib, getShortEID, loadRelation, loadXML, processAttributes, processEntityMention, toXMLString, toXMLString, toXMLString
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.ir.docs.DocBase
addHeadPrediction, addPredEntities, addRelation, addTrueEntity, addTrueMention, alignPredMentsToTrue, buildMentionsContaining, buildMentionsInSents, calcAndSetQuotes, getBestMentionFor, getCExampleFor, getCoherenceInfo, getCoherenceInfo, getCorefChains, getDocID, getEntities, getEntityFor, getEntityFor, getEntityFor, getGExampleFor, getHeadPrediction, getInCorpusInverseFreq, getInDocInverseFreq, getInverseTrueHeadFreq, getInverseTrueHeadFreq, getMention, getMentions, getMentionsContainedIn, getMentionsContaining, getMentionsInSent, getMentionsInSentences, getMentionsWithExtentStartingAt, getMentionsWithHeadStartingAt, getNumMentions, getNumRelations, getNumSentences, getPlainText, getPOS, getPOS, getPredEntities, getPredMention, getPredMentions, getQuoteNestLevel, getRelation, getSentNum, getStartCharNum, getTextFirstWordNum, getTrueEntities, getTrueMention, getTrueMentionFor, getTrueMentions, getWholeDocCounts, getWord, getWordNum, getWords, hasHeadPrediction, hasPredEntities, hasPredMentions, hasTrueEntities, hasTrueMentions, initMembersDefault, isCaseSensitive, loadChunkedText, loadFromText, loadFromText, loadPOSTaggerOutput, loadPOSTags, loadSGMText, makeBestMentionMap, makeChunk, printChunkValidity, recordWordLocation, removeTagsAndExtraNL, repeat, save, setCorpusCounts, setPlainText, setPOSTags, setPredEntities, setPredictedMentions, setQuoteLevels, setSentenceNumbers, setUsePredictedEntities, setUsePredictedMentions, setWords, setWords, sortEntitiesByListOrder, sortPredictedMentions, sortTrueMentions, toAnnotatedString, toAnnotatedString, toCoherenceTableString, toCoherenceTableString, toString, toSubstituteString, translateEscaped, usePredictedEntities, usePredictedMentions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

DocACEPhase2

public DocACEPhase2(java.lang.String filename)
             throws XMLException
Loads filename file and reads in the xml representation.

Parameters:
filename - The name of the xml file to load.
Throws:
XMLException

DocACEPhase2

public DocACEPhase2(java.lang.String filename,
                    LBJ2.classify.Classifier caser)
             throws XMLException
Throws:
XMLException

DocACEPhase2

public DocACEPhase2()
Default constructor: Not recommended.

Method Detail

loadEntity

protected Entity loadEntity(org.w3c.dom.Node nEntity)
                     throws XMLException
Loads an entity from an xml representation and returns it. As a side effect, adds true mentions to the document.

Specified by:
loadEntity in class DocXMLBase
Throws:
XMLException

processChunk

protected Chunk processChunk(org.w3c.dom.Element element)
                      throws XMLException
Load a chunk.

Specified by:
processChunk in class DocXMLBase
Parameters:
element - An element containing a charseq Element.
Returns:
The desired Chunk.
Throws:
XMLException

getBaseFilename

protected java.lang.String getBaseFilename(java.lang.String filename)
Description copied from class: DocXMLBase
Trim possible extension from file.

Specified by:
getBaseFilename in class DocXMLBase

write

public void write(boolean usePredictions)
Description copied from interface: Doc
Writes this Doc in the appropriate format.

Specified by:
write in interface Doc
Specified by:
write in class DocXMLBase
Parameters:
usePredictions - Whether predicted mentions and entities should be written.

write

public void write(java.lang.String filenameBase,
                  boolean usePredictions)
Description copied from interface: Doc
Writes this Doc in the appropriate format.

Specified by:
write in interface Doc
Specified by:
write in class DocXMLBase
Parameters:
filenameBase - The name of the target file.
usePredictions - Whether predicted mentions and entities should be written.

toXMLString

protected java.lang.String toXMLString(Entity e)

toXMLString

protected java.lang.String toXMLString(Chunk c)
Specified by:
toXMLString in class DocXMLBase