Lines Matching full:weight
238 int32_t weight; /* -(cost for token) + (number of occurences) * (length-1) */
668 /* sort the words in reverse order by weight */
674 while(wordCount>0 && words[wordCount-1].weight<1) {
698 (int)i, (long)words[wordNumber].weight,
708 * get their weight reduced by their count
713 words[i].weight-=words[i].count;
716 /* sort these words in reverse order by weight */
722 while(wordCount>0 && words[wordCount-1].weight<1) {
752 (long)words[0].weight,
769 (int)i, (long)words[wordNumber].weight,
784 (int)i, (long)words[wordNumber].weight,
917 /* reverse sort by word weight */
918 return ((Word *)word2)->weight-((Word *)word1)->weight;
1269 * Initialize the weight with the costs for this token:
1272 word->weight=-(length+1+2);
1284 /* add to the weight the savings: the length of the word minus 1 byte for the token */
1285 word->weight+=word->length-1;