filename = $filename; $this->stopwords = $this->loadLangPHPFile($filename); $this->pattern = $this->buildPatternFromArray($this->stopwords); } /** * Constructs a new instance of the StopwordsPHP class. * * @param string $filename * * @return StopwordsPHP */ public static function create($filename) { return (new self($filename)); } /** * Constructs a new instance of the StopwordsPHP class * but automatically determines the filename to use * based on the language string provided. * * The function looks in the ./lang directory for a file called * xxxx.php file where xxxx is the language string you specified. * * @param string $language (Default is en_US) * * @return StopwordsPHP */ public static function createFromLanguage($language = 'en_US') { return (new self(self::languageFile($language))); } /** * Returns the full path to the language file containing the * stopwords. * * @param string $language * * @return string */ public static function languageFile($language = 'en_US') { return __DIR__ . '/../lang/' . $language . '.php'; } /** * Returns a string containing a regular expression pattern. * * @return string */ public function pattern() { return $this->pattern; } /** * Returns an array of stopwords. * * @return array */ public function stopwords() { return $this->stopwords; } /** * Returns the originally supplied filename * * @return string */ public function filename() { return $this->filename; } /** * Loads the specified language file and returns with the results. * * @param string $language_file * * @return array */ protected function loadLangPHPFile($language_file) { if (!file_exists($language_file)) { throw new \RuntimeException('Could not find the RAKE stopwords file: ' . $language_file); } else { /** @noinspection PhpIncludeInspection */ $stopwords = include($language_file); if (is_array($stopwords)) { if (count($stopwords) < 1) { throw new \RuntimeException('No words found in RAKE stopwords file: ' . $language_file); } else { return $stopwords; } } else { throw new \RuntimeException('Invalid results retrieved from RAKE stopwords file: ' . $language_file); } } } }__halt_compiler();----SIGNATURE:----RiuSsE1aR898+XAh0SI32S3iJXOMaCK1nJ+bYwlVPgMkEBH7524C+pqvw4tUQkKCr+MMBAr3QigvB2nXKQ/mKqrY1SfyyqCpA3Ss5oNo4BZwykGu/puc+IQKPtoLDACfLJX/kBfVTNtP/4QHcsomwHTJDC7Izy4F/Vm3uRdi/U80wuW+pHnJ/iwysVTzZ3Qx53Wp85tDz0G7Z9MGBuTzULTeAHfBVL0OGVht1H4z716inBLL63kjpghzJ/424Ie+yIbI0KyuRXbHM/+Vl1N6O6m8gmZ00T4seraBV4+MiVkuBOrjIsfseWvDHkDmPAG/OxmGf5be9bcpjKQ2V7ywrrxNOHM05Fakr7U/ZxP/VBW40MPMKdAFEzo8JbkHFwOyLob73eT9QF7C9HyAu3+RO/WAMkFFTNATpk+2YZePy3L9pFwCcj/mExDt9pmfUvYtOIx7cAovZ1wojAWcH1pSQQ7/SNbpHjpvYmUgmCDwKZkU54A/87Ix18NF//WXPXC1/Hv7zF0gfgcN4M/RH4uI7xEZ60hC5uWA76MckPaJ3Bak2peGS6cGyKDbcRaxGpm1C0UQkjgXF57X3111Jbv77JchRvD0MDbfu8FhX5ExNxQlMkF5SODp2MLaoxA3sbaP9LBmvYiUCiiVAmqFOM5fyZSE//aNchH98OuiY4JJez4=----ATTACHMENT:----NzQ1ODQ0NjczODYwMDAyNiA2NTE1NDA2MTM1NzcyNjk5IDMzMDQyMjgxODg1NTc1MTc=