The Weight class for BM25. More...
Public Member Functions | |
| WeightBM25 (ElementList< Word > *wordList, DocumentList *documentList) | |
| Initialise the class with the word and document statistics. | |
| WeightBM25 (void) | |
| Create an uninitialised class. | |
| void | assignLists (ElementList< Word > *wordList, DocumentList *documentList) |
| Provide the class with a new set of word and document statistics. | |
| virtual void | documentWeightValue (T *triple, Word *word) |
| Compute the document weight, given the triple and word. | |
| void | termWeightValue (T *triple, Word *word) |
| Compute the term weight of the triple. | |
| void | assignTermWeightCW (Word *word) |
| Compute the simple term weight and assign it to word. | |
| void | assignRelevanceTermWeight (Word *word, int inRel, int totalRel) |
| Compute the term weight given relevance feedback information. | |
| void | noWeightValue (T *triple) |
| Store the triple values, without weighting. | |
| void | noWeightValue (float frequency, int position) |
| Store the given values without weighting (used if we have no triple). | |
| void | assignTermWeight (Word *word) |
| Compute the term weight and assign it to word. | |
| bool | operator< (WeightBM25 &triple) |
| Compare frequencies of WeightBM25 classes. | |
| void | operator*= (float mult) |
| Multiply frequency by mult. | |
| void | operator= (WeightBM25< T > &element) |
| Assign the values from element to this object. | |
| int | position (void) |
| Return the position value. | |
| float | value (void) |
| Return the value value. | |
| int | index (void) |
| Return the index value. | |
Protected Member Functions | |
| float | documentTermWeight (T *triple) |
| Compute the document weight for the given triple. | |
Protected Attributes | |
| ElementList< Word > * | _wordList |
| The precomputed wordList containing word statistics. | |
| DocumentList * | _documentList |
| The precomputed documentList containing document statistics. | |
| float | _frequency |
| The weighted frequency. | |
| int | _position |
| The triple position. | |
| int | _index |
| The triple index. | |
The Weight class for BM25.
This class defines the operations needed to perform BM25 weighting when computing document scores for a given query.
1.6.1