Lines Matching refs:candidate

154                         const std::string& candidate,  in testsug()  argument
162 if (wlst[k] == candidate) { in testsug()
167 if ((cwrd) && checkword(candidate, cpdsuggest, timer, timelimit)) { in testsug()
168 wlst.push_back(candidate); in testsug()
315 std::string candidate; in capchars_utf() local
316 u16_u8(candidate, candidate_utf); in capchars_utf()
317 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in capchars_utf()
324 std::string candidate(word); in capchars() local
325 mkallcap(candidate, csconv); in capchars()
326 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in capchars()
333 std::string candidate; in mapchars() local
347 return map_related(word, candidate, 0, wlst, cpdsuggest, in mapchars()
352 std::string& candidate, in map_related() argument
362 if (wlst[m] == candidate) { in map_related()
367 if ((cwrd) && checkword(candidate, cpdsuggest, timer, timelimit)) { in map_related()
369 wlst.push_back(candidate); in map_related()
380 size_t cn = candidate.size(); in map_related()
382 candidate.resize(cn); in map_related()
383 candidate.append(maptable[j][l]); in map_related()
384 map_related(word, candidate, wn + len, wlst, in map_related()
393 candidate.push_back(*(word + wn)); in map_related()
394 map_related(word, candidate, wn + 1, wlst, cpdsuggest, in map_related()
405 std::string candidate; in replchars() local
424 candidate.assign(word); in replchars()
425 candidate.resize(r - word); in replchars()
426 candidate.append(reptable[i].outstrings[type]); in replchars()
427 candidate.append(r + reptable[i].pattern.size()); in replchars()
428 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in replchars()
430 size_t sp = candidate.find(' '); in replchars()
434 std::string prev_chunk = candidate.substr(prev, sp - prev); in replchars()
437 std::string post_chunk = candidate.substr(sp + 1); in replchars()
440 wlst[wlst.size() - 1] = candidate; in replchars()
444 sp = candidate.find(' ', prev); in replchars()
466 std::string candidate(word, word + i - 1); in doubletwochars() local
467 candidate.insert(candidate.end(), word + i + 1, word + wl); in doubletwochars()
468 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in doubletwochars()
493 std::string candidate; in doubletwochars_utf() local
494 u16_u8(candidate, candidate_utf); in doubletwochars_utf()
495 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in doubletwochars_utf()
510 std::string candidate(word); in badcharkey() local
514 for (size_t i = 0; i < candidate.size(); ++i) { in badcharkey()
515 char tmpc = candidate[i]; in badcharkey()
517 candidate[i] = csconv[((unsigned char)tmpc)].cupper; in badcharkey()
518 if (tmpc != candidate[i]) { in badcharkey()
519 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in badcharkey()
520 candidate[i] = tmpc; in badcharkey()
528 candidate[i] = *(loc - 1); in badcharkey()
529 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in badcharkey()
532 candidate[i] = *(loc + 1); in badcharkey()
533 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in badcharkey()
537 candidate[i] = tmpc; in badcharkey()
548 std::string candidate; in badcharkey_utf() local
557 u16_u8(candidate, candidate_utf); in badcharkey_utf()
558 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in badcharkey_utf()
570 u16_u8(candidate, candidate_utf); in badcharkey_utf()
571 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in badcharkey_utf()
575 u16_u8(candidate, candidate_utf); in badcharkey_utf()
576 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in badcharkey_utf()
589 std::string candidate(word); in badchar() local
595 …for (std::string::reverse_iterator aI = candidate.rbegin(), aEnd = candidate.rend(); aI != aEnd; +… in badchar()
600 testsug(wlst, candidate, cpdsuggest, &timer, &timelimit); in badchar()
615 std::string candidate; in badchar_utf() local
626 u16_u8(candidate, candidate_utf); in badchar_utf()
627 testsug(wlst, candidate, cpdsuggest, &timer, &timelimit); in badchar_utf()
649 std::string candidate; in extrachar_utf() local
650 u16_u8(candidate, candidate_utf); in extrachar_utf()
651 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in extrachar_utf()
661 std::string candidate(word); in extrachar() local
662 if (candidate.size() < 2) in extrachar()
665 for (size_t i = 0; i < candidate.size(); ++i) { in extrachar()
666 size_t index = candidate.size() - 1 - i; in extrachar()
667 char tmpc = candidate[index]; in extrachar()
668 candidate.erase(candidate.begin() + index); in extrachar()
669 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in extrachar()
670 candidate.insert(candidate.begin() + index, tmpc); in extrachar()
679 std::string candidate(word); in forgotchar() local
686 for (size_t i = 0; i <= candidate.size(); ++i) { in forgotchar()
687 size_t index = candidate.size() - i; in forgotchar()
688 candidate.insert(candidate.begin() + index, ctry[k]); in forgotchar()
689 testsug(wlst, candidate, cpdsuggest, &timer, &timelimit); in forgotchar()
692 candidate.erase(candidate.begin() + index); in forgotchar()
713 std::string candidate; in forgotchar_utf() local
714 u16_u8(candidate, candidate_utf); in forgotchar_utf()
715 testsug(wlst, candidate, cpdsuggest, &timer, &timelimit); in forgotchar_utf()
739 char* candidate = (char*)malloc(wl + 2); in twowords() local
740 strcpy(candidate + 1, word); in twowords()
744 for (char* p = candidate + 1; p[1] != '\0'; p++) { in twowords()
754 int c1 = checkword(candidate, cpdsuggest, NULL, NULL); in twowords()
764 (((p > candidate + 1) && (p[-1] == p[-2])) || (p[-1] == p[2]))) || in twowords()
771 if (wlst[k] == candidate) { in twowords()
778 wlst.push_back(candidate); in twowords()
781 free(candidate); in twowords()
788 mystrlen(p + 1) > 1 && mystrlen(candidate) - mystrlen(p) > 1) { in twowords()
791 if (wlst[k] == candidate) { in twowords()
798 wlst.push_back(candidate); in twowords()
801 free(candidate); in twowords()
808 free(candidate); in twowords()
816 std::string candidate(word); in swapchar() local
817 if (candidate.size() < 2) in swapchar()
821 for (size_t i = 0; i < candidate.size() - 1; ++i) { in swapchar()
822 std::swap(candidate[i], candidate[i+1]); in swapchar()
823 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in swapchar()
824 std::swap(candidate[i], candidate[i+1]); in swapchar()
829 if (candidate.size() == 4 || candidate.size() == 5) { in swapchar()
830 candidate[0] = word[1]; in swapchar()
831 candidate[1] = word[0]; in swapchar()
832 candidate[2] = word[2]; in swapchar()
833 candidate[candidate.size() - 2] = word[candidate.size() - 1]; in swapchar()
834 candidate[candidate.size() - 1] = word[candidate.size() - 2]; in swapchar()
835 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in swapchar()
836 if (candidate.size() == 5) { in swapchar()
837 candidate[0] = word[0]; in swapchar()
838 candidate[1] = word[2]; in swapchar()
839 candidate[2] = word[1]; in swapchar()
840 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in swapchar()
856 std::string candidate; in swapchar_utf() local
860 u16_u8(candidate, candidate_utf); in swapchar_utf()
861 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in swapchar_utf()
873 u16_u8(candidate, candidate_utf); in swapchar_utf()
874 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in swapchar_utf()
879 u16_u8(candidate, candidate_utf); in swapchar_utf()
880 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in swapchar_utf()
890 std::string candidate(word); in longswapchar() local
892 for (std::string::iterator p = candidate.begin(); p < candidate.end(); ++p) { in longswapchar()
893 for (std::string::iterator q = candidate.begin(); q < candidate.end(); ++q) { in longswapchar()
896 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in longswapchar()
915 std::string candidate; in longswapchar_utf() local
916 u16_u8(candidate, candidate_utf); in longswapchar_utf()
917 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in longswapchar_utf()
929 std::string candidate(word); in movechar() local
930 if (candidate.size() < 2) in movechar()
934 for (std::string::iterator p = candidate.begin(); p < candidate.end(); ++p) { in movechar()
935 for (std::string::iterator q = p + 1; q < candidate.end() && std::distance(p, q) < 10; ++q) { in movechar()
939 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in movechar()
941 std::copy(word, word + candidate.size(), candidate.begin()); in movechar()
944 …for (std::string::reverse_iterator p = candidate.rbegin(), pEnd = candidate.rend() - 1; p != pEnd;… in movechar()
945 …for (std::string::reverse_iterator q = p + 1, qEnd = candidate.rend(); q != qEnd && std::distance(… in movechar()
949 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in movechar()
951 std::copy(word, word + candidate.size(), candidate.begin()); in movechar()
972 std::string candidate; in movechar_utf() local
973 u16_u8(candidate, candidate_utf); in movechar_utf()
974 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in movechar_utf()
984 std::string candidate; in movechar_utf() local
985 u16_u8(candidate, candidate_utf); in movechar_utf()
986 testsug(wlst, candidate, cpdsuggest, NULL, NULL); in movechar_utf()
1049 std::string candidate; in ngsuggest() local
1055 u16_u8(candidate, w_candidate); in ngsuggest()
1057 candidate.assign(word); in ngsuggest()
1059 mkallcap(candidate, csconv); in ngsuggest()
1061 target = phonet(candidate, *ph); // XXX phonet() is 8-bit (nc, not n) in ngsuggest()
1139 u16_u8(candidate, w_candidate); in ngsuggest()
1141 candidate = HENTRY_WORD(hp); in ngsuggest()
1142 mkallcap(candidate, csconv); in ngsuggest()
1144 f = phonet(candidate, *ph); in ngsuggest()