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
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
Julien Moutinho
haskell-gargantext
Commits
74ee77a3
Commit
74ee77a3
authored
Jan 20, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[GRAPH][COOC] Database mainly.
parent
71378e8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
Count.hs
src/Gargantext/Text/Metrics/Count.hs
+1
-0
Graph.hs
src/Gargantext/Viz/Graph.hs
+4
-4
No files found.
src/Gargantext/Text/Metrics/Count.hs
View file @
74ee77a3
...
...
@@ -121,6 +121,7 @@ coocOn' fun ts = DMS.fromListWith (+) xs
,
x
>=
y
]
------------------------------------------------------------------------
coocOnContexts
::
(
a
->
[
Text
])
->
[[
a
]]
->
Map
([
Text
],
[
Text
])
Int
...
...
src/Gargantext/Viz/Graph.hs
View file @
74ee77a3
...
...
@@ -59,8 +59,8 @@ $(deriveJSON (unPrefix "") ''Attributes)
instance
ToSchema
Attributes
data
Node
=
Node
{
node_size
::
Int
,
node_type
::
TypeNode
,
node_id
::
Text
,
node_type
::
TypeNode
-- TODO NgramsType | Person
,
node_id
::
Text
-- TODO NgramId
,
node_label
::
Text
,
node_attributes
::
Attributes
}
...
...
@@ -173,9 +173,9 @@ data2graph labels coocs distance partitions = Graph nodes edges Nothing
community_id_by_node_id
=
M
.
fromList
[
(
n
,
c
)
|
LouvainNode
n
c
<-
partitions
]
nodes
=
[
Node
{
node_size
=
maybe
0
identity
(
M
.
lookup
(
n
,
n
)
coocs
)
,
node_type
=
Terms
-- or Unknown
,
node_id
=
cs
(
show
n
)
,
node_id
=
cs
(
show
n
)
,
node_label
=
T
.
unwords
l
,
node_attributes
=
,
node_attributes
=
Attributes
{
clust_default
=
maybe
0
identity
(
M
.
lookup
n
community_id_by_node_id
)
}
}
|
(
l
,
n
)
<-
labels
]
...
...
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