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
bf1098d5
Commit
bf1098d5
authored
Sep 17, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DOC] fix haddock errors
parent
c88689c3
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
27 deletions
+23
-27
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+2
-2
Public.hs
src/Gargantext/API/Public.hs
+1
-1
Learn.hs
src/Gargantext/Core/Text/List/Learn.hs
+3
-6
Metrics.hs
src/Gargantext/Core/Text/Metrics.hs
+11
-12
Matrice.hs
src/Gargantext/Core/Viz/Graph/Distances/Matrice.hs
+2
-2
PhyloExport.hs
src/Gargantext/Core/Viz/Phylo/PhyloExport.hs
+1
-1
PhyloTools.hs
src/Gargantext/Core/Viz/Phylo/PhyloTools.hs
+2
-2
TemporalMatching.hs
src/Gargantext/Core/Viz/Phylo/TemporalMatching.hs
+1
-1
No files found.
src/Gargantext/API/Ngrams.hs
View file @
bf1098d5
...
@@ -854,8 +854,8 @@ ngramsStatePatchConflictResolution
...
@@ -854,8 +854,8 @@ ngramsStatePatchConflictResolution
->
ConflictResolutionNgramsPatch
->
ConflictResolutionNgramsPatch
ngramsStatePatchConflictResolution
_ngramsType
_nodeId
_ngramsTerm
ngramsStatePatchConflictResolution
_ngramsType
_nodeId
_ngramsTerm
=
(
ours
,
(
const
ours
,
ours
),
(
False
,
False
))
=
(
ours
,
(
const
ours
,
ours
),
(
False
,
False
))
--
^------^------- they mean
that Mod has always priority.
--
(False, False) mean here
that Mod has always priority.
--(True, False) <- would mean priority to the left (same as ours).
--
(True, False) <- would mean priority to the left (same as ours).
-- undefined {- TODO think this through -}, listTypeConflictResolution)
-- undefined {- TODO think this through -}, listTypeConflictResolution)
...
...
src/Gargantext/API/Public.hs
View file @
bf1098d5
...
@@ -50,7 +50,7 @@ selectPublic :: HasNodeError err
...
@@ -50,7 +50,7 @@ selectPublic :: HasNodeError err
=>
Cmd
err
[(
Node
HyperdataFolder
,
Maybe
Int
)]
=>
Cmd
err
[(
Node
HyperdataFolder
,
Maybe
Int
)]
selectPublic
=
selectPublicNodes
selectPublic
=
selectPublicNodes
--
|
For tests only
-- For tests only
-- pure $ replicate 6 defaultPublicData
-- pure $ replicate 6 defaultPublicData
filterPublicDatas
::
[(
Node
HyperdataFolder
,
Maybe
Int
)]
->
[(
Node
HyperdataFolder
,
[
NodeId
])]
filterPublicDatas
::
[(
Node
HyperdataFolder
,
Maybe
Int
)]
->
[(
Node
HyperdataFolder
,
[
NodeId
])]
...
...
src/Gargantext/Core/Text/List/Learn.hs
View file @
bf1098d5
...
@@ -131,6 +131,3 @@ grid s e tr te = do
...
@@ -131,6 +131,3 @@ grid s e tr te = do
--fp <- saveFile (ModelSVM model')
--fp <- saveFile (ModelSVM model')
--save best result
--save best result
pure
$
snd
<$>
r
pure
$
snd
<$>
r
src/Gargantext/Core/Text/Metrics.hs
View file @
bf1098d5
...
@@ -35,7 +35,7 @@ import qualified Data.Map as Map
...
@@ -35,7 +35,7 @@ import qualified Data.Map as Map
import
qualified
Data.Vector.Storable
as
Vec
import
qualified
Data.Vector.Storable
as
Vec
type
Graph
ListSize
=
Int
type
Map
ListSize
=
Int
type
InclusionSize
=
Int
type
InclusionSize
=
Int
{-
{-
...
@@ -73,8 +73,7 @@ localMetrics' m = Map.fromList $ zipWith (\(_,t) (inc,spe) -> (t, Vec.fromList [
...
@@ -73,8 +73,7 @@ localMetrics' m = Map.fromList $ zipWith (\(_,t) (inc,spe) -> (t, Vec.fromList [
$
DAA
.
run
$
DAA
.
run
$
DAA
.
zip
(
DAA
.
use
is
)
(
DAA
.
use
ss
)
$
DAA
.
zip
(
DAA
.
use
is
)
(
DAA
.
use
ss
)
-- TODO Code to be removed below
-- TODO Code to be remove below
-- TODO in the textflow we end up needing these indices , it might be
-- TODO in the textflow we end up needing these indices , it might be
-- better to compute them earlier and pass them around.
-- better to compute them earlier and pass them around.
scored'
::
Ord
t
=>
Map
(
t
,
t
)
Int
->
[
Scored
t
]
scored'
::
Ord
t
=>
Map
(
t
,
t
)
Int
->
[
Scored
t
]
...
@@ -87,20 +86,20 @@ scored' m = zipWith (\(_,t) (inc,spe) -> Scored t (inc) (spe)) (Map.toList fi) s
...
@@ -87,20 +86,20 @@ scored' m = zipWith (\(_,t) (inc,spe) -> Scored t (inc) (spe)) (Map.toList fi) s
$
DAA
.
zip
(
DAA
.
use
is
)
(
DAA
.
use
ss
)
$
DAA
.
zip
(
DAA
.
use
is
)
(
DAA
.
use
ss
)
takeScored
::
Ord
t
=>
Graph
ListSize
->
InclusionSize
->
Map
(
t
,
t
)
Int
->
([
t
],[
t
])
takeScored
::
Ord
t
=>
Map
ListSize
->
InclusionSize
->
Map
(
t
,
t
)
Int
->
([
t
],[
t
])
takeScored
listSize
incSize
=
both
(
map
_scored_terms
)
takeScored
listSize
incSize
=
both
(
map
_scored_terms
)
.
linearTakes
listSize
incSize
_scored_speGen
.
takeLinear
listSize
incSize
_scored_speGen
_scored_incExc
_scored_incExc
.
scored
.
scored
-- | Filter Scored data
-- | Filter Scored data
-- >>>
linearTakes
2 3 fst snd $ Prelude.zip ([1..10] :: [Int]) (reverse $ [1..10] :: [Int])
-- >>>
takeLinear
2 3 fst snd $ Prelude.zip ([1..10] :: [Int]) (reverse $ [1..10] :: [Int])
-- [(3,8),(6,5)]
-- [(3,8),(6,5)]
linearTakes
::
(
Ord
b1
,
Ord
b2
)
takeLinear
::
(
Ord
b1
,
Ord
b2
)
=>
Graph
ListSize
->
InclusionSize
=>
Map
ListSize
->
InclusionSize
->
(
a
->
b2
)
->
(
a
->
b1
)
->
[
a
]
->
([
a
],[
a
])
->
(
a
->
b2
)
->
(
a
->
b1
)
->
[
a
]
->
([
a
],[
a
])
linearTakes
mls
incSize
speGen
incExc
=
(
List
.
splitAt
mls
)
takeLinear
mls
incSize
speGen
incExc
=
(
List
.
splitAt
mls
)
.
List
.
concat
.
List
.
concat
.
map
(
take
$
round
.
map
(
take
$
round
$
(
fromIntegral
mls
::
Double
)
$
(
fromIntegral
mls
::
Double
)
...
...
src/Gargantext/Core/Viz/Graph/Distances/Matrice.hs
View file @
bf1098d5
...
@@ -245,8 +245,8 @@ conditional' m = ( run $ ie $ map fromIntegral $ use m
...
@@ -245,8 +245,8 @@ conditional' m = ( run $ ie $ map fromIntegral $ use m
-- \[N_{m} = \sum_{i,i \neq i}^{m} \sum_{j, j \neq j}^{m} S_{ij}\]
-- \[N_{m} = \sum_{i,i \neq i}^{m} \sum_{j, j \neq j}^{m} S_{ij}\]
--
--
distributional
::
Matrix
Int
->
Matrix
Double
distributional
::
Matrix
Int
->
Matrix
Double
distributional
m
=
run
-- $ matMiniMax
distributional
m
=
-- run {- $ matMiniMax -}
$
diagNull
n
run
$
diagNull
n
$
rIJ
n
$
rIJ
n
$
filterWith
0
100
$
filterWith
0
100
$
filter'
0
$
filter'
0
...
...
src/Gargantext/Core/Viz/Phylo/PhyloExport.hs
View file @
bf1098d5
...
@@ -247,7 +247,7 @@ exportToDot phylo export =
...
@@ -247,7 +247,7 @@ exportToDot phylo export =
toDotEdge
(
groupIdToDotId
k
)
(
groupIdToDotId
k'
)
""
GroupToAncestor
toDotEdge
(
groupIdToDotId
k
)
(
groupIdToDotId
k'
)
""
GroupToAncestor
)
$
mergeAncestors
$
export
^.
export_groups
)
$
mergeAncestors
$
export
^.
export_groups
--
|
10) create the edges between the periods
-- 10) create the edges between the periods
_
<-
mapM
(
\
(
prd
,
prd'
)
->
_
<-
mapM
(
\
(
prd
,
prd'
)
->
toDotEdge
(
periodIdToDotId
prd
)
(
periodIdToDotId
prd'
)
""
PeriodToPeriod
toDotEdge
(
periodIdToDotId
prd
)
(
periodIdToDotId
prd'
)
""
PeriodToPeriod
)
$
nubBy
(
\
combi
combi'
->
fst
combi
==
fst
combi'
)
$
listToCombi'
$
getPeriodIds
phylo
)
$
nubBy
(
\
combi
combi'
->
fst
combi
==
fst
combi'
)
$
listToCombi'
$
getPeriodIds
phylo
...
...
src/Gargantext/Core/Viz/Phylo/PhyloTools.hs
View file @
bf1098d5
...
@@ -417,13 +417,13 @@ mergeMeta bId groups =
...
@@ -417,13 +417,13 @@ mergeMeta bId groups =
groupsToBranches
::
Map
PhyloGroupId
PhyloGroup
->
[[
PhyloGroup
]]
groupsToBranches
::
Map
PhyloGroupId
PhyloGroup
->
[[
PhyloGroup
]]
groupsToBranches
groups
=
groupsToBranches
groups
=
-- | run the related component algorithm
{- run the related component algorithm -}
let
egos
=
map
(
\
g
->
[
getGroupId
g
]
let
egos
=
map
(
\
g
->
[
getGroupId
g
]
++
(
map
fst
$
g
^.
phylo_groupPeriodParents
)
++
(
map
fst
$
g
^.
phylo_groupPeriodParents
)
++
(
map
fst
$
g
^.
phylo_groupPeriodChilds
)
++
(
map
fst
$
g
^.
phylo_groupPeriodChilds
)
++
(
map
fst
$
g
^.
phylo_groupAncestors
))
$
elems
groups
++
(
map
fst
$
g
^.
phylo_groupAncestors
))
$
elems
groups
graph
=
relatedComponents
egos
graph
=
relatedComponents
egos
-- | update each group's branch id
{- update each group's branch id -}
in
map
(
\
ids
->
in
map
(
\
ids
->
let
groups'
=
elems
$
restrictKeys
groups
(
Set
.
fromList
ids
)
let
groups'
=
elems
$
restrictKeys
groups
(
Set
.
fromList
ids
)
bId
=
mergeBranchIds
$
map
(
\
g
->
snd
$
g
^.
phylo_groupBranchId
)
groups'
bId
=
mergeBranchIds
$
map
(
\
g
->
snd
$
g
^.
phylo_groupBranchId
)
groups'
...
...
src/Gargantext/Core/Viz/Phylo/TemporalMatching.hs
View file @
bf1098d5
...
@@ -343,7 +343,7 @@ toPhyloQuality beta freq branches =
...
@@ -343,7 +343,7 @@ toPhyloQuality beta freq branches =
groupsToBranches'
::
Map
PhyloGroupId
PhyloGroup
->
[[
PhyloGroup
]]
groupsToBranches'
::
Map
PhyloGroupId
PhyloGroup
->
[[
PhyloGroup
]]
groupsToBranches'
groups
=
groupsToBranches'
groups
=
-- | run the related component algorithm
{- run the related component algorithm -}
let
egos
=
groupBy
(
\
gs
gs'
->
(
fst
$
fst
$
head'
"egos"
gs
)
==
(
fst
$
fst
$
head'
"egos"
gs'
))
let
egos
=
groupBy
(
\
gs
gs'
->
(
fst
$
fst
$
head'
"egos"
gs
)
==
(
fst
$
fst
$
head'
"egos"
gs'
))
$
sortOn
(
\
gs
->
fst
$
fst
$
head'
"egos"
gs
)
$
sortOn
(
\
gs
->
fst
$
fst
$
head'
"egos"
gs
)
$
map
(
\
group
->
[
getGroupId
group
]
$
map
(
\
group
->
[
getGroupId
group
]
...
...
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