edu.upenn.cis.ptb
Class PTBLoaderImpl

java.lang.Object
  extended byedu.upenn.cis.ptb.PTBLoaderImpl
All Implemented Interfaces:
PTBLoader

public class PTBLoaderImpl
extends java.lang.Object
implements PTBLoader

Loader with returns instances of PTBTreeNodeImpl with label PTBLabelImpl. The Lex and Yacc specs do the grunt work.

Author:
nikhild

Constructor Summary
PTBLoaderImpl()
          Creates a new instance of PTBLoaderImpl
 
Method Summary
 PTBTreeNode load(java.io.Reader reader)
          Load from reader which will be closed after reading.
 PTBTreeNode load(java.lang.String ptbFileName)
          Load the file with the given fileName.
 PTBTreeNode load(java.lang.String ptbRoot, java.lang.String secNo, java.lang.String fileNo)
          Load the file ptbRoot/ + secNo + /wsj_ + secNo + fileNo + .mrg.
static void main(java.lang.String[] args)
           
static void printTreeNode(PTBTreeNode node, int indent, int indentIncr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PTBLoaderImpl

public PTBLoaderImpl()
Creates a new instance of PTBLoaderImpl

Method Detail

load

public PTBTreeNode load(java.lang.String ptbFileName)
                 throws java.io.IOException
Description copied from interface: PTBLoader
Load the file with the given fileName.

Specified by:
load in interface PTBLoader
Throws:
java.io.IOException

load

public PTBTreeNode load(java.io.Reader reader)
                 throws java.io.IOException
Description copied from interface: PTBLoader
Load from reader which will be closed after reading.

Specified by:
load in interface PTBLoader
Throws:
java.io.IOException

load

public PTBTreeNode load(java.lang.String ptbRoot,
                        java.lang.String secNo,
                        java.lang.String fileNo)
                 throws java.io.IOException
Description copied from interface: PTBLoader
Load the file ptbRoot/ + secNo + /wsj_ + secNo + fileNo + .mrg.

Specified by:
load in interface PTBLoader
Throws:
java.io.IOException

printTreeNode

public static void printTreeNode(PTBTreeNode node,
                                 int indent,
                                 int indentIncr)

main

public static void main(java.lang.String[] args)
Parameters:
args - the command line arguments