edu.stanford.nlp.ie.machinereading.domains.ace
Class AceReader
java.lang.Object
edu.stanford.nlp.ie.machinereading.GenericDataSetReader
edu.stanford.nlp.ie.machinereading.domains.ace.AceReader
public class AceReader
- extends GenericDataSetReader
Simple wrapper of Mihai's ACE code to ie.machinereading.structure objects
- Author:
- David McClosky
|
Method Summary |
static void |
main(java.lang.String[] args)
|
Annotation |
read(java.lang.String path)
Reads in ACE*.apf.xml files and converts them to RelationSentence objects. |
| Methods inherited from class edu.stanford.nlp.ie.machinereading.GenericDataSetReader |
assignSyntacticHead, convertToCoreLabels, findSyntacticHead, getLoggerLevel, getParser, originalFindSyntacticHead, parse, parse, parse, parseStrings, preProcessSentences, setLoggerLevel, setProcessor, setUseNewHeadFinder |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
aceVersion
public static java.lang.String aceVersion
VERBOSE
public boolean VERBOSE
AceReader
public AceReader()
- Make an AceReader.
AceReader
public AceReader(StanfordCoreNLP processor,
boolean preprocess)
AceReader
public AceReader(StanfordCoreNLP processor,
boolean preprocess,
java.lang.String version)
read
public Annotation read(java.lang.String path)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
- Reads in ACE*.apf.xml files and converts them to RelationSentence objects.
Note that you probably should call parse() instead.
Currently, this ignores document boundaries (the list returned will include
sentences from all documents).
- Overrides:
read in class GenericDataSetReader
- Parameters:
path - directory containing ACE files to read (e.g.
"/home/mcclosky/scr/data/ACE2005/english_test"). This can also be
the path to a single file. *
- Returns:
- list of RelationSentence objects
- Throws:
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
main
public static void main(java.lang.String[] args)
throws java.io.IOException
- Throws:
java.io.IOException
Stanford NLP Group