@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function getWordList() { |
68 | 68 | if (empty($this->cached)) { |
69 | - $file = sprintf(__DIR__ . '/../../resources/text/stopwords-%s.txt', $this->getLanguage()); |
|
69 | + $file = sprintf(__DIR__.'/../../resources/text/stopwords-%s.txt', $this->getLanguage()); |
|
70 | 70 | |
71 | 71 | $this->cached = explode("\n", str_replace(["\r\n", "\r"], "\n", file_get_contents($file))); |
72 | 72 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | public function getCandidateWords($strippedInput) { |
117 | 117 | // Simple separating words in Japanese. |
118 | 118 | if ($this->getLanguage() === 'ja') { |
119 | - $regexp = '/(' . implode('|', array_map('preg_quote', $this->getWordList())) . ')/'; |
|
119 | + $regexp = '/('.implode('|', array_map('preg_quote', $this->getWordList())).')/'; |
|
120 | 120 | $strippedInput = preg_replace($regexp, ' $1 ', $strippedInput); |
121 | 121 | } |
122 | 122 |