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
8424db47
Commit
8424db47
authored
Feb 27, 2019
by
Alexandre Delanoë
Committed by
Quentin Lobbé
Mar 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Phylo] Reading cosmetics / New Tools file.
parent
0712ec42
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
116 deletions
+55
-116
Example.hs
src/Gargantext/Viz/Phylo/Example.hs
+52
-31
Tools.hs
src/Gargantext/Viz/Phylo/Tools.hs
+3
-85
No files found.
src/Gargantext/Viz/Phylo/Example.hs
View file @
8424db47
This diff is collapsed.
Click to expand it.
src/Gargantext/Viz/Phylo/Tools.hs
View file @
8424db47
{-|
Module : Gargantext.Viz.Phylo.Tools
Description : Phylomemy
tools
Description : Phylomemy
Tools to build/manage it
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
Phylo Toolbox:
- functions to build a Phylo
- functions to filter the cliques
- functions to manage a Phylo
Group Functions (TODO list)
- cohesion sur un groupe
- distance au dernier branchement
- âge du groupe
Futre Idea: temporal zoom on Phylo
phyloZoomOut :: (PeriodGrain, Phylo) -> [(PeriodGrain, Phylo)]
(from smallest granularity, it increases (zoom out) the periods of the Phylo)
Moral idea: viz from out to in
-}
...
...
@@ -28,76 +14,8 @@ Moral idea: viz from out to in
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module
Gargantext.Viz.Phylo.Tools
where
import
Data.Set
(
Set
)
import
Data.Map
(
Map
)
import
qualified
Data.Map
as
Map
import
Gargantext.Prelude
import
Gargantext.Viz.Phylo
import
Gargantext.Viz.Phylo.Example
type
MinSize
=
Int
-- | Building a phylo
-- (Indicative and schematic function)
-- buildPhylo :: Support -> MinSize
-- -> Map Clique Support -> Phylo
-- buildPhylo s m mcs = level2Phylo
-- . groups2level
-- . clusters2group
-- . Map.map clique2cluster
-- . filterCliques s m
level2Phylo
::
PhyloLevel
->
Phylo
->
Phylo
level2Phylo
=
undefined
groups2level
::
[
PhyloGroup
]
->
PhyloLevel
groups2level
=
undefined
-- clusters2group :: [Cluster Ngrams] -> PhyloGroup
-- clusters2group = undefined
-- clique2cluster :: Clique -> Cluster Ngrams
-- clique2cluster = undefined
-- | Filtering the cliques before bulding the Phylo
-- (Support and MinSize as parameter of the finale function to build a phylo)
-- idea: log of Corpus size (of docs)
filterCliques
::
Support
->
MinSize
->
Map
Clique
Support
->
[
Clique
]
filterCliques
s
ms
=
maximalCliques
.
filterWithSizeSet
ms
.
Map
.
keys
.
filterWithSupport
s
-- | Hapaxify / Threshold
-- hapax s = 1
-- ?
filterWithSupport
::
Support
->
Map
Clique
Support
->
Map
Clique
Support
filterWithSupport
s
=
Map
.
filter
(
>
s
)
filterWithSizeSet
::
MinSize
->
[
Clique
]
->
[
Clique
]
filterWithSizeSet
=
undefined
-- | filtre les cliques de ngrams compris dans une clique plus grande
-- /!\ optim inside
maximalCliques
::
[
Clique
]
->
[
Clique
]
maximalCliques
=
undefined
-- | Phylo management
-- | PhyloLevel Management
viewGroups
::
(
Start
,
End
)
->
PhyloLevel
->
Phylo
->
[
PhyloGroup
]
viewGroups
=
undefined
module
Gargantext.Viz.Phylo.Tools
where
viewLevels
::
(
Start
,
End
)
->
Phylo
->
[
PhyloLevel
]
viewLevels
=
undefined
-- | tous les terme des champs, tous les parents et les enfants
setGroup
::
PhyloGroup
->
PhyloGroup
->
PhyloGroup
setGroup
=
undefined
--removeTerms :: recalculer les cliques pour ces termes
--addTerms
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