diff --git a/src/Commands/GenericmessageCommand.php b/src/Commands/GenericmessageCommand.php index 78b1a0c..e08a4e8 100644 --- a/src/Commands/GenericmessageCommand.php +++ b/src/Commands/GenericmessageCommand.php @@ -65,7 +65,7 @@ class GenericmessageCommand extends SystemCommand } $text_chara_count = count(preg_split('//u', $text, -1, PREG_SPLIT_NO_EMPTY)); - $text_english_count = count(preg_split('~[^a-z]*~i', $text, 0, PREG_SPLIT_NO_EMPTY)); + $text_english_count = count(preg_split('~[^a-z 0-9\'\",.]*~i', $text, 0, PREG_SPLIT_NO_EMPTY)); if ($text_english_count >= ($text_chara_count*2 /3)) { $sourceLang = 'en'; $targetLang = 'zh';