Commit f76b6997 authored by Administrator's avatar Administrator

[TESTS] SQL requests for cooccurrences.

parent 21417615
This diff is collapsed.
This diff is collapsed.
...@@ -6,10 +6,7 @@ SELECT ...@@ -6,10 +6,7 @@ SELECT
FROM FROM
node_node_ngram AS x node_node_ngram AS x
INNER JOIN INNER JOIN node_node_ngram AS y ON x.node_id = y.node_id
node_node_ngram AS y
ON x.node_id = y.node_id
WHERE WHERE
...@@ -23,4 +20,6 @@ x.ngram_id <> y.ngram_id ...@@ -23,4 +20,6 @@ x.ngram_id <> y.ngram_id
GROUP BY GROUP BY
x.ngram_id, y.ngram_id x.ngram_id, y.ngram_id
HAVING score > 30
LIMIT 1000 LIMIT 1000
INSERT INTO node_nodengramngram ( node_id, ngramX_id, ngramY_id, score)
SELECT 173 AS node_id,
x.ngram_id AS ngramX_id,
y.ngram_id AS ngramY_id,
COUNT(*) AS score
FROM node_node_ngram AS x
INNER JOIN node_node_ngram AS y ON y.node_id = x.node_id
INNER JOIN node_node_ngram AS n ON
WHERE
x.ngram_id <> y.ngram_id
GROUP BY x.ngram_id,
y.ngram_id HAVING score > 30 LIMIT 1000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment