Author: grothoff
Date: 2007-01-07 23:13:32 -0800 (Sun, 07 Jan 2007)
New Revision: 4259
Modified:
i18nHTML/src/admin/dig.php
Log:
fix
Modified: i18nHTML/src/admin/dig.php
===================================================================
--- i18nHTML/src/admin/dig.php 2007-01-08 07:01:35 UTC (rev 4258)
+++ i18nHTML/src/admin/dig.php 2007-01-08 07:13:32 UTC (rev 4259)
@@ -143,14 +143,16 @@
$cc1 = count_chars($text, 0);
$cc2 = count_chars($translation, 0);
$total = 0;
- foreach (".,!?;\"'`:-=+-()*" as $punct) {
- $t1 = $cc1[$punct];
- $t2 = $cc2[$punct];
+ $puncts =
ARRAY('.',',','!','?',';','\"','\'','`',':','-','=','+','-','(',')','*');
+ foreach ($puncts as $punct) {
+ $t1 = $cc1[ord($punct)];
+ $t2 = $cc2[ord($punct)];
$del = $t1 - $t2;
$total += $del * $del;
}
- $score = $total;
+ $score = 1000 * $total / strlen($text);
}
+ break;
case "totc": // total number of contributed translations
$query2 = "SELECT tid FROM ${i18nHTMLsqlPrefix}map WHERE ";
if ($truid == 2)
_______________________________________________
GNUnet-SVN mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnunet-svn