public class SemanticGraphEdge extends java.lang.Object implements java.lang.Comparable<SemanticGraphEdge>, java.io.Serializable
SemanticGraph
,
Serialized FormModifier and Type | Field and Description |
---|---|
static boolean |
printOnlyRelation |
Constructor and Description |
---|
SemanticGraphEdge(IndexedWord source,
IndexedWord target,
GrammaticalRelation relation,
double weight,
boolean isExtra) |
SemanticGraphEdge(SemanticGraphEdge e) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SemanticGraphEdge other)
Compares SemanticGraphEdges.
|
boolean |
equals(java.lang.Object o) |
IndexedWord |
getDependent() |
IndexedWord |
getGovernor() |
GrammaticalRelation |
getRelation() |
IndexedWord |
getSource() |
IndexedWord |
getTarget() |
double |
getWeight() |
int |
hashCode() |
boolean |
isExtra() |
static java.util.Comparator<SemanticGraphEdge> |
orderByTargetComparator() |
java.lang.String |
toString() |
boolean |
typeEquals(SemanticGraphEdge e) |
public SemanticGraphEdge(IndexedWord source, IndexedWord target, GrammaticalRelation relation, double weight, boolean isExtra)
source
- The source IndexedWord for this edgetarget
- The target IndexedWord for this edgerelation
- The relation between the two words represented by this edgeweight
- A score or weight to attach to the edge (not often used)isExtra
- Whether or not the dependency this edge represents was "extra"public SemanticGraphEdge(SemanticGraphEdge e)
public java.lang.String toString()
toString
in class java.lang.Object
public GrammaticalRelation getRelation()
public IndexedWord getSource()
public IndexedWord getGovernor()
public IndexedWord getTarget()
public IndexedWord getDependent()
public double getWeight()
public boolean isExtra()
public boolean typeEquals(SemanticGraphEdge e)
public static java.util.Comparator<SemanticGraphEdge> orderByTargetComparator()
public int compareTo(SemanticGraphEdge other)
compareTo
in interface java.lang.Comparable<SemanticGraphEdge>
other
- Edge to compare topublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object