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
-
-
Field Summary
-
Fields inherited from class edu.stanford.nlp.ie.machinereading.GenericDataSetReader
calculateHeadSpan, forceGenerationOfIndexSpans, headFinder, logger, parserProcessor, preProcessSentences, processor, useNewHeadFinder
-
-
Constructor Summary
Constructors Constructor Description AceReader()Make an AceReader.AceReader(StanfordCoreNLP processor, boolean preprocess)AceReader(StanfordCoreNLP processor, boolean preprocess, String version)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)Annotationread(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
-
-
-
-
Constructor Detail
-
AceReader
public AceReader()
Make an AceReader.
-
AceReader
public AceReader(StanfordCoreNLP processor, boolean preprocess)
-
AceReader
public AceReader(StanfordCoreNLP processor, boolean preprocess, String version)
-
-
Method Detail
-
read
public Annotation read(String path) throws IOException, SAXException, 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:
readin classGenericDataSetReader- 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:
IOExceptionSAXExceptionParserConfigurationException
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-