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
147
Issues
147
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
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
961c0068
Commit
961c0068
authored
Jun 28, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PHYLO] implementation to Garg Flow (main fun ok).
parent
8aa7050d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
8 deletions
+36
-8
Tools.hs
src/Gargantext/API/Ngrams/Tools.hs
+14
-0
List.hs
src/Gargantext/Text/List.hs
+4
-4
BranchMaker.hs
src/Gargantext/Viz/Phylo/BranchMaker.hs
+1
-1
Tools.hs
src/Gargantext/Viz/Phylo/Tools.hs
+17
-3
No files found.
src/Gargantext/API/Ngrams/Tools.hs
View file @
961c0068
...
...
@@ -49,6 +49,20 @@ getListNgrams nodeIds ngramsType = do
pure
ngrams
getTermsWith
::
RepoCmdM
env
err
m
=>
[
ListId
]
->
NgramsType
->
ListType
->
m
(
Map
Text
[
Text
])
getTermsWith
ls
ngt
lt
=
Map
.
fromListWith
(
<>
)
<$>
map
toTree
<$>
Map
.
toList
<$>
Map
.
filter
(
\
f
->
(
fst
f
)
==
lt
)
<$>
mapTermListRoot
ls
ngt
where
toTree
(
t
,
(
_lt
,
maybeRoot
))
=
case
maybeRoot
of
Nothing
->
(
t
,
[]
)
Just
r
->
(
r
,
[
t
])
mapTermListRoot
::
RepoCmdM
env
err
m
=>
[
ListId
]
->
NgramsType
->
m
(
Map
Text
(
ListType
,
(
Maybe
Text
)))
...
...
src/Gargantext/Text/List.hs
View file @
961c0068
...
...
@@ -99,10 +99,10 @@ buildNgramsTermsList' uCid groupIt stop gls is = do
(
maps
,
candidates'
)
=
takeScored
gls
is
$
getCoocByNgrams'
snd
(
Diagonal
True
)
$
Map
.
fromList
candidates
toList'
t
=
(
fst
t
,
(
fromIntegral
$
Set
.
size
$
snd
$
snd
t
,
fst
$
snd
t
))
(
s
,
c
,
m
)
=
(
stops
,
List
.
filter
(
\
(
k
,
_
)
->
List
.
elem
k
candidates'
)
candidates
,
List
.
filter
(
\
(
k
,
_
)
->
List
.
elem
k
maps
)
candidates
...
...
@@ -116,7 +116,7 @@ buildNgramsTermsList' uCid groupIt stop gls is = do
pure
$
Map
.
fromList
[(
NgramsTerms
,
ngs'
)]
buildNgramsTermsList
::
Lang
->
Int
->
Int
->
StopSize
->
UserCorpusId
->
MasterCorpusId
->
Cmd
err
(
Map
NgramsType
[
NgramsElement
])
buildNgramsTermsList
l
n
m
s
uCid
mCid
=
do
...
...
src/Gargantext/Viz/Phylo/BranchMaker.hs
View file @
961c0068
...
...
@@ -149,4 +149,4 @@ setPhyloBranches lvl p = alterGroupWithLevel (\g ->
--------------------------------------
-- trace' bs = trace bs
\ No newline at end of file
-- trace' bs = trace bs
src/Gargantext/Viz/Phylo/Tools.hs
View file @
961c0068
...
...
@@ -878,13 +878,27 @@ defaultWeightedLogJaccard :: Proximity
defaultWeightedLogJaccard
=
WeightedLogJaccard
(
initWeightedLogJaccard
Nothing
Nothing
)
-- Queries
type
Title
=
Text
type
Desc
=
Text
defaultQueryBuild
::
PhyloQueryBuild
defaultQueryBuild
=
initPhyloQueryBuild
"Cesar et Cleôpatre"
"An example of Phylomemy (french without accent)"
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
defaultQueryBuild
=
defaultQueryBuild'
"Cesar et Cleôpatre"
"An example of Phylomemy (french without accent)"
defaultQueryBuild'
::
Title
->
Desc
->
PhyloQueryBuild
defaultQueryBuild'
t
d
=
initPhyloQueryBuild
t
d
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
defaultQueryView
::
PhyloQueryView
defaultQueryView
=
initPhyloQueryView
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
defaultQueryView
=
initPhyloQueryView
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
-- Software
...
...
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