edu.upenn.cis.pdtb
Class RelationLoaderImpl

java.lang.Object
  extended byedu.upenn.cis.pdtb.RelationLoaderImpl
All Implemented Interfaces:
RelationLoader

public class RelationLoaderImpl
extends java.lang.Object
implements RelationLoader

Author:
nikhild, geraud

Constructor Summary
RelationLoaderImpl()
          Creates a new instance of RelationLoaderImpl
RelationLoaderImpl(boolean useStandoffPTB)
           
 
Method Summary
 PDTBRelationList loadRelations(CorpusFileIterator cfi)
          Loads a list of relations from a CorpusFileIterator
 PDTBRelationList loadRelations(java.io.Reader r, java.lang.String rawString, PTBTreeNode root)
          Loads a PDTB file given the RAW text and a tree node whose children are the parse trees for each sentence.
 PDTBRelationList loadRelations(java.lang.String textFile, java.lang.String ptbFile, java.lang.String pdtbFile)
          Loads a list of relations from a PDTB file, and its associated PTB and RAW files.
 PDTBRelationList loadRelations(java.lang.String textRoot, java.lang.String ptbRoot, java.lang.String pdtbRoot, java.lang.String secNo, java.lang.String fileNo)
          Loads the PDTB file, and its associated RAW and PTB files given the section and file numbers.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationLoaderImpl

public RelationLoaderImpl()
Creates a new instance of RelationLoaderImpl


RelationLoaderImpl

public RelationLoaderImpl(boolean useStandoffPTB)
Method Detail

loadRelations

public PDTBRelationList loadRelations(java.io.Reader r,
                                      java.lang.String rawString,
                                      PTBTreeNode root)
                               throws java.io.IOException
Description copied from interface: RelationLoader
Loads a PDTB file given the RAW text and a tree node whose children are the parse trees for each sentence. Convenience method for those who hate entity resolution imposed on them.

Specified by:
loadRelations in interface RelationLoader
Throws:
java.io.IOException

loadRelations

public PDTBRelationList loadRelations(CorpusFileIterator cfi)
                               throws java.io.IOException
Description copied from interface: RelationLoader
Loads a list of relations from a CorpusFileIterator

Specified by:
loadRelations in interface RelationLoader
Parameters:
cfi - The Corpus File Iterator object.
Throws:
java.io.IOException

loadRelations

public PDTBRelationList loadRelations(java.lang.String textFile,
                                      java.lang.String ptbFile,
                                      java.lang.String pdtbFile)
                               throws java.io.IOException
Description copied from interface: RelationLoader
Loads a list of relations from a PDTB file, and its associated PTB and RAW files.

Specified by:
loadRelations in interface RelationLoader
Parameters:
textFile - The name of the RAW file.
ptbFile - The name of the PTB file.
pdtbFile - The name of the PTB file.
Throws:
java.io.IOException

loadRelations

public PDTBRelationList loadRelations(java.lang.String textRoot,
                                      java.lang.String ptbRoot,
                                      java.lang.String pdtbRoot,
                                      java.lang.String secNo,
                                      java.lang.String fileNo)
                               throws java.io.IOException
Description copied from interface: RelationLoader
Loads the PDTB file, and its associated RAW and PTB files given the section and file numbers. Existence of the file should be ensured before invoking, otherwise an exception will be thrown.

Specified by:
loadRelations in interface RelationLoader
Parameters:
textRoot - The root dir for RAW files.
ptbRoot - The root dir for PTB files.
pdtbRoot - The root dir for PDTB files.
secNo - The section number as a string. Note that the section numbers are 00, 01, 02...09, 10, 11, ... 24
fileNo - The file number as a string. 00, 01, ...09, 10, 11, ... 99 are possible.
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)