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
07424229
Commit
07424229
authored
Mar 30, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PHYLO] step -> period.
parent
25bc7c97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
25 deletions
+24
-25
Phylo.hs
src/Gargantext/Types/Phylo.hs
+24
-25
No files found.
src/Gargantext/Types/Phylo.hs
View file @
07424229
...
...
@@ -35,12 +35,12 @@ import Gargantext.Utils.Prefix (unPrefix)
------------------------------------------------------------------------
-- | Phylo datatype descriptor of a phylomemy
--
Period
: time Segment of the whole phylomemy in UTCTime format (start,end)
-- Ngrams : list of all (possible) terms contained in the phylomemy (with their id)
-- Steps : list of all steps to build the phylomemy
data
Phylo
=
Phylo
{
_phylo
Period
::
(
Start
,
End
)
,
_phyloNgrams
::
[
Ngram
]
,
_phylo
Steps
::
[
PhyloStep
]
--
Duration
: time Segment of the whole phylomemy in UTCTime format (start,end)
-- Ngrams
: list of all (possible) terms contained in the phylomemy (with their id)
-- Steps
: list of all steps to build the phylomemy
data
Phylo
=
Phylo
{
_phylo
Duration
::
(
Start
,
End
)
,
_phyloNgrams
::
[
Ngram
]
,
_phylo
Periods
::
[
PhyloPeriod
]
}
deriving
(
Generic
)
type
Start
=
UTCTime
...
...
@@ -52,38 +52,37 @@ type NgramId = Int
-- | PhyloStep : steps of phylomemy on temporal axis
-- Period: tuple (start date, end date) of the step of the phylomemy
-- Levels: levels of granularity
data
Phylo
Step
=
PhyloStep
{
_phyloStepPeriod
::
(
Start
,
End
)
,
_phyloStep
Levels
::
[
PhyloLevel
]
}
deriving
(
Generic
)
data
Phylo
Period
=
PhyloPeriod
{
_phyloPeriodDuration
::
(
Start
,
End
)
,
_phyloPeriod
Levels
::
[
PhyloLevel
]
}
deriving
(
Generic
)
-- | PhyloLevel : levels of phylomemy on level axis
-- Levels description:
-- Level 0: Ngram equals itself (by identity) == _phyloNgrams
-- Level 1: Group gathers synonyms (by stems + by qualitative expert meaning)
-- Level 2: Group is Frequent Item Set (by statistics)
-- Level 3: Group is a cluster or community (by statistics)
-- Level -1: Ngram equals itself (by identity) == _phyloNgrams
-- Level 0: Group of synonyms (by stems + by qualitative expert meaning)
-- Level 1: First level of clustering
-- Level N: Nth level of clustering
type
PhyloLevel
=
[
PhyloGroup
]
-- | PhyloGroup : group of ngrams at each level and step
-- Label: maybe has a label as text
-- Label
: maybe has a label as text
-- Ngrams: set of terms that build the group
-- Temporal Parents|Childs: directed and weighted link to Parents|Childs (Temporal axis)
-- Temporal
Parents|Childs: directed and weighted link to Parents|Childs (Temporal axis)
-- Granularity Parents|Childs: directed and weighted link to Parents|Childs (Granularity axis)
data
PhyloGroup
=
PhyloGroup
{
_phyloGroupLabel
::
Maybe
Text
,
_phyloGroupNgrams
::
[
NgramId
]
data
PhyloGroup
=
PhyloGroup
{
_phyloGroupLabel
::
Maybe
Text
,
_phyloGroupNgrams
::
[
NgramId
]
,
_phyloGroup
TemporalParents
::
[
Edge
]
,
_phyloGroup
TemporalChilds
::
[
Edge
]
,
_phyloGroup
PeriodParents
::
[
Edge
]
,
_phyloGroup
PeriodChilds
::
[
Edge
]
,
_phyloGroup
GranularityParents
::
[
Edge
]
,
_phyloGroup
GranularityChilds
::
[
Edge
]
,
_phyloGroup
LevelParents
::
[
Edge
]
,
_phyloGroup
LevelChilds
::
[
Edge
]
}
deriving
(
Generic
)
type
Edge
=
(
NgramId
,
Weight
)
type
Weight
=
Double
-- | JSON instances
$
(
deriveJSON
(
unPrefix
"_phylo"
)
''
P
hylo
)
$
(
deriveJSON
(
unPrefix
"_phylo
Step"
)
''
P
hyloStep
)
$
(
deriveJSON
(
unPrefix
"_phyloGroup"
)
''
P
hyloGroup
)
$
(
deriveJSON
(
unPrefix
"_phylo"
)
''
P
hylo
)
$
(
deriveJSON
(
unPrefix
"_phylo
Period"
)
''
P
hyloPeriod
)
$
(
deriveJSON
(
unPrefix
"_phyloGroup"
)
''
P
hyloGroup
)
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