PathBasedRelatedness class
Constructors
-
PathBasedRelatedness(Germanet germanet, WordCategory category, {int max_len = -1, int max_depth = -1, List? synset_pair = null})
-
These measures use the GermaNet Graph to compute the shortest Paths between two concepts. These concepts have to
have the same word category. The path lengths are normalized in different ways (depending on the measure). The path
lengths are computed taking only the hypernymy / hyponymy relations into account
Methods
-
leacock_chodorow(Synset synset1, Synset synset2, {bool normalize = false, double normalized_max = 1.0})
→ double
-
This method implements the leackock and chodorow relatedness measure. For the path distance and depth,
node count is used.
-
normalize(double raw_value, double normalized_max, SemRelMeasure semrel_measure)
→ double
-
Normalizes a raw value of semantic relatedness to a value between a lower bound and the given upper bound.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
simple_path(Synset synset1, Synset synset2, {bool normalize = false, double normalized_max = 1.0})
→ double
-
This measure computes the pathlength and normalizes it by the longest possible shortest path between any two
nodes of the corresponding word category.
-
toString()
→ String
-
A string representation of this object.
inherited
-
wu_and_palmer(Synset synset1, Synset synset2, {bool normalize = false, double normalized_max = 1.0})
→ double
-
This methods computes the semantic relatedness by taking the path length into account, normalizing by taking
the depth of the LCS. If there are several possible LCS, the one with the largest depth is taken into account.