WeightingHits method ranks the words by their occurrence.
( wordID int, rank *Rank, )
| 42 | |
| 43 | // WeightingHits method ranks the words by their occurrence. |
| 44 | func (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 |
no outgoing calls