Home | History | Annotate | Download | only in i18n

Lines Matching defs:confidence

34 // UTF-16 confidence calculation. Very simple minded, but better than nothing.
35 // Any 8 bit non-control characters bump the confidence up. These have a zero high byte,
40 static int32_t adjustConfidence(UChar codeUnit, int32_t confidence) {
42 confidence -= 10;
44 confidence += 10;
46 if (confidence < 0) {
47 confidence = 0;
48 } else if (confidence > 100) {
49 confidence = 100;
51 return confidence;
58 int32_t confidence = 10;
65 confidence = 100;
68 confidence = adjustConfidence(codeUnit, confidence);
69 if (confidence == 0 || confidence == 100) {
73 if (bytesToCheck < 4 && confidence < 100) {
74 confidence = 0;
76 results->set(textIn, this, confidence);
77 return (confidence > 0);
93 int32_t confidence = 10;
100 confidence = 100; // UTF-16 BOM
102 confidence = 0; // UTF-32 BOM
106 confidence = adjustConfidence(codeUnit, confidence);
107 if (confidence == 0 || confidence == 100) {
111 if (bytesToCheck < 4 && confidence < 100) {
112 confidence = 0;
114 results->set(textIn, this, confidence);
115 return (confidence > 0);
130 int32_t confidence = 0;
147 // Cook up some sort of confidence score, based on presense of a BOM
150 confidence = 100;
152 confidence = 80;
154 confidence = 100;
156 confidence = 80;
159 confidence = 25;
162 results->set(textIn, this, confidence);
163 return (confidence > 0);