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
855ee20e
Commit
855ee20e
authored
May 18, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deactivate sending subform counts to term table (for now, subform counts don't exist anymore)
parent
f0153fb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
ngramlists.py
gargantext/views/api/ngramlists.py
+7
-5
No files found.
gargantext/views/api/ngramlists.py
View file @
855ee20e
...
...
@@ -74,8 +74,10 @@ def _query_grouped_ngrams(groupings_id, details=False, scoring_metric_id=None):
- details: if False, send just the array of ngram_ids
if True, send triples with (ngram_id, term, scoring)
^^^^^^^
- scoring_metric_id: id of a scoring metric node (TFIDF or OCCS)
deprecated: scoring_metric_id: id of a scoring metric node (TFIDF or OCCS)
(for details and sorting)
(no more OCCS counts of subforms)
"""
if
not
details
:
# simple contents
...
...
@@ -86,12 +88,12 @@ def _query_grouped_ngrams(groupings_id, details=False, scoring_metric_id=None):
.
query
(
NodeNgramNgram
.
ngram2_id
,
Ngram
.
terms
,
NodeNodeNgram
.
score
# NodeNodeNgram.score #
)
.
join
(
Ngram
,
NodeNgramNgram
.
ngram2_id
==
Ngram
.
id
)
.
join
(
NodeNodeNgram
,
NodeNgramNgram
.
ngram2_id
==
NodeNodeNgram
.
ngram_id
)
.
filter
(
NodeNodeNgram
.
node1_id
==
scoring_metric_id
)
.
order_by
(
desc
(
NodeNodeNgram
.
score
))
#
.join(NodeNodeNgram, NodeNgramNgram.ngram2_id == NodeNodeNgram.ngram_id)
#
.filter(NodeNodeNgram.node1_id == scoring_metric_id)
#
.order_by(desc(NodeNodeNgram.score))
)
# main filter
...
...
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