зеркало из https://github.com/mozilla/pjs.git
#115114 autodetect universal detects french as Central European (ISO-8859-2)
remove 2 hungarian probers. r=ftang, sr=scc
This commit is contained in:
Родитель
26dd9bfdc0
Коммит
1d7aec1f3f
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче