public class SemanticGraphEdge extends Object implements Comparable<SemanticGraphEdge>, 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(Object o) |
IndexedWord |
getDependent() |
IndexedWord |
getGovernor() |
GrammaticalRelation |
getRelation() |
IndexedWord |
getSource() |
IndexedWord |
getTarget() |
double |
getWeight() |
int |
hashCode() |
boolean |
isExtra() |
static Comparator<SemanticGraphEdge> |
orderByTargetComparator() |
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 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 Comparator<SemanticGraphEdge> orderByTargetComparator()
public int compareTo(SemanticGraphEdge other)
compareTo
in interface Comparable<SemanticGraphEdge>
other
- Edge to compare to