template class xf::data_analytics::text::TwoGramPredicate¶
#include "two_gram_predicate.hpp"
Overview¶
TwoGramPredicate the 2-Gram Predicate is a search of the inverted index with a term of 2 characters.
Parameters:
AXI_DT | AXI data type |
CH | the channel of merge tree |
BL | the burst length |
template < typename AXI_DT, int CH = 64, int BL = 512 > class TwoGramPredicate
Methods¶
init¶
void init ( int docSize, int fieldSize, double idfValue [TN], uint64_t tfAddr [TN] )
init the parameter initial function
Parameters:
docSize | the document size |
fieldSize | all field’s string length |
idfValue | the idfValue buffer that stores idf value |
tfAddr | the tfAddr buffer that stores tf address |
search¶
void search ( uint8_t* field, uint32_t* offset, AXI_DT* tfValue, AXI_DT* tfValue2, AXI_DT* tfValue3, AXI_DT* tfValue4, uint32_t* indexId )
search Find the matching id in the inverted index.
Parameters:
field | One column field |
offset | The offset address of field |
tfValue | The first pointer of term frequency values in memory |
tfValue | The second pointer of term frequency values in memory |
the | index id of return |