Algorithm interface and its methods make possible the polimorf usage of weighting process.
| 7 | // Algorithm interface and its methods make possible the polimorf usage of |
| 8 | // weighting process. |
| 9 | type Algorithm interface { |
| 10 | WeightingRelation( |
| 11 | word1ID int, |
| 12 | word2ID int, |
| 13 | rank *Rank, |
| 14 | ) float32 |
| 15 | |
| 16 | WeightingHits( |
| 17 | wordID int, |
| 18 | rank *Rank, |
| 19 | ) float32 |
| 20 | } |
| 21 | |
| 22 | // AlgorithmDefault struct is the basic implementation of Algorithm. It can |
| 23 | // weight a word or phrase by comparing them. |
no outgoing calls
no test coverage detected