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 NamedDependency

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

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

    public class NamedDependency

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 NamedConstituent.

Author:
  Christopher Manning
See Also:
  Serialized Form

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

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

### NamedDependency

    public NamedDependency(String regent,
                           String dependent,
                           Object name)

### NamedDependency

    public NamedDependency(String regent,
                           int regentIndex,
                           String dependent,
                           int dependentIndex,
                           Object name)

### NamedDependency

    public NamedDependency(String regent,
                           int regentStartIndex,
                           int regentEndIndex,
                           String dependent,
                           int depStartIndex,
                           int depEndIndex,
                           Object name)

### NamedDependency

    public NamedDependency(Label regent,
                           Label dependent,
                           Object name)

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()

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