Lines Matching defs:weight
179 int32_t weight; /* -(cost for token) + (number of occurences) * (length-1) */
496 /* sort the words in reverse order by weight */
501 while(wordCount>0 && words[wordCount-1].weight<1) {
525 (int)i, (long)words[wordNumber].weight,
535 * get their weight reduced by their count
540 words[i].weight-=words[i].count;
543 /* sort these words in reverse order by weight */
549 while(wordCount>0 && words[wordCount-1].weight<1) {
579 (long)words[0].weight,
596 (int)i, (long)words[wordNumber].weight,
611 (int)i, (long)words[wordNumber].weight,
744 /* reverse sort by word weight */
745 return ((Word *)word2)->weight-((Word *)word1)->weight;
960 * Initialize the weight with the costs for this token:
963 word->weight=-(length+1+2);
975 /* add to the weight the savings: the length of the word minus 1 byte for the token */
976 word->weight+=word->length-1;