edu.stanford.nlp.ie.machinereading.domains.ace
Class AceReader

java.lang.Object
  extended by edu.stanford.nlp.ie.machinereading.GenericDataSetReader
      extended by 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
static java.lang.String aceVersion
           
 boolean VERBOSE
           
 
Fields inherited from class edu.stanford.nlp.ie.machinereading.GenericDataSetReader
calculateHeadSpan, forceGenerationOfIndexSpans, headFinder, logger, parserProcessor, preProcessSentences, processor, useNewHeadFinder
 
Constructor Summary
AceReader()
          Make an AceReader.
AceReader(StanfordCoreNLP processor, boolean preprocess)
           
AceReader(StanfordCoreNLP processor, boolean preprocess, java.lang.String version)
           
 
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
 

Field Detail

aceVersion

public static java.lang.String aceVersion

VERBOSE

public boolean VERBOSE
Constructor Detail

AceReader

public AceReader()
Make an AceReader.


AceReader

public AceReader(StanfordCoreNLP processor,
                 boolean preprocess)

AceReader

public AceReader(StanfordCoreNLP processor,
                 boolean preprocess,
                 java.lang.String version)
Method Detail

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