public CharsetMatch match(CharsetDetector det) { String name = det.fC1Bytes ? "windows-1252" : "ISO-8859-1"; int bestConfidenceSoFar = -1; String lang = null; for (NGramsPlusLang ngl : ngrams_8859_1) { int confidence = match(det, ngl.fNGrams, byteMap); if (confidence > bestConfidenceSoFar) { bestConfidenceSoFar = confidence; lang = ngl.fLang; } } return bestConfidenceSoFar <= 0 ? null : new CharsetMatch(det, this, bestConfidenceSoFar, name, lang); }
public CharsetMatch match(CharsetDetector det) { String name = det.fC1Bytes ? "windows-1252" : "ISO-8859-1"; int bestConfidenceSoFar = -1; String lang = null; for (NGramsPlusLang ngl : ngrams_8859_1) { int confidence = match(det, ngl.fNGrams, byteMap); if (confidence > bestConfidenceSoFar) { bestConfidenceSoFar = confidence; lang = ngl.fLang; } } return bestConfidenceSoFar <= 0 ? null : new CharsetMatch(det, this, bestConfidenceSoFar, name, lang); }
public CharsetMatch match(CharsetDetector det) { String name = det.fC1Bytes ? "windows-1252" : "ISO-8859-1"; int bestConfidenceSoFar = -1; String lang = null; for (NGramsPlusLang ngl : ngrams_8859_1) { int confidence = match(det, ngl.fNGrams, byteMap); if (confidence > bestConfidenceSoFar) { bestConfidenceSoFar = confidence; lang = ngl.fLang; } } return bestConfidenceSoFar <= 0 ? null : new CharsetMatch(det, this, bestConfidenceSoFar, name, lang); }
public CharsetMatch match(CharsetDetector det) { String name = det.fC1Bytes ? "windows-1252" : "ISO-8859-1"; int bestConfidenceSoFar = -1; String lang = null; for (NGramsPlusLang ngl : ngrams_8859_1) { int confidence = match(det, ngl.fNGrams, byteMap); if (confidence > bestConfidenceSoFar) { bestConfidenceSoFar = confidence; lang = ngl.fLang; } } return bestConfidenceSoFar <= 0 ? null : new CharsetMatch(det, this, bestConfidenceSoFar, name, lang); }