r63601 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63600‎ | r63601 | r63602 >
Date:15:25, 11 March 2010
Author:conrad
Status:deferred
Tags:
Comment:
Further fixes for r63578, rename remaining wordSegmentation functions and calls thereto
Modified paths:
  • /branches/conrad/phase3/includes/search/SearchMySQL.php (modified) (history)
  • /branches/conrad/phase3/languages/classes/LanguageJa.php (modified) (history)
  • /branches/conrad/phase3/languages/classes/LanguageYue.php (modified) (history)
  • /branches/conrad/phase3/languages/classes/LanguageZh_hans.php (modified) (history)

Diff [purge]

Index: branches/conrad/phase3/includes/search/SearchMySQL.php
@@ -326,7 +326,7 @@
327327 wfProfileIn( __METHOD__ );
328328
329329 // Some languages such as Chinese require word segmentation
330 - $out = $wgContLang->wordSegmentation( $string );
 330+ $out = $wgContLang->segmentByWord( $string );
331331
332332 // MySQL fulltext index doesn't grok utf-8, so we
333333 // need to fold cases and convert to hex
@@ -409,4 +409,4 @@
410410 function getTotalHits() {
411411 return $this->mTotalHits;
412412 }
413 -}
\ No newline at end of file
 413+}
Index: branches/conrad/phase3/languages/classes/LanguageZh_hans.php
@@ -13,7 +13,7 @@
1414 * for now just treat each character as a word.
1515 * @todo Fixme: only do this for Han characters...
1616 */
17 - function wordSegmentation( $string ) {
 17+ function segmentByWord( $string ) {
1818 $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/";
1919 $s = self::insertSpace( $string, $reg );
2020 return $s;
@@ -30,4 +30,4 @@
3131 wfProfileOut( __METHOD__ );
3232 return $s;
3333 }
34 -}
\ No newline at end of file
 34+}
Index: branches/conrad/phase3/languages/classes/LanguageJa.php
@@ -6,7 +6,7 @@
77 * @ingroup Language
88 */
99 class LanguageJa extends Language {
10 - function wordSegmentation( $string ) {
 10+ function segmentByWord( $string ) {
1111 // Strip known punctuation ?
1212 // $s = preg_replace( '/\xe3\x80[\x80-\xbf]/', '', $s ); # U3000-303f
1313
Index: branches/conrad/phase3/languages/classes/LanguageYue.php
@@ -12,7 +12,7 @@
1313 * for now just treat each character as a word.
1414 * @todo Fixme: only do this for Han characters...
1515 */
16 - function wordSegmentation( $string ) {
 16+ function segmentByWord( $string ) {
1717 $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/";
1818 $s = self::insertSpace( $string, $reg );
1919 return $s;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63578Follow-up r61856...mah21:54, 10 March 2010

Status & tagging log