public class EventTagger extends Object
This is a corpus-trained tagger which uses a dual-pronged approach to identifying events and their arguments.
One approach is based on creating a pattern from each event mention in the training corpus. The pattern encompasses the event trigger and all of its arguments, recording the connection between the trigger and the arguments either as a sequence of chunks or as a path in a syntax graph. At decoding time, a partial match of this pattern against the input can trigger an event.
The other approach is based on a set of maximum entropy classifiers. An argument classifier decides whether a given entity mention is an argument of a trigger, and a separate role classifier decides which role this argument takes. After all potential arguments have been classified, an event classifier decides whether, based on the arguments found, an event should be triggered.
| Constructor and Description |
|---|
EventTagger() |
| Modifier and Type | Method and Description |
|---|---|
void |
acquirePatterns(Document doc,
AceDocument aceDoc,
String docId)
trains the tagger from document 'doc' and corresponding AceDocument
(APF file) aceDoc.
|
void |
evaluatePatterns(Document doc,
AceDocument aceDoc,
String docId)
applies the learned patterns to Document 'doc' and records the
number of times it produced a correct or incorrect event.
|
void |
eventCoref(AceDocument aceDoc,
Document doc,
SyntacticRelationSet relations)
performs coreference on the events in an Ace document.
|
void |
load(String fileName)
load an event pattern set in the form saved by the 'save' method.
|
void |
loadAllModels(String modelDir) |
static void |
main(String[] args)
tag a set of documents with ACE event information, using entity
and value information from an existing APF file, typically the
key.
|
void |
report(String reportFile)
write a human-readable report of all the event patterns to file
reportFile. |
void |
save(String fileName)
write out all the patterns to file 'fileName' in a form which
can be reloaded by the 'load' method.
|
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)
add event information to the APF files of the documents on
fileList. |
public void acquirePatterns(Document doc, AceDocument aceDoc, String docId)
public void evaluatePatterns(Document doc, AceDocument aceDoc, String docId)
public void tag(Document doc, AceDocument aceDoc, String currentDocPath, String docId)
public void tag(String fileList) throws IOException
fileList.IOExceptionpublic 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.public void report(String reportFile) throws IOException
reportFile.IOExceptionpublic void save(String fileName) throws IOException
IOExceptionpublic void load(String fileName) throws IOException
IOExceptionpublic void loadAllModels(String modelDir) throws IOException
IOExceptionpublic static void main(String[] args) throws IOException
IOExceptionCopyright © 2016 New York University. All rights reserved.