Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Przemyslaw Kaminski
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
Changes
3
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
-- printDebug "myCooc" myCooc
-- saveAsFileDebug "debug/my-cooc" myCooc
listNgrams
<-
getListNgrams
[
lId
]
NgramsTerms
listNgrams
<-
getListNgrams
[
lId
]
nt
graph
<-
liftBase
$
cooc2graphWith
Spinglass
d
0
myCooc
-- saveAsFileDebug "debug/graph" graph
pure
$
set
graph_ngrams
(
Just
listNgrams
)
graph
pure
$
mergeGraphNgrams
graph
(
Just
listNgrams
)
defaultGraphMetadata
::
HasNodeError
err
...
...
src/Gargantext/Core/Viz/Graph/Tools.hs
View file @
cafa3ccd
...
...
@@ -207,22 +207,22 @@ data2graph :: ToComId a
->
Graph
data2graph
labels
coocs
bridge
conf
partitions
=
Graph
{
_graph_nodes
=
nodes
,
_graph_edges
=
edges
,
_graph_metadata
=
Nothing
,
_graph_ngrams
=
Nothing
}
,
_graph_metadata
=
Nothing
}
where
community_id_by_node_id
=
Map
.
fromList
$
map
nodeId2comId
partitions
nodes
=
map
(
setCoord
ForceAtlas
labels
bridge
)
[
(
n
,
Node
{
node_size
=
maybe
0
identity
(
Map
.
lookup
(
n
,
n
)
coocs
)
,
node_type
=
Terms
-- or Unknown
,
node_id
=
cs
(
show
n
)
,
node_label
=
l
,
node_x_coord
=
0
,
node_y_coord
=
0
,
node_attributes
=
Attributes
{
clust_default
=
maybe
0
identity
(
Map
.
lookup
n
community_id_by_node_id
)
}
}
,
node_type
=
Terms
-- or Unknown
,
node_id
=
cs
(
show
n
)
,
node_label
=
l
,
node_x_coord
=
0
,
node_y_coord
=
0
,
node_attributes
=
Attributes
{
clust_default
=
maybe
0
identity
(
Map
.
lookup
n
community_id_by_node_id
)
}
,
node_children
=
[]
}
)
|
(
l
,
n
)
<-
labels
,
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