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
Christian Merten
haskell-gargantext
Commits
82bfdeec
Commit
82bfdeec
authored
Mar 25, 2024
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use tracePhylo in PhyloMaker
parent
ad332461
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
PhyloExport.hs
src/Gargantext/Core/Viz/Phylo/PhyloExport.hs
+1
-1
PhyloMaker.hs
src/Gargantext/Core/Viz/Phylo/PhyloMaker.hs
+7
-7
No files found.
.gitlab-ci.yml
View file @
82bfdeec
...
@@ -37,7 +37,7 @@ cabal:
...
@@ -37,7 +37,7 @@ cabal:
-
.cabal/
-
.cabal/
policy
:
pull-push
policy
:
pull-push
script
:
script
:
-
nix-shell --run "./bin/update-project-dependencies $CABAL_STORE_DIR && cabal --store-dir=$CABAL_STORE_DIR v2-build --flags
test-crypto
--ghc-options='-O0 -fclear-plugins'"
-
nix-shell --run "./bin/update-project-dependencies $CABAL_STORE_DIR && cabal --store-dir=$CABAL_STORE_DIR v2-build --flags
'test-crypto no-phylo-debug-logs'
--ghc-options='-O0 -fclear-plugins'"
allow_failure
:
false
allow_failure
:
false
bench
:
bench
:
...
...
src/Gargantext/Core/Viz/Phylo/PhyloExport.hs
View file @
82bfdeec
...
@@ -179,7 +179,7 @@ toBid g bs =
...
@@ -179,7 +179,7 @@ toBid g bs =
exportToDot
::
Phylo
->
PhyloExport
->
DotGraph
DotId
exportToDot
::
Phylo
->
PhyloExport
->
DotGraph
DotId
exportToDot
phylo
export
=
exportToDot
phylo
export
=
trace
(
"
\n
-- | Convert "
<>
show
(
length
$
export
^.
export_branches
)
<>
" branches and "
trace
Phylo
(
"
\n
-- | Convert "
<>
show
(
length
$
export
^.
export_branches
)
<>
" branches and "
<>
show
(
length
$
export
^.
export_groups
)
<>
" groups "
<>
show
(
length
$
export
^.
export_groups
)
<>
" groups "
<>
show
(
length
$
nub
$
concat
$
map
(
^.
phylo_groupNgrams
)
$
export
^.
export_groups
)
<>
show
(
length
$
nub
$
concat
$
map
(
^.
phylo_groupNgrams
)
$
export
^.
export_groups
)
<>
" terms to a dot file
\n\n
"
<>
" terms to a dot file
\n\n
"
...
...
src/Gargantext/Core/Viz/Phylo/PhyloMaker.hs
View file @
82bfdeec
...
@@ -192,7 +192,7 @@ findSeaLadder phylo = case getSeaElevation phylo of
...
@@ -192,7 +192,7 @@ findSeaLadder phylo = case getSeaElevation phylo of
appendGroups
::
(
a
->
Period
->
(
Text
,
Text
)
->
Scale
->
Int
->
[
Cooc
]
->
Map
Int
Double
->
PhyloGroup
)
->
Scale
->
Map
(
Date
,
Date
)
[
a
]
->
Phylo
->
Phylo
appendGroups
::
(
a
->
Period
->
(
Text
,
Text
)
->
Scale
->
Int
->
[
Cooc
]
->
Map
Int
Double
->
PhyloGroup
)
->
Scale
->
Map
(
Date
,
Date
)
[
a
]
->
Phylo
->
Phylo
appendGroups
f
lvl
m
phylo
=
appendGroups
f
lvl
m
phylo
=
trace
(
"
\n
"
<>
"-- | Append "
trace
Phylo
(
"
\n
"
<>
"-- | Append "
<>
show
(
length
$
concat
$
elems
m
)
<>
show
(
length
$
concat
$
elems
m
)
<>
" groups to scale "
<>
" groups to scale "
<>
show
(
lvl
)
<>
"
\n
"
::
Text
)
<>
show
(
lvl
)
<>
"
\n
"
::
Text
)
...
@@ -381,7 +381,7 @@ docsToTimeScaleCooc docs fdt =
...
@@ -381,7 +381,7 @@ docsToTimeScaleCooc docs fdt =
mCooc'
=
fromList
mCooc'
=
fromList
$
map
(
\
t
->
(
t
,
empty
))
$
map
(
\
t
->
(
t
,
empty
))
$
toTimeScale
(
map
date
docs
)
1
$
toTimeScale
(
map
date
docs
)
1
in
trace
(
"
\n
"
<>
"-- | Build the coocurency matrix for "
in
trace
Phylo
(
"
\n
"
<>
"-- | Build the coocurency matrix for "
<>
show
(
length
$
keys
mCooc'
)
<>
show
(
length
$
keys
mCooc'
)
<>
" unit of time"
<>
"
\n
"
::
Text
)
<>
" unit of time"
<>
"
\n
"
::
Text
)
$
unionWith
sumCooc
mCooc
mCooc'
$
unionWith
sumCooc
mCooc
mCooc'
...
@@ -407,7 +407,7 @@ groupDocsByPeriod' :: (NFData doc, Ord date, Enum date) => (doc -> date) -> [(da
...
@@ -407,7 +407,7 @@ groupDocsByPeriod' :: (NFData doc, Ord date, Enum date) => (doc -> date) -> [(da
groupDocsByPeriod'
f
pds
docs
=
groupDocsByPeriod'
f
pds
docs
=
let
docs'
=
groupBy
(
\
d
d'
->
f
d
==
f
d'
)
$
sortOn
f
docs
let
docs'
=
groupBy
(
\
d
d'
->
f
d
==
f
d'
)
$
sortOn
f
docs
periods
=
parMap
rpar
(
inPeriode
f
docs'
)
pds
periods
=
parMap
rpar
(
inPeriode
f
docs'
)
pds
in
trace
(
"
\n
"
<>
"-- | Group "
in
trace
Phylo
(
"
\n
"
<>
"-- | Group "
<>
show
(
length
docs
)
<>
show
(
length
docs
)
<>
" docs by "
<>
" docs by "
<>
show
(
length
pds
)
<>
" periods"
<>
"
\n
"
::
Text
)
<>
show
(
length
pds
)
<>
" periods"
<>
"
\n
"
::
Text
)
...
@@ -426,7 +426,7 @@ groupDocsByPeriod _ _ [] = panic "[ERR][Viz.Phylo.PhyloMaker] Empty [Documents
...
@@ -426,7 +426,7 @@ groupDocsByPeriod _ _ [] = panic "[ERR][Viz.Phylo.PhyloMaker] Empty [Documents
groupDocsByPeriod
f
pds
es
=
groupDocsByPeriod
f
pds
es
=
let
periods
=
parMap
rpar
(
inPeriode
f
es
)
pds
let
periods
=
parMap
rpar
(
inPeriode
f
es
)
pds
in
trace
(
"
\n
"
<>
"-- | Group "
in
trace
Phylo
(
"
\n
"
<>
"-- | Group "
<>
show
(
length
es
)
<>
" docs by "
<>
show
(
length
es
)
<>
" docs by "
<>
show
(
length
pds
)
<>
" periods"
<>
"
\n
"
::
Text
)
<>
show
(
length
pds
)
<>
" periods"
<>
"
\n
"
::
Text
)
$
fromList
$
zip
pds
periods
$
fromList
$
zip
pds
periods
...
@@ -483,7 +483,7 @@ docsToTimeScaleNb :: [Document] -> Map Date Double
...
@@ -483,7 +483,7 @@ docsToTimeScaleNb :: [Document] -> Map Date Double
docsToTimeScaleNb
docs
=
docsToTimeScaleNb
docs
=
let
docs'
=
fromListWith
(
+
)
$
map
(
\
d
->
(
date
d
,
1
))
docs
let
docs'
=
fromListWith
(
+
)
$
map
(
\
d
->
(
date
d
,
1
))
docs
time
=
fromList
$
map
(
\
t
->
(
t
,
0
))
$
toTimeScale
(
keys
docs'
)
1
time
=
fromList
$
map
(
\
t
->
(
t
,
0
))
$
toTimeScale
(
keys
docs'
)
1
in
trace
(
"
\n
"
<>
"-- | Group "
in
trace
Phylo
(
"
\n
"
<>
"-- | Group "
<>
show
(
length
docs
)
<>
show
(
length
docs
)
<>
" docs by "
<>
" docs by "
<>
show
(
length
time
)
<>
show
(
length
time
)
...
@@ -539,9 +539,9 @@ initPhylo docs conf =
...
@@ -539,9 +539,9 @@ initPhylo docs conf =
then
defaultPhyloParam
{
_phyloParam_config
=
setDefault
conf
timeScale
(
length
docs
)
}
then
defaultPhyloParam
{
_phyloParam_config
=
setDefault
conf
timeScale
(
length
docs
)
}
else
defaultPhyloParam
{
_phyloParam_config
=
conf
}
else
defaultPhyloParam
{
_phyloParam_config
=
conf
}
periods
=
toPeriods
(
D
.
sort
$
D
.
nub
$
map
date
docs
)
(
getTimePeriod
timeScale
)
(
getTimeStep
timeScale
)
periods
=
toPeriods
(
D
.
sort
$
D
.
nub
$
map
date
docs
)
(
getTimePeriod
timeScale
)
(
getTimeStep
timeScale
)
in
trace
(
"
\n
"
<>
"-- | Init a phylo out of "
in
trace
Phylo
(
"
\n
"
<>
"-- | Init a phylo out of "
<>
show
(
length
docs
)
<>
" docs
\n
"
::
Text
)
<>
show
(
length
docs
)
<>
" docs
\n
"
::
Text
)
$
trace
(
"
\n
"
<>
"-- | lambda "
$
trace
Phylo
(
"
\n
"
<>
"-- | lambda "
<>
show
(
_qua_granularity
$
phyloQuality
$
_phyloParam_config
params
)
::
Text
)
<>
show
(
_qua_granularity
$
phyloQuality
$
_phyloParam_config
params
)
::
Text
)
$
Phylo
foundations
$
Phylo
foundations
docsSources
docsSources
...
...
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