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
153
Issues
153
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
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
a458c7a0
Commit
a458c7a0
authored
Mar 20, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CLEAN] Tools Graph
parent
7442b3e6
Pipeline
#3783
failed with stage
in 31 minutes and 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
32 deletions
+2
-32
gargantext.cabal
gargantext.cabal
+1
-1
Tools.hs
src/Gargantext/Core/Viz/Graph/Tools.hs
+1
-31
No files found.
gargantext.cabal
View file @
a458c7a0
...
...
@@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack
name: gargantext
version: 0.0.6.9.7.6
version:
0.0.6.9.7.6
synopsis: Search, map, share
description: Please see README.md
category: Data
...
...
src/Gargantext/Core/Viz/Graph/Tools.hs
View file @
a458c7a0
...
...
@@ -117,12 +117,11 @@ cooc2graphWith' :: Partitions
->
Strength
->
HashMap
(
NgramsTerm
,
NgramsTerm
)
Int
->
IO
Graph
cooc2graphWith'
_doPartitions
_bridgenessMethod
multi
similarity
@
Conditional
threshold
strength
myCooc
=
do
cooc2graphWith'
_doPartitions
_bridgenessMethod
multi
similarity
threshold
strength
myCooc
=
do
let
(
distanceMap
,
diag
,
ti
)
=
doSimilarityMap
similarity
threshold
strength
myCooc
distanceMap
`
seq
`
diag
`
seq
`
ti
`
seq
`
return
()
partitions
<-
if
(
Map
.
size
distanceMap
>
0
)
-- then recursiveClustering doPartitions distanceMap
then
recursiveClustering'
(
spinglass'
1
)
distanceMap
else
panic
$
Text
.
unlines
[
"[Gargantext.C.V.Graph.Tools] Similarity Matrix is empty"
,
"Maybe you should add more Map Terms in your list"
...
...
@@ -133,35 +132,7 @@ cooc2graphWith' _doPartitions _bridgenessMethod multi similarity@Conditional thr
let
!
confluence'
=
BAC
.
computeConfluences
3
(
Map
.
keys
distanceMap
)
True
!
bridgeness'
=
bridgeness
(
Bridgeness_Recursive
partitions
1.0
similarity
)
distanceMap
{-
!bridgeness' = if bridgenessMethod == BridgenessMethod_Basic
then bridgeness (Bridgeness_Basic partitions 1.0) distanceMap
else bridgeness (Bridgeness_Advanced similarity confluence') distanceMap
-}
pure
$
data2graph
multi
ti
diag
bridgeness'
confluence'
(
setNodes2clusterNodes
$
List
.
concat
partitions
)
cooc2graphWith'
_doPartitions
_bridgenessMethod
multi
similarity
@
Distributional
threshold
strength
myCooc
=
do
let
(
distanceMap
,
diag
,
ti
)
=
doSimilarityMap
Distributional
threshold
strength
myCooc
distanceMap
`
seq
`
diag
`
seq
`
ti
`
seq
`
return
()
partitions
<-
if
(
Map
.
size
distanceMap
>
0
)
--then recursiveClustering doPartitions distanceMap
then
recursiveClustering'
(
spinglass'
1
)
distanceMap
else
panic
$
Text
.
unlines
[
"[Gargantext.C.V.Graph.Tools] Similarity Matrix is empty"
,
"Maybe you should add more Map Terms in your list"
,
"Tutorial: TODO"
]
length
partitions
`
seq
`
return
()
let
!
confluence'
=
BAC
.
computeConfluences
3
(
Map
.
keys
distanceMap
)
True
!
bridgeness'
=
bridgeness
(
Bridgeness_Recursive
partitions
1.0
similarity
)
distanceMap
{-
!bridgeness' = if bridgenessMethod == BridgenessMethod_Basic
then bridgeness (Bridgeness_Basic partitions 1.0) distanceMap
else bridgeness (Bridgeness_Advanced Distributional confluence') distanceMap
pure $ data2graph multi ti diag bridgeness' confluence' partitions
-}
pure
$
data2graph
multi
ti
diag
bridgeness'
confluence'
(
setNodes2clusterNodes
$
List
.
concat
partitions
)
...
...
@@ -239,7 +210,6 @@ nodeTypeWith (MultiPartite (Partite s1 t1) (Partite _s2 t2)) t =
then
t1
else
t2
data2graph
::
MultiPartite
->
Map
NgramsTerm
Int
->
Map
(
Int
,
Int
)
Occurrences
...
...
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