Package edu.stanford.nlp.trees
Class UnnamedConcreteDependency
- java.lang.Object
-
- edu.stanford.nlp.trees.UnnamedDependency
-
- edu.stanford.nlp.trees.UnnamedConcreteDependency
-
- All Implemented Interfaces:
Dependency<Label,Label,Object>,Serializable
public class UnnamedConcreteDependency extends UnnamedDependency
An individual dependency between a head and a dependent. The dependency is associated with the token indices of the lexical items.A key difference between this class and UnnamedDependency is the equals() method. Equality of two UnnamedConcreteDependency objects is defined solely with respect to the indices. The surface forms are not considered. This permits a use case in which dependencies in two different parse trees have slightly different pre-processing, possibly due to pre-processing.
- Author:
- Spence Green
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class edu.stanford.nlp.trees.UnnamedDependency
dependentText, regentText
-
-
Constructor Summary
Constructors Constructor Description UnnamedConcreteDependency(Label regent, int regentIndex, Label dependent, int dependentIndex)UnnamedConcreteDependency(Label regent, Label dependent)UnnamedConcreteDependency(String regent, int regentIndex, String dependent, int dependentIndex)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DependencyFactorydependencyFactory()Provide a factory for this kind of dependencybooleanequals(Object o)static DependencyFactoryfactory()intgetDependentIndex()intgetGovernorIndex()inthashCode()StringtoString()StringtoString(String format)Provide different printing options via a String keyword.-
Methods inherited from class edu.stanford.nlp.trees.UnnamedDependency
dependent, equalsIgnoreName, getText, governor, name
-
-
-
-
Method Detail
-
getGovernorIndex
public int getGovernorIndex()
-
getDependentIndex
public int getDependentIndex()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classUnnamedDependency
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classUnnamedDependency
-
toString
public String toString()
- Overrides:
toStringin classUnnamedDependency
-
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:
toStringin interfaceDependency<Label,Label,Object>- Overrides:
toStringin classUnnamedDependency- Parameters:
format- A format string, either "xml" or you get the default- Returns:
- A String representation of the dependency
-
dependencyFactory
public DependencyFactory dependencyFactory()
Description copied from interface:DependencyProvide a factory for this kind of dependency- Specified by:
dependencyFactoryin interfaceDependency<Label,Label,Object>- Overrides:
dependencyFactoryin classUnnamedDependency- Returns:
- A DependencyFactory
-
factory
public static DependencyFactory factory()
-
-