WITH a AS (SELECT sentence, unnest(position) AS w_pos FROM evn.mv_normalised_wordforms WHERE wordform = lower($1)) SELECT b.wordform, count(b.wordform) AS quantity FROM evn.mv_normalised_wordforms AS b LEFT OUTER JOIN a USING (sentence) WHERE w_pos + ($2::integer + $3::integer) = any(position) GROUP BY b.wordform HAVING count(b.wordform) >= $4::integer ORDER BY quantity DESC, b.wordform ASC;

SELECT l.code, (COALESCE(lt.iface_name -> $1, lt.iface_name -> 'rus'))::text || ' — ' || (COALESCE(lt.iface_name -> l.code, lt.iface_name -> 'eng'))::text AS name, l.locale FROM languages AS l LEFT JOIN language_taxonomy AS lt ON (l.taxonomy_id = lt.id) WHERE l.iface IS TRUE ORDER BY code;
Корпусы ИЭА РАН — Правые соседи слова «денивки» во всех текстах

У слова «денивки» нет соседей справа на дистанции 1.

Форма «денивки» не встречается во всем корпусе.


SELECT wordform FROM (SELECT DISTINCT wordform FROM mv_evn.mv_normalised_wordforms) AS a WHERE levenshtein('денивки', wordform) < length('денивки') - 2 ORDER BY 1;
/corpora/neighbours.php