public class CollinsDependency extends java.lang.Object implements Dependency<CoreLabel,CoreLabel,java.lang.String>
Constructor and Description |
---|
CollinsDependency(CoreLabel modifier,
CoreLabel head,
CollinsRelation rel)
Modifier must have IndexAnnotation.
|
Modifier and Type | Method and Description |
---|---|
DependencyFactory |
dependencyFactory()
Provide a factory for this kind of dependency
|
CoreLabel |
dependent()
Describes the dependent (argument/modifier) of
the dependency relation.
|
boolean |
equals(java.lang.Object other) |
boolean |
equalsIgnoreName(java.lang.Object o)
Are two dependencies equal if you ignore the dependency name.
|
static java.util.Set<CollinsDependency> |
extractFromTree(Tree t,
java.lang.String startSymbol,
HeadFinder hf) |
static java.util.Set<CollinsDependency> |
extractNormalizedFromTree(Tree t,
java.lang.String startSymbol,
HeadFinder hf) |
CollinsRelation |
getRelation() |
CoreLabel |
governor()
Describes the governor (regent/head) of the dependency relation.
|
int |
hashCode() |
java.lang.String |
name()
Names the type of dependency (subject, instrument, ...).
|
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String format)
Provide different printing options via a String keyword.
|
public CollinsDependency(CoreLabel modifier, CoreLabel head, CollinsRelation rel)
modifier
- head
- rel
- public CollinsRelation getRelation()
public DependencyFactory dependencyFactory()
Dependency
dependencyFactory
in interface Dependency<CoreLabel,CoreLabel,java.lang.String>
public CoreLabel dependent()
Dependency
dependent
in interface Dependency<CoreLabel,CoreLabel,java.lang.String>
public CoreLabel governor()
Dependency
governor
in interface Dependency<CoreLabel,CoreLabel,java.lang.String>
public boolean equalsIgnoreName(java.lang.Object o)
Dependency
equalsIgnoreName
in interface Dependency<CoreLabel,CoreLabel,java.lang.String>
o
- The thing to compare against ignoring namepublic java.lang.String name()
Dependency
name
in interface Dependency<CoreLabel,CoreLabel,java.lang.String>
public java.lang.String toString(java.lang.String format)
Dependency
toString
in interface Dependency<CoreLabel,CoreLabel,java.lang.String>
format
- A format string, either "xml" or you get the defaultpublic static java.util.Set<CollinsDependency> extractFromTree(Tree t, java.lang.String startSymbol, HeadFinder hf)
public static java.util.Set<CollinsDependency> extractNormalizedFromTree(Tree t, java.lang.String startSymbol, HeadFinder hf)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object