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
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
Christian Merten
haskell-gargantext
Commits
c624d176
Commit
c624d176
authored
Aug 29, 2024
by
mzheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formating addGroup
parent
96a23581
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
WithScores.hs
src/Gargantext/Core/Text/List/Group/WithScores.hs
+23
-20
No files found.
src/Gargantext/Core/Text/List/Group/WithScores.hs
View file @
c624d176
...
@@ -131,23 +131,26 @@ toGroupedTreeInstitutes'' m notEmpty institutesTree
...
@@ -131,23 +131,26 @@ toGroupedTreeInstitutes'' m notEmpty institutesTree
->
Parent
->
Parent
->
GroupedTreeScores
score
->
GroupedTreeScores
score
->
GroupedTreeScores
score
->
GroupedTreeScores
score
addGroup
institutesTree'
m'
k
v
=
addGroup
institutesTree'
dict'
key
val
=
over
gts'_children
(
toGroupedTree''
m'
over
gts'_children
.
case
HashMap
.
lookup
(
unNgramsTerm
k
)
institutesTree'
of
(
toGroupedTree''
dict'
Nothing
->
HashMap
.
union
(
fromMaybe
mempty
.
case
HashMap
.
lookup
(
unNgramsTerm
key
)
institutesTree'
of
$
HashMap
.
lookup
(
Just
k
)
m'
Nothing
->
HashMap
.
union
(
fromMaybe
mempty
)
$
HashMap
.
lookup
(
Just
key
)
dict'
Just
children
->
HashMap
.
union
(
foldl
(
\
acc
child
->
HashMap
.
union
acc
$
)
HashMap
.
singleton
Just
children
(
NgramsTerm
child
)
->
HashMap
.
union
GroupedTreeScores
(
foldl
(
\
acc
child
{
_gts'_score
=
_gts'_score
v
->
HashMap
.
union
acc
,
_gts'_listType
=
_gts'_listType
v
$
HashMap
.
singleton
(
NgramsTerm
child
)
GroupedTreeScores
,
_gts'_children
=
HashMap
.
empty
{
_gts'_score
=
_gts'_score
val
})
HashMap
.
empty
children
,
_gts'_listType
=
_gts'_listType
val
)
,
_gts'_children
=
HashMap
.
empty
.
HashMap
.
union
(
fromMaybe
mempty
}
$
HashMap
.
lookup
(
Just
k
)
m'
)
HashMap
.
empty
children
)
)
)
.
HashMap
.
union
(
fromMaybe
mempty
v
$
HashMap
.
lookup
(
Just
key
)
dict'
\ No newline at end of file
)
)
val
\ No newline at end of file
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