Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.nlp.trees
Class TreeGraphNodeFactory

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

All Implemented Interfaces:
  TreeFactory

    public class TreeGraphNodeFactory

extends Object
implements TreeFactory

A `TreeGraphNodeFactory` acts as a factory for creating nodes in a ``TreeGraph``. Unless another ``LabelFactory`` is supplied, it will use a CyclicCoreLabelFactory by default.

Author:
  Bill MacCartney

Constructor Summary
`TreeGraphNodeFactory()` Make a `TreeFactory` that produces `TreeGraphNode`s.
`TreeGraphNodeFactory(LabelFactory mlf)`

Method Summary
`Tree` | `newLeaf(Label label)` Create a new tree leaf node, with the given label.
`Tree` | `newLeaf(String word)` Create a new tree leaf node, where the label is formed from the `String` passed in.
`Tree` | `newTreeNode(Label parentLabel, List<Tree> children)` Create a new tree nonleaf node, with the given label.
`Tree` | `newTreeNode(String parent, List<Tree> children)` Create a new tree nonleaf node, where the label is formed from the `String` passed in.

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

Constructor Detail

### TreeGraphNodeFactory

    public TreeGraphNodeFactory()

  Make a `TreeFactory` that produces `TreeGraphNode`s. The labels are of class `CyclicCoreLabel`.

### TreeGraphNodeFactory

    public TreeGraphNodeFactory(LabelFactory mlf)

Method Detail

### newLeaf

    public Tree newLeaf(String word)

  Description copied from interface: `TreeFactory`
  Create a new tree leaf node, where the label is formed from the `String` passed in.

  Specified by:
    `newLeaf` in interface `TreeFactory`
  Parameters:
    `word` - The word that will go into the tree label.
  Returns:
    The new leaf

### newLeaf

    public Tree newLeaf(Label label)

  Description copied from interface: `TreeFactory`
  Create a new tree leaf node, with the given label.

  Specified by:
    `newLeaf` in interface `TreeFactory`
  Parameters:
    `label` - The label for the leaf node
  Returns:
    The new leaf

### newTreeNode

    public Tree newTreeNode(String parent,
                            List<Tree> children)

  Description copied from interface: `TreeFactory`
  Create a new tree nonleaf node, where the label is formed from the `String` passed in.

  Specified by:
    `newTreeNode` in interface `TreeFactory`
  Parameters:
    `parent` - The string that will go into the parent tree label.
    `children` - The list of daughters of this tree. The children may be a (possibly empty) `List` of children or `null`
  Returns:
    The new interior tree node

### newTreeNode

    public Tree newTreeNode(Label parentLabel,
                            List<Tree> children)

  Description copied from interface: `TreeFactory`
  Create a new tree nonleaf node, with the given label.

  Specified by:
    `newTreeNode` in interface `TreeFactory`
  Parameters:
    `parentLabel` - The label for the parent tree node.
    `children` - The list of daughters of this tree. The children may be a (possibly empty) `List` of children or `null`
  Returns:
    The new interior tree node

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Stanford NLP Group