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
77ef97c9
Commit
77ef97c9
authored
Oct 03, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'testing' into romain-testing
parents
e865d164
27586e5d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
160 additions
and
91 deletions
+160
-91
cooccurrences.py
graph/cooccurrences.py
+3
-4
graph.py
graph/graph.py
+5
-0
views.py
graph/views.py
+0
-3
myGraphs.html
templates/pages/corpora/myGraphs.html
+151
-83
menu.html
templates/pages/menu.html
+1
-1
No files found.
graph/cooccurrences.py
View file @
77ef97c9
...
...
@@ -219,10 +219,9 @@ def countCooccurrences( corpus_id=None , cooc_id=None
print
(
"GRAPH #
%
s ... Parameters saved in Node."
%
cooc_id
)
coocNode
=
session
.
query
(
Node
)
.
filter
(
Node
.
id
==
cooc_id
)
.
first
()
coocNode
.
hyperdata
[
distance
]
=
dict
()
coocNode
.
hyperdata
[
distance
][
"parameters"
]
=
parameters
session
.
add
(
coocNode
)
coocNode
.
hyperdata
[
"parameters"
]
=
dict
()
coocNode
.
hyperdata
[
"parameters"
]
=
parameters
coocNode
.
save_hyperdata
()
session
.
commit
()
#data = cooc2graph(coocNode.id, cooc, distance=distance, bridgeness=bridgeness)
...
...
graph/graph.py
View file @
77ef97c9
...
...
@@ -69,9 +69,14 @@ def compute_graph( corpus_id=None , cooc_id=None
node
=
session
.
query
(
Node
)
.
filter
(
Node
.
id
==
cooc_id
)
.
first
()
if
node
.
hyperdata
.
get
(
distance
,
None
)
is
None
:
print
(
"GRAPH #
%
d ... Distance
%
s has not been computed already."
%
(
cooc_id
,
distance
))
node
.
hyperdata
[
distance
]
=
dict
()
node
.
hyperdata
[
distance
][
bridgeness
]
=
data
node
.
hyperdata
[
distance
][
"nodes"
]
=
len
(
G
.
nodes
())
node
.
hyperdata
[
distance
][
"edges"
]
=
len
(
G
.
edges
())
node
.
save_hyperdata
()
session
.
commit
()
...
...
graph/views.py
View file @
77ef97c9
...
...
@@ -75,9 +75,6 @@ def myGraphs(request, project_id, corpus_id):
.
all
()
)
#for n in cooc_nodes:
# print(n)
#coocs_count[cooc.id] = len(cooc_nodes)
coocs_count
[
cooc
.
id
]
=
len
([
cooc_node
for
cooc_node
in
cooc_nodes
if
cooc_node
[
1
]
>
1
])
...
...
templates/pages/corpora/myGraphs.html
View file @
77ef97c9
This diff is collapsed.
Click to expand it.
templates/pages/menu.html
View file @
77ef97c9
...
...
@@ -294,7 +294,7 @@
<p>
Gargantext
<span
class=
"glyphicon glyphicon-registration-mark"
aria-hidden=
"true"
></span>
, version 3.0.5.
5
,
, version 3.0.5.
6
,
<a
href=
"http://www.cnrs.fr"
target=
"blank"
title=
"Institution that enables this project."
>
Copyrights
<span
class=
"glyphicon glyphicon-copyright-mark"
aria-hidden=
"true"
></span>
...
...
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