public class NewEventTagger extends Object
This tagger is based entirely on a set of four classifier models,
| Modifier and Type | Method and Description |
|---|---|
void |
collectAnchorsFromDocument(Document doc,
AceDocument aceDoc,
String docPath)
collects the anchors (triggers) from an annotated document.
|
void |
eventCoref(AceDocument aceDoc,
Document doc,
SyntacticRelationSet relations)
performs coreference on the events in an Ace document.
|
void |
loadAnchorSet() |
void |
loadModels() |
static void |
main(String[] args) |
void |
tag(Document doc,
AceDocument aceDoc,
String currentDocPath,
String docId)
identify ACE events in Document 'doc' and add them to 'aceDoc'.
|
void |
tag(String fileList)
tags all the documents in
fileList with events. |
void |
train(String[] fileLists)
trains the event models on the documents in the list of file lists,
fileLists. |
void |
trainOnDocument(Document doc,
AceDocument aceDoc,
String docPath)
trains the four statistical models on an annotated document.
|
void |
trainOnFilelist(String fileList,
int pass)
trains an event tagger from a set of text and APF files.
|
public static void main(String[] args) throws IOException
IOExceptionpublic void train(String[] fileLists) throws IOException
fileLists.IOExceptionpublic void trainOnFilelist(String fileList, int pass) throws IOException
fileList - a list of text file names, one per line.
The APF file names are obtained by replacing
'sgm' by 'apf.xml'.pass - =1 to collect anchors, =2 to build classifier modelsIOExceptionpublic void collectAnchorsFromDocument(Document doc, AceDocument aceDoc, String docPath)
public void trainOnDocument(Document doc, AceDocument aceDoc, String docPath)
public void loadModels()
public void loadAnchorSet()
public void tag(String fileList) throws IOException
fileList with events.IOExceptionpublic void tag(Document doc, AceDocument aceDoc, String currentDocPath, String docId)
public void eventCoref(AceDocument aceDoc, Document doc, SyntacticRelationSet relations)
aceDoc should have a set of events each with a
single mention. The event mentions which are believed to corefer are
combined into a single event.Copyright © 2016 New York University. All rights reserved.