## edu.stanford.nlp.trees
Class PennTreeReaderFactory

    java.lang.Object
      edu.stanford.nlp.trees.PennTreeReaderFactory

All Implemented Interfaces:
  TreeReaderFactory

    public class PennTreeReaderFactory

extends Object
implements TreeReaderFactory

Vends `PennTreeReader` objects.

Author:
  Roger Levy (rog@nlp.stanford.edu)

Constructor Summary
`PennTreeReaderFactory()` Default constructor; uses a `LabeledScoredTreeFactory`, with StringLabels, a `PennTreebankTokenizer`, and a `TreeNormalizer`.
`PennTreeReaderFactory(TreeFactory tf)` Specify your own `TreeFactory`; uses a `PennTreebankTokenizer`, and a `TreeNormalizer`.
`PennTreeReaderFactory(TreeFactory tf, TreeNormalizer tn)` Specify your own `TreeFactory`; uses a `PennTreebankTokenizer`, and a `TreeNormalizer`.
`PennTreeReaderFactory(TreeNormalizer tn)` Specify your own `TreeNormalizer`; uses a `PennTreebankTokenizer`, and a `LabeledScoredTreeFactory`.

Method Summary
`TreeReader` `newTreeReader(Reader in)` Create a new `TreeReader` using the provided `Reader`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PennTreeReaderFactory

    public PennTreeReaderFactory()

  Default constructor; uses a `LabeledScoredTreeFactory`, with StringLabels, a `PennTreebankTokenizer`, and a `TreeNormalizer`.

### PennTreeReaderFactory

    public PennTreeReaderFactory(TreeFactory tf)

  Specify your own `TreeFactory`; uses a `PennTreebankTokenizer`, and a `TreeNormalizer`.

  Parameters:
    `tf` - The TreeFactory to use in building Tree objects to return.

### PennTreeReaderFactory

    public PennTreeReaderFactory(TreeNormalizer tn)

  Specify your own `TreeNormalizer`; uses a `PennTreebankTokenizer`, and a `LabeledScoredTreeFactory`.

  Parameters:
    `tn` - The TreeNormalizer to use in building Tree objects to return.

### PennTreeReaderFactory

    public PennTreeReaderFactory(TreeFactory tf,
                                 TreeNormalizer tn)

  Specify your own `TreeFactory`; uses a `PennTreebankTokenizer`, and a `TreeNormalizer`.

  Parameters:
    `tf` - The TreeFactory to use in building Tree objects to return.
    `tn` - The TreeNormalizer to use

Method Detail

### newTreeReader

    public TreeReader newTreeReader(Reader in)

  Description copied from interface: `TreeReaderFactory`
  Create a new `TreeReader` using the provided `Reader`.

  Specified by:
    `newTreeReader` in interface `TreeReaderFactory`
  Parameters:
    `in` - The `Reader` to build on
  Returns:
    The new TreeReader

Stanford NLP Group