edu.stanford.nlp.trees
Class UnnamedDependency

java.lang.Object
  extended by edu.stanford.nlp.trees.UnnamedDependency
All Implemented Interfaces:
Dependency, Serializable

public class UnnamedDependency
extends Object
implements Dependency

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 equalIgnoringName(Object o)
          Are two dependencies equal if you ignore the dependency name.
 boolean equals(Object o)
           
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

equalIgnoringName

public boolean equalIgnoringName(Object o)
Description copied from interface: Dependency
Are two dependencies equal if you ignore the dependency name.

Specified by:
equalIgnoringName in interface Dependency

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

governor

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

Specified by:
governor in interface 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

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

dependencyFactory

public DependencyFactory dependencyFactory()
Description copied from interface: Dependency
Provide a factory for this kind of dependency

Specified by:
dependencyFactory in interface Dependency

factory

public static DependencyFactory factory()


Stanford NLP Group