diff --git a/app/Library/Utils/Word.php b/app/Library/Utils/Word.php index 9193e8e4..6bca8601 100644 --- a/app/Library/Utils/Word.php +++ b/app/Library/Utils/Word.php @@ -14,13 +14,15 @@ class Word public static function getWordCount($str) { + $imageWordCount = self::getImageWordCount($str); + $chineseWordCount = self::getChineseWordCount($str); $str = self::filterChineseWords($str); $englishWordCount = self::getEnglishWordCount($str); - $count = $chineseWordCount + $englishWordCount; + $count = $imageWordCount + $chineseWordCount + $englishWordCount; return (int)$count; } @@ -54,6 +56,11 @@ class Word return (int)$count; } + public static function getImageWordCount($str) + { + return 100 * substr_count($str, '