00001 <?php 00005 class LanguageYue extends Language { 00006 function hasWordBreaks() { 00007 return false; 00008 } 00009 00015 function wordSegmentation( $string ) { 00016 $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/"; 00017 $s = self::insertSpace( $string, $reg ); 00018 return $s; 00019 } 00020 00021 function normalizeForSearch( $string ) { 00022 wfProfileIn( __METHOD__ ); 00023 00024 // Double-width roman characters 00025 $s = self::convertDoubleWidth( $string ); 00026 $s = trim( $s ); 00027 $s = parent::normalizeForSearch( $s ); 00028 00029 wfProfileOut( __METHOD__ ); 00030 return $s; 00031 } 00032 }