Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
59402181
Commit
59402181
authored
Jan 18, 2017
by
delanoe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'testing' into stable
parents
84d0685e
f06e1d8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
main.py
gargantext/util/toolchain/main.py
+3
-1
ngram_coocs.py
gargantext/util/toolchain/ngram_coocs.py
+3
-2
No files found.
gargantext/util/toolchain/main.py
View file @
59402181
...
...
@@ -9,7 +9,8 @@ from .list_stop import do_stoplist
from
.ngram_groups
import
compute_groups
from
.metric_tfidf
import
compute_occs
,
compute_tfidf_local
,
compute_ti_ranking
from
.list_main
import
do_mainlist
from
.ngram_coocs
import
compute_coocs
#from .ngram_coocs import compute_coocs
from
.ngram_coocs_old_sqlalchemy_version
import
compute_coocs
from
.metric_specgen
import
compute_specgen
from
.list_map
import
do_maplist
from
.mail_notification
import
notify_owner
...
...
@@ -148,6 +149,7 @@ def parse_extract_indexhyperdata(corpus):
on_list_id
=
mainlist_id
,
groupings_id
=
group_id
,
just_pass_result
=
True
,
# symmetry_filter = True,
diagonal_filter
=
False
)
# preserving the diagonal
# (useful for spec/gen)
print
(
'CORPUS #
%
d: [
%
s] computed mainlist coocs for specif rank'
%
(
corpus
.
id
,
t
()))
...
...
gargantext/util/toolchain/ngram_coocs.py
View file @
59402181
...
...
@@ -172,7 +172,7 @@ def compute_coocs( corpus,
AND grA.node_id = {groupings_id}
--
\
--> adding (joining) ngrams that are grouped
LEFT JOIN nodes_ngrams
AS wlAA ON grA.ngram2_id = wlAA.id
AS wlAA ON grA.ngram2_id = wlAA.
ngram_
id
AND wlA.node_id = wlA.node_id
--
\
--> adding (joining) ngrams that are not grouped
--LEFT JOIN ngrams AS wlAA ON grA.ngram2_id = wlAA.id
...
...
@@ -186,7 +186,7 @@ def compute_coocs( corpus,
AND grB.node_id = {groupings_id}
--
\
--> adding (joining) ngrams that are grouped
LEFT JOIN nodes_ngrams
AS wlBB ON grB.ngram2_id = wlBB.id
AS wlBB ON grB.ngram2_id = wlBB.
ngram_
id
AND wlB.node_id = wlB.node_id
--
\
--> adding (joining) ngrams that are not grouped
...
...
@@ -218,6 +218,7 @@ def compute_coocs( corpus,
# 7) Building the final query
final_sql
+=
cooc_sql
+
select_cooc_sql
#final_sql += ";\n reset work_mem;"
# 6) EXECUTE QUERY
# ----------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment