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
7718b763
Commit
7718b763
authored
Sep 20, 2016
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Number of nodes / graph (need to be checked).
parent
90f232e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
views.py
graph/views.py
+3
-3
No files found.
graph/views.py
View file @
7718b763
...
@@ -61,14 +61,14 @@ def myGraphs(request, project_id, corpus_id):
...
@@ -61,14 +61,14 @@ def myGraphs(request, project_id, corpus_id):
coocs_count
=
dict
()
coocs_count
=
dict
()
for
cooc
in
coocs
:
for
cooc
in
coocs
:
# FIXME : approximativ number of nodes (not exactly what user sees in explorer)
# FIXME : approximativ number of nodes (not exactly what user sees in explorer)
cooc_nodes
=
(
session
.
query
(
Ngram
)
cooc_nodes
=
(
session
.
query
(
Ngram
.
id
)
.
join
(
NodeNgramNgram
,
NodeNgramNgram
.
ngram1_id
==
Ngram
.
id
)
.
join
(
NodeNgramNgram
,
NodeNgramNgram
.
ngram1_id
==
Ngram
.
id
)
.
filter
(
NodeNgramNgram
.
node_id
==
cooc
.
id
)
.
filter
(
NodeNgramNgram
.
node_id
==
cooc
.
id
)
.
filter
(
NodeNgramNgram
.
weight
>
0
)
.
filter
(
NodeNgramNgram
.
weight
>
0
)
.
all
()
.
all
()
)
)
coocs_count
[
cooc
.
id
]
=
len
(
cooc_nodes
)
#coocs_count[cooc.id] = len(list(set(cooc_nodes)
))
coocs_count
[
cooc
.
id
]
=
len
(
set
(
cooc_nodes
))
return
render
(
return
render
(
template_name
=
'pages/corpora/myGraphs.html'
,
template_name
=
'pages/corpora/myGraphs.html'
,
...
...
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