splits the search words into an array with prepared search words.

@param string $sWords
@param bool   $bFilterIgnoreWords - removes ignore words form the list if set

@return array
550099
public static function PrepareSearchWords($sOrigianlString, $bFilterIgnoreWords = true)
    {
        $aWords = array();
        $sOrigianlString = strip_tags($sOrigianlString);
        $sOrigianlString = str_replace(array('/', "\n", '-', '_', '&', '+'), array(' ', ' ', ' ', ' ', ' ', ' '), $sOrigianlString);
        $aTmpWords = explode(' ', $sOrigianlString);
        foreach ($aTmpWords as $iIndex => $sWord) {
            $sWord = trim($sWord);
            if (!empty($sWord)) {
                $sTmpWord = TdbShopSearchIndexer::PrepareSearchWord($sWord, $bFilterIgnoreWords);
                if (!empty($sTmpWord)) {
                    $aWords[] = $sTmpWord;
                }
            }
        }

        return $aWords;
    }
471399
function containsWords(wordlist, str) {
    var i;
    var matches = [];
    for (i = 0; i < wordlist.length; i++) {
        var re = new RegExp("\\b" + wordlist[i] + "\\b", "i");
        if (re.exec(str)) {
            matches.push(wordlist[i]);
        }
    }
    return matches;
}
837548
public function getSearchSpellcheckingSearchUsingSpellCheckerSuggestion($defaultIfEmpty = false)
    {
        $result = $this->getValueByPathOrDefaultValue('plugin.tx_solr.search.spellchecking.searchUsingSpellCheckerSuggestion', $defaultIfEmpty);
        return $this->getBool($result);
    }
35966
public function getBlockedWords($search = ''){
        $where = array();
        if(!empty($search)){
            $where['word'] = array('LIKE', '%'.$search.'%');
        }
        $this->blockedWords = $this->db->selectAll($this->getBannedWordsTable(), $where);
        return $this->blockedWords;
    }
838017
public function extract_first($rules)
    {
        if ($this->_nodes) {
            $selector = new Selector($this->_document, current($this->_nodes));
            return $selector->extract($rules);
        } else {
            return [];
        }
    }
411035
protected function bfEncrypt($lBlock, $rBlock): array
    {
        $lBlock ^= $this->pModifiedKeys[0];
        for ($iteration = 1; $iteration < 17; $iteration += 2) {
            $rBlock = $this->bfEnc($rBlock, $lBlock, $iteration);
            $lBlock = $this->bfEnc($lBlock, $rBlock, $iteration + 1);
        }
        $rBlock ^= $this->pModifiedKeys[17];
        return [$rBlock, $lBlock];
    }
1255546
public function tokenize(string $string) : array
    {
        $sentences = preg_split(self::SENTENCE_REGEX, $string) ?: [];

        $skipGrams = [];

        foreach ($sentences as $sentence) {
            $words = [];

            preg_match_all(self::WORD_REGEX, $sentence, $words);

            $words = $words[0];

            $length = count($words) - ($this->n + $this->skip);

            for ($i = 0; $i <= $length; $i++) {
                $first = $words[$i];

                for ($j = 0; $j <= $this->skip; $j++) {
                    $skipGram = $first;

                    for ($k = 1; $k < $this->n; $k++) {
                        $skipGram .= self::SEPARATOR . $words[$i + $j + $k];
                    }

                    $skipGrams[] = $skipGram;
                }
            }

            $last = array_slice($words, -$this->n);

            $skipGrams[] = implode(self::SEPARATOR, $last);
        }

        return $skipGrams;
    }
343434
private function parseUseStatement(\ArrayIterator $tokens)
    {
        $uses = [];
        $continue = true;

        while ($continue) {
            $this->skipToNextStringOrNamespaceSeparator($tokens);

            $uses = array_merge($uses, $this->extractUseStatements($tokens));
            if ($tokens->current()[0] === self::T_LITERAL_END_OF_USE) {
                $continue = false;
            }
        }

        return $uses;
    }
898852
private function extractUseStatement(\ArrayIterator $tokens)
    {
        $result = [''];
        while ($tokens->valid()
            && (self::T_LITERAL_USE_SEPARATOR !== $tokens->current()[0])
            && (self::T_LITERAL_END_OF_USE !== $tokens->current()[0])
        ) {
            if (T_AS === $tokens->current()[0]) {
                $result[] = '';
            }
            if (T_STRING === $tokens->current()[0] || T_NS_SEPARATOR === $tokens->current()[0]) {
                $result[\count($result) - 1] .= $tokens->current()[1];
            }
            $tokens->next();
        }

        if (1 == \count($result)) {
            $backslashPos = strrpos($result[0], '\\');

            if (false !== $backslashPos) {
                $result[] = substr($result[0], $backslashPos + 1);
            } else {
                $result[] = $result[0];
            }
        }

        return array_reverse($result);
    }
1293050
public function wordsWithThreeSyllables($strText = false, $blnCountProperNouns = true)
    {
        $strText = $this->setText($strText);

        return Syllables::wordsWithThreeSyllables($strText, $blnCountProperNouns, $this->strEncoding);
    }
240275
public function summarize(array $wordTokens, array $sentenceTokens) : array
    {
        $tokenCounts = array_count_values($wordTokens);
        $scoreKeepers = [];
        for($index = 0; $index < count($sentenceTokens); $index++)
        {
            $scoreKeepers[] = new ScoreKeeper($sentenceTokens[$index], $index);
        }
                       
        foreach($tokenCounts as $token => $freq)
        {
            foreach($scoreKeepers as $sentenceKeeper)
            {
                if(strpos($sentenceKeeper->getToken(), $token) !== false) {
                    
                    $sentenceKeeper->addToScore($freq);
                }
            }
        } 
        
        usort($scoreKeepers, 'score_keeper_sort');
        return $scoreKeepers;
    }
1191796
protected function scanFilter()
    {

        foreach ($this->scanToken('filter', ':(?<name>[a-zA-Z_][a-zA-Z0-9\-_]*)') as $token) {

            yield $token;

            foreach ($this->scanTextBlock() as $subToken)
                yield $subToken;
        }
    }
61213
public static function split(string $subject, string $pattern, int $flags = 0): array
    {
        return static::pcre('\preg_split', [$pattern, $subject, -1, $flags | PREG_SPLIT_DELIM_CAPTURE]);
    }
649291
private List<String> getCorrectWords(List<String> wordsOrPhrases) {
    List<String> result = new ArrayList<>();
    for (String wordOrPhrase : wordsOrPhrases) {
      // this might be a phrase like "aufgrund dessen", so it needs to be split: 
      String[] words = tokenizeText(wordOrPhrase);
      boolean wordIsOkay = true;
      for (String word : words) {
        if (hunspellDict.misspelled(word)) {
          wordIsOkay = false;
          break;
        }
      }
      if (wordIsOkay) {
        result.add(wordOrPhrase);
      }
    }
    return result;
  }
40791
public function span(array $fieldNames, $op = 'and', $phrase = false, $boost = 1.0)
    {
        return function(FieldExpression $expr, LuceneCompiler $compiler) use ($fieldNames, $op, $phrase, $boost)
        {
            $value = $compiler->phrasize($expr->getValue(), $phrase);

            $tree = new SpanExpression(strtoupper($op), array(), $boost);

            foreach ($fieldNames as $fieldName) {
                $tree->addExpression(new LuceneFieldExpression($fieldName, $value));
            }

            return $tree;
        };
    }
844297
public function getList(
        $page = null,
        $pageSize = null,
        array $localeFilter = array(),
        array $countryCodeFilter = array(),
        array $additionalFields = array()
    ) {
        return $this->getInternalList(
            'region/list',
            'Region',
            array(
                'page' => (int)$page,
                'page_size' => (int)$pageSize,
                'locale_filter' => self::getArray($localeFilter),
                'country_code_filter' => self::getArray($countryCodeFilter),
                'fields' => self::getArray($additionalFields),
            )
        );
    }
1139223
public function termDocs(Zend_Search_Lucene_Index_Term $term, $docsFilter = null)
    {
        if ($docsFilter != null) {
            include_once 'Zend/Search/Lucene/Exception.php';
            throw new Zend_Search_Lucene_Exception('Document filters could not used with multi-searcher');
        }

        $docsList = array();

        $indexShift = 0;
        foreach ($this->_indices as $index) {
            $docs = $index->termDocs($term);

            if ($indexShift != 0) {
                foreach ($docs as $id => $docId) {
                    $docs[$id] += $indexShift;
                }
            }

            $indexShift += $index->count();
            $docsList[] = $docs;
        }

        return call_user_func_array('array_merge', $docsList);
    }