[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4259 - i18nHTML/src/admin
From: |
grothoff |
Subject: |
[GNUnet-SVN] r4259 - i18nHTML/src/admin |
Date: |
Sun, 7 Jan 2007 23:13:33 -0800 (PST) |
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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4259 - i18nHTML/src/admin,
grothoff <=