MCPcopy Create free account
hub / github.com/DavidBelicza/TextRank / WeightingHits

Method WeightingHits

rank/algorithm.go:44–51  ·  view source on GitHub ↗

WeightingHits method ranks the words by their occurrence.

(
	wordID int,
	rank *Rank,
)

Source from the content-addressed store, hash-verified

42
43// WeightingHits method ranks the words by their occurrence.
44func (a *AlgorithmDefault) WeightingHits(
45 wordID int,
46 rank *Rank,
47) float32 {
48 weight := rank.Words[wordID].Qty
49
50 return float32(weight)
51}
52
53// AlgorithmChain struct is the combined implementation of Algorithm. It is a
54// good example how weighting can be changed by a different implementations. It

Callers 1

TestWeightingHitsFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestWeightingHitsFunction · 0.76