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
e1b6117a
Commit
e1b6117a
authored
Feb 11, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] FlowPhylo implemented
parent
25cdbe65
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
135 additions
and
123 deletions
+135
-123
List.hs
src/Gargantext/API/Ngrams/List.hs
+4
-9
Prelude.hs
src/Gargantext/API/Ngrams/Prelude.hs
+20
-1
PhyloExport.hs
src/Gargantext/Core/Viz/Phylo/PhyloExport.hs
+111
-111
PhyloMaker.hs
src/Gargantext/Core/Viz/Phylo/PhyloMaker.hs
+0
-2
No files found.
src/Gargantext/API/Ngrams/List.hs
View file @
e1b6117a
...
...
@@ -19,15 +19,16 @@ import Control.Lens hiding (elements, Indexed)
import
Data.Aeson
import
Data.Either
(
Either
(
..
))
import
Data.HashMap.Strict
(
HashMap
)
import
Data.Map
(
Map
,
toList
,
fromList
)
import
Data.Map
(
Map
,
toList
)
import
Data.Maybe
(
catMaybes
)
import
Data.Set
(
Set
)
import
Data.Text
(
Text
,
concat
,
pack
)
import
Data.Vector
(
Vector
)
import
Gargantext.API.Admin.Orchestrator.Types
import
Gargantext.API.Ngrams
(
getNgramsTableMap
,
setListNgrams
)
import
Gargantext.API.Ngrams
(
setListNgrams
)
import
Gargantext.API.Ngrams.Tools
(
getTermsWith
)
import
Gargantext.API.Ngrams.Types
import
Gargantext.API.Ngrams.Prelude
(
getNgramsList
)
import
Gargantext.API.Ngrams.List.Types
import
Gargantext.API.Prelude
(
GargServer
)
import
Gargantext.Core.NodeStory
...
...
@@ -110,7 +111,7 @@ csvApi = csvPostAsync
get
::
HasNodeStory
env
err
m
=>
ListId
->
m
(
Headers
'[
H
eader
"Content-Disposition"
Text
]
NgramsList
)
get
lId
=
do
lst
<-
get
'
lId
lst
<-
get
NgramsList
lId
let
(
NodeId
id'
)
=
lId
return
$
addHeader
(
concat
[
"attachment; filename=GarganText_NgramsList-"
,
pack
$
show
id'
...
...
@@ -118,12 +119,6 @@ get lId = do
]
)
lst
get'
::
HasNodeStory
env
err
m
=>
ListId
->
m
NgramsList
get'
lId
=
fromList
<$>
zip
ngramsTypes
<$>
mapM
(
getNgramsTableMap
lId
)
ngramsTypes
------------------------------------------------------------------------
-- TODO : purge list
-- TODO talk
...
...
src/Gargantext/API/Ngrams/Prelude.hs
View file @
e1b6117a
...
...
@@ -16,19 +16,38 @@ module Gargantext.API.Ngrams.Prelude
import
Data.Maybe
(
catMaybes
)
import
Control.Lens
(
view
)
import
Data.Map
(
fromList
)
import
Data.Hashable
(
Hashable
)
import
Data.Validity
import
Gargantext.API.Ngrams.Types
import
Gargantext.Core.Types
(
ListType
)
import
Gargantext.Database.Schema.Ngrams
(
NgramsType
)
import
Gargantext.Database.Schema.Ngrams
(
NgramsType
,
ngramsTypes
)
import
Gargantext.Prelude
import
Gargantext.Core.Text.List.Social.Prelude
import
Gargantext.API.Ngrams
(
getNgramsTableMap
)
import
Gargantext.Core.Text.Context
(
TermList
)
import
Gargantext.Core.NodeStory
(
HasNodeStory
)
import
Gargantext.Database.Admin.Types.Node
(
ListId
)
import
qualified
Data.HashMap.Strict
as
HM
import
qualified
Data.Map.Strict
as
Map
import
qualified
Data.List
as
List
import
qualified
Data.Text
as
Text
------------------------------------------------------------------------
getNgramsList
::
HasNodeStory
env
err
m
=>
ListId
->
m
NgramsList
getNgramsList
lId
=
fromList
<$>
zip
ngramsTypes
<$>
mapM
(
getNgramsTableMap
lId
)
ngramsTypes
getTermList
::
HasNodeStory
env
err
m
=>
ListId
->
ListType
->
NgramsType
->
m
(
Maybe
TermList
)
getTermList
lId
listType
ngramsType
=
do
ngramsList
<-
getNgramsList
lId
pure
$
toTermList
listType
ngramsType
ngramsList
------------------------------------------------------------------------
-- | Tools
-- Usage example: toTermList MapTerm NgramsTerms ngramsList
...
...
src/Gargantext/Core/Viz/Phylo/PhyloExport.hs
View file @
e1b6117a
This diff is collapsed.
Click to expand it.
src/Gargantext/Core/Viz/Phylo/PhyloMaker.hs
View file @
e1b6117a
...
...
@@ -67,11 +67,9 @@ toPhylo phyloStep = trace ("# phylo1 groups " <> show(length $ getGroupsFromLeve
--------------------------------------
phylo1
::
Phylo
phylo1
=
toPhylo1
phyloStep
-- > AD to db here
--------------------------------------
--------------------
-- | To Phylo 1 | --
--------------------
...
...
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