|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.illinois.cs.cogcomp.lbj.coref.ir.docs.DocBase
edu.illinois.cs.cogcomp.lbj.coref.ir.docs.DocXMLBase
edu.illinois.cs.cogcomp.lbj.coref.ir.docs.DocAPF
public class DocAPF
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 | |
---|---|
DocAPF()
Basic constructor: Not recommended. |
|
DocAPF(java.lang.String filename)
Loads filename file and reads in the XML representation. |
|
DocAPF(java.lang.String filename,
LBJ2.classify.Classifier caser)
|
|
DocAPF(java.lang.String filename,
DocBase.PosSource posSource)
Loads filename file and reads in the XML representation. |
Method Summary | |
---|---|
protected java.lang.String |
getBaseFilename(java.lang.String filename)
Removes the extension (including the periods) from the filename, if it has an extension. |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
Constructor Detail |
---|
public DocAPF()
public DocAPF(java.lang.String filename) throws XMLException
filename
- The name of the file.
XMLException
public DocAPF(java.lang.String filename, DocBase.PosSource posSource) throws XMLException
filename
- The name of the file.posSource
- Where the document should get POS tags from.
If PosSource.FILE
,
attempts to make the system more exactly
reproduce the previously published results.
This requires a corpus that is preprocessed offline using
CogComp preprocessing tools available at
http://L2R.cs.uiuc.edu/~cogcomp
If PosSource.SNOW
, use a local SNoW based preprocessor
called tagger, located in PATH_POS
environment variable
(which must be exported).
This is generally slow.
Otherwise, uses the LBJ preprocesor (fastest, but performance may differ
from published results).
PosSource.FILE Loads offline preprocessing from files ending in
.sgm.strip_chunker.
PosSource.SNOW Uses an offline
XMLException
public DocAPF(java.lang.String filename, LBJ2.classify.Classifier caser) throws XMLException
XMLException
Method Detail |
---|
protected Entity loadEntity(org.w3c.dom.Node nEntity) throws XMLException
loadEntity
in class DocXMLBase
XMLException
protected Chunk processChunk(org.w3c.dom.Element element) throws XMLException
processChunk
in class DocXMLBase
element
- An element containing a charseq Element.
XMLException
public void write(boolean usePredictions)
Doc
write
in interface Doc
write
in class DocXMLBase
usePredictions
- Whether predicted mentions and entities
should be written.public void write(java.lang.String filenameBase, boolean usePredictions)
Doc
write
in interface Doc
write
in class DocXMLBase
filenameBase
- The name of the target file.usePredictions
- Whether predicted mentions and entities
should be written.protected java.lang.String getBaseFilename(java.lang.String filename)
getBaseFilename
in class DocXMLBase
filename
- The name of the file.
protected java.lang.String toXMLString(Chunk c)
toXMLString
in class DocXMLBase
protected java.lang.String toXMLString(Entity e)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |