#115114 autodetect universal detects french as Central European (ISO-8859-2)

remove 2 hungarian probers.
r=ftang, sr=scc
This commit is contained in:
shanjian%netscape.com 2005-11-02 16:57:13 +00:00
Родитель 15cff7dc41
Коммит 3f7e5bdeed
3 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -55,8 +55,11 @@ nsSBCSGroupProber::nsSBCSGroupProber()
mProbers[7] = new nsSingleByteCharSetProber(&Win1253Model);
mProbers[8] = new nsSingleByteCharSetProber(&Latin5BulgarianModel);
mProbers[9] = new nsSingleByteCharSetProber(&Win1251BulgarianModel);
mProbers[10] = new nsSingleByteCharSetProber(&Latin2HungarianModel);
mProbers[11] = new nsSingleByteCharSetProber(&Win1250HungarianModel);
// disable latin2 before latin1 is available, otherwise all latin1
// will be detected as latin2 because of their similarity.
//mProbers[10] = new nsSingleByteCharSetProber(&Latin2HungarianModel);
//mProbers[11] = new nsSingleByteCharSetProber(&Win1250HungarianModel);
Reset();
}

Просмотреть файл

@ -40,7 +40,7 @@
#define nsSBCSGroupProber_h__
#define NUM_OF_SBCS_PROBERS 12
#define NUM_OF_SBCS_PROBERS 10
class nsSingleByteCharSetProber;
class nsSBCSGroupProber: public nsCharSetProber {

Просмотреть файл

@ -98,7 +98,7 @@ float nsSingleByteCharSetProber::GetConfidence(void)
float r;
if (mTotalSeqs > 0) {
r = ((float)1.2) * mSeqCounters[POSITIVE_CAT] / mTotalSeqs / mModel->mTypicalPositiveRatio;
r = ((float)1.0) * mSeqCounters[POSITIVE_CAT] / mTotalSeqs / mModel->mTypicalPositiveRatio;
r = r*mFreqChar/mTotalChar;
if (r >= (float)1.00)
r = (float)0.99;