Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
cafa3ccd
Commit
cafa3ccd
authored
Oct 21, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graph] some more ngrams children work in graph
parent
8fab2571
Pipeline
#1994
failed with stage
in 10 minutes and 20 seconds
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
23 deletions
+47
-23
Graph.hs
src/Gargantext/Core/Viz/Graph.hs
+35
-11
API.hs
src/Gargantext/Core/Viz/Graph/API.hs
+2
-2
Tools.hs
src/Gargantext/Core/Viz/Graph/Tools.hs
+10
-10
No files found.
src/Gargantext/Core/Viz/Graph.hs
View file @
cafa3ccd
This diff is collapsed.
Click to expand it.
src/Gargantext/Core/Viz/Graph/API.hs
View file @
cafa3ccd
...
@@ -188,11 +188,11 @@ computeGraph cId d nt repo = do
...
@@ -188,11 +188,11 @@ computeGraph cId d nt repo = do
-- printDebug "myCooc" myCooc
-- printDebug "myCooc" myCooc
-- saveAsFileDebug "debug/my-cooc" myCooc
-- saveAsFileDebug "debug/my-cooc" myCooc
listNgrams
<-
getListNgrams
[
lId
]
NgramsTerms
listNgrams
<-
getListNgrams
[
lId
]
nt
graph
<-
liftBase
$
cooc2graphWith
Spinglass
d
0
myCooc
graph
<-
liftBase
$
cooc2graphWith
Spinglass
d
0
myCooc
-- saveAsFileDebug "debug/graph" graph
-- saveAsFileDebug "debug/graph" graph
pure
$
set
graph_ngrams
(
Just
listNgrams
)
graph
pure
$
mergeGraphNgrams
graph
(
Just
listNgrams
)
defaultGraphMetadata
::
HasNodeError
err
defaultGraphMetadata
::
HasNodeError
err
...
...
src/Gargantext/Core/Viz/Graph/Tools.hs
View file @
cafa3ccd
...
@@ -207,22 +207,22 @@ data2graph :: ToComId a
...
@@ -207,22 +207,22 @@ data2graph :: ToComId a
->
Graph
->
Graph
data2graph
labels
coocs
bridge
conf
partitions
=
Graph
{
_graph_nodes
=
nodes
data2graph
labels
coocs
bridge
conf
partitions
=
Graph
{
_graph_nodes
=
nodes
,
_graph_edges
=
edges
,
_graph_edges
=
edges
,
_graph_metadata
=
Nothing
,
_graph_metadata
=
Nothing
}
,
_graph_ngrams
=
Nothing
}
where
where
community_id_by_node_id
=
Map
.
fromList
$
map
nodeId2comId
partitions
community_id_by_node_id
=
Map
.
fromList
$
map
nodeId2comId
partitions
nodes
=
map
(
setCoord
ForceAtlas
labels
bridge
)
nodes
=
map
(
setCoord
ForceAtlas
labels
bridge
)
[
(
n
,
Node
{
node_size
=
maybe
0
identity
(
Map
.
lookup
(
n
,
n
)
coocs
)
[
(
n
,
Node
{
node_size
=
maybe
0
identity
(
Map
.
lookup
(
n
,
n
)
coocs
)
,
node_type
=
Terms
-- or Unknown
,
node_type
=
Terms
-- or Unknown
,
node_id
=
cs
(
show
n
)
,
node_id
=
cs
(
show
n
)
,
node_label
=
l
,
node_label
=
l
,
node_x_coord
=
0
,
node_x_coord
=
0
,
node_y_coord
=
0
,
node_y_coord
=
0
,
node_attributes
=
,
node_attributes
=
Attributes
{
clust_default
=
maybe
0
identity
Attributes
{
clust_default
=
maybe
0
identity
(
Map
.
lookup
n
community_id_by_node_id
)
}
}
(
Map
.
lookup
n
community_id_by_node_id
)
}
,
node_children
=
[]
}
)
)
|
(
l
,
n
)
<-
labels
|
(
l
,
n
)
<-
labels
,
Set
.
member
n
$
Set
.
fromList
,
Set
.
member
n
$
Set
.
fromList
...
...
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