_binary From 4c8a1ee2d68041fc25ee186a1c83309c33ce6920 Mon Sep 17 00:00:00 2001
From: Forrest Sun <sxh19911230@gmail.com>
Date: Wed, 11 Sep 2019 23:05:12 -0700
Subject: [PATCH] Fixes issues where the Chinese stopwords-remover removes
 meaningful words instead of the real stop words, r=chris

---
 src/locale/zh_CN/resources/Tokenizer.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/locale/zh_CN/resources/Tokenizer.php b/src/locale/zh_CN/resources/Tokenizer.php
index c50dc568..bb46318c 100755
--- a/src/locale/zh_CN/resources/Tokenizer.php
+++ b/src/locale/zh_CN/resources/Tokenizer.php
@@ -68,7 +68,7 @@ class Tokenizer
     {
         static $pattern = "";
         if (empty($pattern)) {
-            $pattern = '/(' . implode('|', self::$stop_words) . ')/u';
+            $pattern = '/\b(' . implode('|', self::$stop_words) . ')\b/u';
         }
         $data = preg_replace($pattern, '', $data);
         return $data;
-- 
2.21.0.windows.1

