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P֧8*Bs9и̨ڊzz-m[P䉇}yh8&[y/2f֌rJ2"G=I'ݤ5Z}}$l]f5g%]=5F'cF7NtnYc,P6&C"|a2h3}c^%U8d;ڶ ȳkW7nf֌rJ2"ΪWd4=On̦bЋKFvXgs%6R#h@ÍXqP{}×`-\yAOV6:UM6>er :LHu2'"u܁AyMkr# oz$ӯ4ޔ~sesC.ֿܿ9dxt\GU([Ϋ #PƳn8kxNHLޯ%lfN#Ә%+:Q@$=+Qefm>0(w?rT)Z#`Tm+}yK~#hl?aN<1FZ =hKT}5M sponse headers if (preg_match('!^HTTP/1.\d (\d+)(.+)!', $headers, $m)) { $http_status = $m[1]; if ($http_status != '200') { $this->error = 'HTTP ' . $m[1] . $m[2]; } } if (!$response) { $this->error = "Empty result from spelling engine"; } try { $result = new SimpleXMLElement($response); } catch (Exception $e) { $this->error = "Unexpected response from server: " . $response; return []; } $matches = []; foreach ($result->error as $error) { if (strval($error->type) == 'spelling') { $word = strval($error->string); // skip exceptions if ($this->dictionary->is_exception($word)) { continue; } $prefix = strval($error->precontext); $start = $prefix ? mb_strpos($text, $prefix) : 0; $pos = mb_strpos($text, $word, $start); $len = mb_strlen($word); $num = 0; $match = [$word, $pos, $len, null, []]; foreach ($error->suggestions->option as $option) { $match[4][] = strval($option); if (++$num == self::MAX_SUGGESTIONS) { break; } } $matches[] = $match; } } $this->matches = $matches; return $matches; } /** * Returns suggestions for the specified word * * @see rcube_spellchecker_engine::get_words() */ function get_suggestions($word) { $matches = $word ? $this->check($word) : $this->matches; if (!empty($matches[0][4])) { return $matches[0][4]; } return []; } /** * Returns misspelled words * * @see rcube_spellchecker_engine::get_suggestions() */ function get_words($text = null) { if ($text) { $matches = $this->check($text); } else { $matches = $this->matches; $text = $this->content; } $result = []; foreach ($matches as $m) { $result[] = mb_substr($text, $m[1], $m[2], RCUBE_CHARSET); } return $result; } }