edu.washington.cs.knowitall.extractor.conf
Class LabeledBinaryExtractionReader

java.lang.Object
  extended by edu.washington.cs.knowitall.extractor.conf.LabeledBinaryExtractionReader

public class LabeledBinaryExtractionReader
extends java.lang.Object

Used for reading 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).

Author:
afader

Constructor Summary
LabeledBinaryExtractionReader(java.io.InputStream in)
          Constructs a new reader from the given input stream.
 
Method Summary
 java.lang.Iterable<LabeledBinaryExtraction> readExtractions()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabeledBinaryExtractionReader

public LabeledBinaryExtractionReader(java.io.InputStream in)
                              throws java.io.IOException
Constructs a new reader from the given input stream.

Parameters:
in -
Throws:
java.io.IOException - if unable to read the source
Method Detail

readExtractions

public java.lang.Iterable<LabeledBinaryExtraction> readExtractions()
                                                            throws java.io.IOException
Returns:
an Iterable object containing the labeled extractions
Throws:
java.io.IOException