From: Zheng Zhu Date: Thu, 25 Nov 2004 03:17:05 +0000 (+0000) Subject: convert to simplified Chinese before for searching and indexing. X-Git-Tag: 1.5.0alpha1~1246 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=b9a0f53b1064f0b1c8b375252b9bbe75c9594a51;p=lhc%2Fweb%2Fwiklou.git convert to simplified Chinese before for searching and indexing. --- diff --git a/languages/LanguageZh.php b/languages/LanguageZh.php index f01e373597..59afd08000 100644 --- a/languages/LanguageZh.php +++ b/languages/LanguageZh.php @@ -108,11 +108,17 @@ class LanguageZh extends LanguageZh_cn { function stripForSearch( $string ) { $fname="zhsegment"; wfProfileIn( $fname ); + //always convert to zh-cn before indexing. it should be + //better to use zh-cn for search, since conversion from + //Traditional to Simplified is less ambiguous than the + //other way around + $string = $this->autoConvert($string, 'zh-cn'); $t = $this->mZhClient->segment($string); $t = LanguageUtf8::stripForSearch( $t ); wfProfileOut( $fname ); return $t; } + } ?>