public class LabeledBinaryExtractionReader extends Object
LabeledBinaryExtraction objects from a plain
text source. The format of the source should be (for each extraction): - Line
1: Source sentence tokens - Line 2: Source POS tags - Line 3: Source NP Chunk
tags - Line 4: Argument1 tokens - Line 5: Argument1 range start and length -
Line 6: Relation tokens - Line 7: Relation range start and length - Line 8:
Argument2 tokens - Line 9: Argument 2 range start and length - Line 10: label
(either 0 or 1)
For example: Bush was US President . NNP VBD NNP NNP . B-NP O B-NP I-NP O
Bush 0 1 was 1 1 US President 2 2 1
This gets loaded into a LabeledBinaryExtraction object
representing (Bush, was, US President) with a positive label (=0).| Constructor and Description |
|---|
LabeledBinaryExtractionReader(InputStream in)
Constructs a new reader from the given input stream.
|
public LabeledBinaryExtractionReader(InputStream in) throws IOException
in - IOException - if unable to read the sourcepublic Iterable<LabeledBinaryExtraction> readExtractions() throws IOException
Iterable object containing the labeled
extractionsIOExceptionCopyright © 2010-2013 University of Washington CSE. All Rights Reserved.