public class ACEReader extends AnnotationReader<TextAnnotation>
Modifier and Type | Field and Description |
---|---|
static String |
EntityClassAttribute |
static String |
EntityHeadEndCharOffset |
static String |
EntityHeadStartCharOffset |
static String |
EntityIDAttribute |
static String |
EntityMentionIDAttribute |
static String |
EntityMentionLDCTypeAttribute |
static String |
EntityMentionTypeAttribute |
static String |
EntitySubtypeAttribute |
static String |
EntityTypeAttribute |
static String |
RelationIDAttribute |
static String |
RelationMentionIDAttribute |
static String |
RelationMentionLexicalConditionAttribute |
static String |
RelationModalityAttribute |
static String |
RelationSubtypeAttribute |
static String |
RelationTenseAttribute |
static String |
RelationTypeAttribute |
corpusName, currentAnnotationId, resourceManager
Constructor and Description |
---|
ACEReader(String aceCorpusHome,
boolean is2004mode)
Constructor for the ACE Data-set Reader
|
ACEReader(String aceCorpusHome,
String[] sections,
boolean is2004mode)
Constructor for the ACE Data-set Reader
|
Modifier and Type | Method and Description |
---|---|
String |
generateReport()
TODO: generate a human-readable report of annotations read from the source file (plus whatever
other relevant statistics the user should know about).
|
boolean |
hasNext()
Returns
true if the iteration has more elements. |
protected void |
initializeReader()
called by constructor to perform subclass-specific initialization.
|
boolean |
Is2004Mode() |
TextAnnotation |
next()
return the next annotation object.
|
void |
reset()
override this to conform to whatever the derived class's state mechanism requires.
|
iterator, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
forEachRemaining
public static final String EntityIDAttribute
public static final String EntityTypeAttribute
public static final String EntitySubtypeAttribute
public static final String EntityClassAttribute
public static final String EntityMentionIDAttribute
public static final String EntityMentionTypeAttribute
public static final String EntityMentionLDCTypeAttribute
public static final String EntityHeadStartCharOffset
public static final String EntityHeadEndCharOffset
public static final String RelationIDAttribute
public static final String RelationTypeAttribute
public static final String RelationSubtypeAttribute
public static final String RelationModalityAttribute
public static final String RelationTenseAttribute
public static final String RelationMentionIDAttribute
public static final String RelationMentionLexicalConditionAttribute
public ACEReader(String aceCorpusHome, String[] sections, boolean is2004mode) throws Exception
aceCorpusHome
- Path of the data. eg. `data/ace2004/data/English`sections
- List of sections to parse. eg. `new String[] { "nw", "bn" }` Pass `null` to
parse all available sections.is2004mode
- Boolean representing if the data-set is the ACE-2004.Exception
- Exception thrown in-case of major failure.public ACEReader(String aceCorpusHome, boolean is2004mode) throws Exception
aceCorpusHome
- Path of the data. eg. `data/ace2004/data/English`is2004mode
- Boolean representing if the data-set is the ACE-2004.Exception
- Exception thrown in-case of major failure.public boolean Is2004Mode()
protected void initializeReader()
AnnotationReader
initializeReader
in class AnnotationReader<TextAnnotation>
public TextAnnotation next()
next
in interface Iterator<TextAnnotation>
next
in class AnnotationReader<TextAnnotation>
public void reset()
AnnotationReader
reset
in interface IResetableIterator<TextAnnotation>
reset
in class AnnotationReader<TextAnnotation>
public boolean hasNext()
true
if the iteration has more elements. (In other words, returns
true
if next()
would return an element rather than throwing an exception.)hasNext
in interface Iterator<TextAnnotation>
hasNext
in class AnnotationReader<TextAnnotation>
true
if the iteration has more elementspublic String generateReport()
generateReport
in class AnnotationReader<TextAnnotation>
Copyright © 2017. All rights reserved.