Skip to content

Commit ea3dda0

Browse files
committed
修复拼音分词不会自动初始化词库问题
1 parent 6934110 commit ea3dda0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Chinese.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ public static function toPinyin($string, $mode = Pinyin::CONVERT_MODE_FULL, $wor
6464
*/
6565
public static function splitPinyin($string)
6666
{
67+
if(!static::$isInited)
68+
{
69+
static::init();
70+
}
6771
return PinyinSplit::split($string);
6872
}
6973

0 commit comments

Comments
 (0)