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
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
10
Merge Requests
10
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
8c5e48a2
Unverified
Commit
8c5e48a2
authored
Jun 11, 2019
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ElEve...
parent
8baf4227
Pipeline
#462
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
Eleve.hs
src/Gargantext/Text/Eleve.hs
+4
-1
No files found.
src/Gargantext/Text/Eleve.hs
View file @
8c5e48a2
...
@@ -174,7 +174,10 @@ entropyTrie :: Entropy e => (k -> Bool) -> Trie k () -> Trie k e
...
@@ -174,7 +174,10 @@ entropyTrie :: Entropy e => (k -> Bool) -> Trie k () -> Trie k e
entropyTrie
_
(
Leaf
c
)
=
Leaf
c
entropyTrie
_
(
Leaf
c
)
=
Leaf
c
entropyTrie
pred
(
Node
c
()
children
)
=
Node
c
e
(
map
(
entropyTrie
pred
)
children
)
entropyTrie
pred
(
Node
c
()
children
)
=
Node
c
e
(
map
(
entropyTrie
pred
)
children
)
where
where
e
=
sum
$
map
f
$
Map
.
toList
children
children'
=
Map
.
toList
children
sum_count
=
sum
$
_node_count
.
snd
<$>
children'
e
|
sum_count
==
0
=
nan
|
otherwise
=
sum
$
f
<$>
children'
f
(
k
,
child
)
=
if
pred
k
then
chc
*
P
.
logBase
2
(
fromIntegral
c
)
f
(
k
,
child
)
=
if
pred
k
then
chc
*
P
.
logBase
2
(
fromIntegral
c
)
else
-
chc
*
P
.
logBase
2
chc
else
-
chc
*
P
.
logBase
2
chc
where
where
...
...
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