Commit 77ef97c9 authored by Romain Loth's avatar Romain Loth

Merge branch 'testing' into romain-testing

parents e865d164 27586e5d
......@@ -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)
......
......@@ -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()
......
......@@ -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])
......
This diff is collapsed.
......@@ -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>
......
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