## edu.stanford.nlp.trees
Class UnnamedDependency

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

All Implemented Interfaces:
  Dependency<Label,Label,Object>, Serializable

    public class UnnamedDependency

extends Object
implements Dependency<Label,Label,Object>

An individual dependency between a head and a dependent. The head and dependent are represented as a Label. For example, these can be a Word or a WordTag. If one wishes the dependencies to preserve positions in a sentence, then each can be a LabeledConstituent.

Author:
  Christopher Manning
See Also:
  Serialized Form

Constructor Summary
`UnnamedDependency(Label regent, Label dependent)`
`UnnamedDependency(String regent, int regentStartIndex, int regentEndIndex, String dependent, int depStartIndex, int depEndIndex)`
`UnnamedDependency(String regent, int regentIndex, String dependent, int dependentIndex)`
`UnnamedDependency(String regent, String dependent)`

Method Summary
`DependencyFactory` `dependencyFactory()` Provide a factory for this kind of dependency
`Label` `dependent()` Describes the dependent (argument/modifier) of the dependency relation.
`boolean` `equals(Object o)`
`boolean` `equalsIgnoreName(Object o)` Are two dependencies equal if you ignore the dependency name.
`static DependencyFactory` `factory()`
`Label` `governor()` Describes the governor (regent/head) of the dependency relation.
`int` `hashCode()`
`Object` `name()` Names the type of dependency (subject, instrument, ...).
`String` `toString()`
`String` `toString(String format)` Provide different printing options via a String keyword.

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

Constructor Detail

### UnnamedDependency

    public UnnamedDependency(String regent,
                             String dependent)

### UnnamedDependency

    public UnnamedDependency(String regent,
                             int regentIndex,
                             String dependent,
                             int dependentIndex)

### UnnamedDependency

    public UnnamedDependency(String regent,
                             int regentStartIndex,
                             int regentEndIndex,
                             String dependent,
                             int depStartIndex,
                             int depEndIndex)

### UnnamedDependency

    public UnnamedDependency(Label regent,
                             Label dependent)

Method Detail

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### equalsIgnoreName

    public boolean equalsIgnoreName(Object o)

  Description copied from interface: `Dependency`
  Are two dependencies equal if you ignore the dependency name.

  Specified by:
    `equalsIgnoreName` in interface `Dependency<Label,Label,Object>`
  Parameters:
    `o` - The thing to compare against ignoring name
  Returns:
    true iff the head and dependent are the same.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### toString

    public String toString(String format)

  Provide different printing options via a String keyword. The recognized options are currently "xml", and "predicate". Otherwise the default toString() is used.

  Specified by:
    `toString` in interface `Dependency<Label,Label,Object>`
  Parameters:
    `format` - A format string, either "xml" or you get the default
  Returns:
    A String representation of the dependency

### governor

    public Label governor()

  Description copied from interface: `Dependency`
  Describes the governor (regent/head) of the dependency relation.

  Specified by:
    `governor` in interface `Dependency<Label,Label,Object>`
  Returns:
    The governor of this dependency

### dependent

    public Label dependent()

  Description copied from interface: `Dependency`
  Describes the dependent (argument/modifier) of the dependency relation.

  Specified by:
    `dependent` in interface `Dependency<Label,Label,Object>`
  Returns:
    the dependent of this dependency

### name

    public Object name()

  Description copied from interface: `Dependency`
  Names the type of dependency (subject, instrument, ...). This might be a String in the simplest case, but can provide for arbitrary object types.

  Specified by:
    `name` in interface `Dependency<Label,Label,Object>`
  Returns:
    the name for this dependency type

### dependencyFactory

    public DependencyFactory dependencyFactory()

  Description copied from interface: `Dependency`
  Provide a factory for this kind of dependency

  Specified by:
    `dependencyFactory` in interface `Dependency<Label,Label,Object>`
  Returns:
    A DependencyFactory

### factory

    public static DependencyFactory factory()

Stanford NLP Group