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
Interface Dependency<G extends Label,D extends Label,N>

All Superinterfaces:
  Serializable

All Known Implementing Classes:
  NamedDependency, UnnamedDependency

    public interface Dependency<G extends Label,D extends Label,N>

extends Serializable

An individual dependency between a governor and a dependent. The governor 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 or MapLabel. Dependencies support an object naming the dependency type. This may be null. Dependencies have factories.

Author:
  Christopher Manning

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

Method Detail

### governor

    G governor()

  Describes the governor (regent/head) of the dependency relation.

  Returns:
    The governor of this dependency

### dependent

    D dependent()

  Describes the dependent (argument/modifier) of the dependency relation.

  Returns:
    the dependent of this dependency

### name

    N name()

  Names the type of dependency (subject, instrument, ...). This might be a String in the simplest case, but can provide for arbitrary object types.

  Returns:
    the name for this dependency type

### equalsIgnoreName

    boolean equalsIgnoreName(Object o)

  Are two dependencies equal if you ignore the dependency name.

  Parameters:
    `o` - The thing to compare against ignoring name
  Returns:
    true iff the head and dependent are the same.

### toString

    String toString(String format)

  Provide different printing options via a String keyword. The main recognized option currently is "xml". Otherwise the default toString() is used.

  Parameters:
    `format` - A format string, either "xml" or you get the default
  Returns:
    A String representation of the dependency

### dependencyFactory

    DependencyFactory dependencyFactory()

  Provide a factory for this kind of dependency

  Returns:
    A DependencyFactory

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