Lines Matching refs:word

48         // get word usage in page
76 foreach ($delwords as $word) {
77 if ($word != '') {
78 [$wlen, $wid] = explode('*', $word);
106 * @return array list of word IDs and number of times used
128 // arrive here with $words = array(wordlen => array(word => frequency))
133 foreach ($words[$wlen] as $word => $freq) {
134 $word = (string)$word;
135 $wid = array_search($word, $word_idx, true);
138 $word_idx[] = $word;
145 // save back the word index
415 foreach ($delwords as $word) {
416 if ($word != '') {
417 [$wlen, $wid] = explode('*', $word);
528 foreach ($wordlist as $i => $word) {
529 $wordlist[$i] = (preg_match('/[^0-9A-Za-z]/u', $word)) ?
530 PhpString::strtolower($word) : strtolower($word);
533 foreach ($wordlist as $i => $word) {
535 (!is_numeric($word) && strlen($word) < IDX_MINWORDLENGTH)
536 || in_array($word, $stopwords, true)
632 foreach ($result as $word => $res) {
633 $final[$word] = [];
642 if (!isset($final[$word][$hitkey]))
643 $final[$word][$hitkey] = $hitcnt;
644 else $final[$word][$hitkey] += $hitcnt;
657 * searched for as the first argument, and the word in the index as the
689 foreach ($words as $i => $word) {
690 if (call_user_func_array($func, [$val, $word]))
757 * either the beginning or end of the word (or both).
762 * @param array $result Set to word => array("length*id" ...)
772 foreach ($words as $word) {
773 $result[$word] = [];
776 $xword = $word;
777 $wlen = wordlen($word);
796 $tokens[$xword][] = [$word, '/' . $re . '/'];
800 $tokens[$xword][] = [$word, null];
804 // $tokens = array( base word => array( [ query term , regexp ] ... ) ... )
805 // $tokenlength = array( base word length => base word ... )
806 // $tokenwild = array( base word => base word length ... )
810 // get word IDs
1142 * Get the word lengths that have been indexed.