MediaWiki REL1_41
LanguageYue.php
Go to the documentation of this file.
1<?php
26class LanguageYue extends Language {
27
28 public function hasWordBreaks() {
29 return false;
30 }
31
40 public function segmentByWord( $string ) {
41 $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/";
42 return self::insertSpace( $string, $reg );
43 }
44}
Cantonese (粵語)
segmentByWord( $string)
Eventually, this should be a word segmentation; but for now just treat each character as a word.
hasWordBreaks()
Most writing systems use whitespace to break up words.
Base class for language-specific code.
Definition Language.php:63
static insertSpace( $string, $pattern)