Commit e7ea9213 authored by Administrator's avatar Administrator

[TEST] cooc > 2 and xs - ys

parent ec23bcc5
...@@ -66,7 +66,7 @@ def create_whitelist(user, corpus_id, size=size): ...@@ -66,7 +66,7 @@ def create_whitelist(user, corpus_id, size=size):
GROUP BY GROUP BY
ngX.id ngX.id
Having Having
COUNT(*) >= 1 COUNT(*) >= 3
ORDER BY ORDER BY
occurrences DESC occurrences DESC
LIMIT LIMIT
...@@ -128,8 +128,6 @@ def create_cooc(user=None, corpus_id=None, whitelist=None, size=size, year_start ...@@ -128,8 +128,6 @@ def create_cooc(user=None, corpus_id=None, whitelist=None, size=size, year_start
whitelistY.node_id = %s whitelistY.node_id = %s
AND AND
nngX.ngram_id < nngY.ngram_id -- so we only get distinct pairs of ngrams nngX.ngram_id < nngY.ngram_id -- so we only get distinct pairs of ngrams
AND
score > 2
GROUP BY GROUP BY
ngX.id, ngX.id,
...@@ -208,8 +206,10 @@ def get_cooc(request=None, corpus_id=None, cooc_id=None, type='node_link', size= ...@@ -208,8 +206,10 @@ def get_cooc(request=None, corpus_id=None, cooc_id=None, type='node_link', size=
# top inclus # top inclus
#n = ( xs + ys) / (2 * (x.shape[0] -1)) #n = ( xs + ys) / (2 * (x.shape[0] -1))
# top specific # top specific ?
m = ( xs - ys) / (2 * (x.shape[0] -1)) m = ( xs - ys) / (2 * (x.shape[0] -1))
# top generic ?
#m = ( ys - ss) / (2 * (x.shape[0] -1))
#m = pd.DataFrame.abs(m) #m = pd.DataFrame.abs(m)
n = n.sort(inplace=False) n = n.sort(inplace=False)
......
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