Lines Matching full:word
242 } Word;
245 static Word words[MAX_WORD_COUNT];
294 static Word *
297 static Word *
301 countWord(Word *word);
576 Word *word;
589 /* get a word and add it if it is longer than 1 */
593 word=findWord(name+start, wordLength);
594 if(word==NULL) {
595 word=addWord(name+start, wordLength);
597 countWord(word);
602 * if there was a word before this
607 word=findWord(name+prevStart, wordLength);
608 if(word==NULL) {
609 word=addWord(name+prevStart, wordLength);
611 countWord(word);
635 /* skip anything that is not part of a word in this sense */
647 /* a unicode character name word consists of A-Z0-9 */
670 uprv_sortArray(words, wordCount, sizeof(Word),
697 printf("tokens[0x%03x]: word%8ld \"%.*s\"\n",
718 uprv_sortArray(words+tokenCount, wordCount-tokenCount, sizeof(Word),
748 /* set token 0 to word 0 */
751 printf("tokens[0x000]: word%8ld \"%.*s\"\n",
768 printf("tokens[0x%03x]: word%8ld \"%.*s\"\n",
783 printf("tokens[0x%03x]: word%8ld \"%.*s\"\n",
890 /* write a word, as token or directly */
917 /* reverse sort by word weight */
918 return ((Word *)word2)->weight-((Word *)word1)->weight;
1240 static Word *
1253 static Word *
1256 Word *word;
1266 word=words+wordCount;
1272 word->weight=-(length+1+2);
1273 word->count=0;
1274 word->length=length;
1275 word->s=stringStart;
1279 return word;
1283 countWord(Word *word) {
1284 /* add to the weight the savings: the length of the word minus 1 byte for the token */
1285 word->weight+=word->length-1;
1286 ++word->count;