public function filterStopwords($string, $language)
    {
        $prepared = trim(strip_tags($string));

        if ($prepared === '') {
            return '';
        }

        $stopwords = array();
        $path = GC_DIR_PRIVATE . "/stopwords/$language.txt";

        if (is_readable($path)) {
            $stopwords = array_map('trim', file($path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES));
        }

        return implode(' ', array_diff(explode(' ', $prepared), $stopwords));
    }