Source

uchardet-enhanced / langstats / mkpairmodel.py

Diff from to

langstats/mkpairmodel.py

 #   print "order1", order1, "order2", order2, "ichar1", ichar1, "ichar2", ichar2
 
     cntocs = pairfreqs[(order1-1) * maxrank + order2-1]
-    fclass = 1
-    if cntocs >= t512:
+    if cntocs > 0 and cntocs >= t512:
         fclass = 3
-    elif cntocs >= t1024:
+        print "Seq 3", chr(ichar1), chr(ichar2)
+    elif cntocs > 0 and cntocs >= t1024:
         fclass = 2
-    elif cntocs <= 2:
+    elif cntocs >= 2:
+        fclass = 1
+    else:
         fclass = 0
         
     #print chr(ichar1), chr(ichar2), fclass, cntocs