edu.upenn.cis.pdtb.util
Class PDTBTask

java.lang.Object
  extended byedu.upenn.cis.pdtb.util.PDTBTask

public class PDTBTask
extends java.lang.Object

Utility class for iterating over the corpus. Note that this will load the syntax, so it's not the most efficient if you only care about the PDTB. Use the RelationLoader directly to load just the PDTB and raw text.

   ....
   for(PDTBTask task = new PDTBTask(textRoot, ptbRoot, pdtbRoot);
       task.hasNext(); ){
      PDTBRelationList rlist = task.next();
      ....
  }
  

Author:
nikhild

Constructor Summary
PDTBTask(java.lang.String textRoot, java.lang.String ptbRoot, java.lang.String pdtbRoot)
          Creates a new instance of PDTBTask
PDTBTask(java.lang.String textRoot, java.lang.String ptbRoot, java.lang.String pdtbRoot, boolean useStandoffPTB)
           
 
Method Summary
 int getFileNo()
           
 java.lang.String getFileNoStr()
           
 int getSecNo()
           
 java.lang.String getSecNoStr()
           
 boolean hasNext()
           
 PDTBRelationList next()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDTBTask

public PDTBTask(java.lang.String textRoot,
                java.lang.String ptbRoot,
                java.lang.String pdtbRoot)
Creates a new instance of PDTBTask


PDTBTask

public PDTBTask(java.lang.String textRoot,
                java.lang.String ptbRoot,
                java.lang.String pdtbRoot,
                boolean useStandoffPTB)
Method Detail

hasNext

public boolean hasNext()

next

public PDTBRelationList next()
                      throws java.io.IOException
Throws:
java.io.IOException

getSecNo

public int getSecNo()

getSecNoStr

public java.lang.String getSecNoStr()

getFileNo

public int getFileNo()

getFileNoStr

public java.lang.String getFileNoStr()