Sastrawi\Stemmer\StemmerFactory::getWordsFromFile PHP Method

getWordsFromFile() protected method

protected getWordsFromFile ( )
    protected function getWordsFromFile()
    {
        $dictionaryFile = __DIR__ . '/../../../data/kata-dasar.txt';
        if (!is_readable($dictionaryFile)) {
            throw new \Exception('Dictionary file is missing. It seems that your installation is corrupted.');
        }
        return explode("\n", file_get_contents($dictionaryFile));
    }