edu.upenn.cis.ptb.standoff
Class MakeStandoff
java.lang.Object
edu.upenn.cis.ptb.standoff.MakeStandoff
- public class MakeStandoff
- extends java.lang.Object
Script to create a standoff version of the PTB.
- Author:
- nikhild
|
Field Summary |
static java.util.logging.Logger |
log
|
|
Method Summary |
static int |
advanceByString(java.lang.String orig,
int start,
java.lang.String advanceBy)
|
static int |
advanceOverWhitespace(java.lang.String orig,
int start)
|
static PTBTreeNode |
alignToText(PTBTreeNode node,
java.lang.String rawText,
int currentIndex)
|
static void |
main(java.lang.String[] args)
Main method. |
static PTBTreeNode |
makeStandoff(PTBTreeNode root,
java.lang.String rawText,
java.lang.String secNo,
java.lang.String fileNo)
|
static void |
makeStandoff(java.lang.String ptbRoot,
java.lang.String rawRoot,
java.lang.String outputRoot,
java.lang.String logFile)
Creates a standoff version of the PTB. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static final java.util.logging.Logger log
MakeStandoff
public MakeStandoff()
makeStandoff
public static void makeStandoff(java.lang.String ptbRoot,
java.lang.String rawRoot,
java.lang.String outputRoot,
java.lang.String logFile)
throws java.io.IOException
- Creates a standoff version of the PTB. Parameters are as follows:
- Parameters:
ptbRoot - The root dir of the .mrg filesrawRoot - The root dir of the raw filesoutputRoot - The directory in which the standoff version is writtenlogFile - Logs the results. Grep the log file for "Fail" to see the files for which
conversion failed. It should fail for 8 files.
- Throws:
java.io.IOException - If there is a read or write failure. Conversion failures will be written to the logFile.
makeStandoff
public static PTBTreeNode makeStandoff(PTBTreeNode root,
java.lang.String rawText,
java.lang.String secNo,
java.lang.String fileNo)
alignToText
public static PTBTreeNode alignToText(PTBTreeNode node,
java.lang.String rawText,
int currentIndex)
advanceByString
public static int advanceByString(java.lang.String orig,
int start,
java.lang.String advanceBy)
advanceOverWhitespace
public static int advanceOverWhitespace(java.lang.String orig,
int start)
main
public static void main(java.lang.String[] args)
- Main method. Usage:
java edu.upenn.cis.ptb.standoff.MakeStandoff