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
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
c624d176
Commit
c624d176
authored
Aug 29, 2024
by
mzheng
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formating addGroup
parent
96a23581
Pipeline
#6555
passed with stages
in 56 minutes and 4 seconds
Changes
1
Pipelines
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
->
Parent
->
GroupedTreeScores
score
->
GroupedTreeScores
score
addGroup
institutesTree'
m'
k
v
=
over
gts'_children
(
toGroupedTree''
m'
.
case
HashMap
.
lookup
(
unNgramsTerm
k
)
institutesTree'
of
Nothing
->
HashMap
.
union
(
fromMaybe
mempty
$
HashMap
.
lookup
(
Just
k
)
m'
)
Just
children
->
HashMap
.
union
(
foldl
(
\
acc
child
->
HashMap
.
union
acc
$
HashMap
.
singleton
(
NgramsTerm
child
)
GroupedTreeScores
{
_gts'_score
=
_gts'_score
v
,
_gts'_listType
=
_gts'_listType
v
,
_gts'_children
=
HashMap
.
empty
})
HashMap
.
empty
children
)
.
HashMap
.
union
(
fromMaybe
mempty
$
HashMap
.
lookup
(
Just
k
)
m'
)
)
v
\ No newline at end of file
addGroup
institutesTree'
dict'
key
val
=
over
gts'_children
(
toGroupedTree''
dict'
.
case
HashMap
.
lookup
(
unNgramsTerm
key
)
institutesTree'
of
Nothing
->
HashMap
.
union
(
fromMaybe
mempty
$
HashMap
.
lookup
(
Just
key
)
dict'
)
Just
children
->
HashMap
.
union
(
foldl
(
\
acc
child
->
HashMap
.
union
acc
$
HashMap
.
singleton
(
NgramsTerm
child
)
GroupedTreeScores
{
_gts'_score
=
_gts'_score
val
,
_gts'_listType
=
_gts'_listType
val
,
_gts'_children
=
HashMap
.
empty
}
)
HashMap
.
empty
children
)
.
HashMap
.
union
(
fromMaybe
mempty
$
HashMap
.
lookup
(
Just
key
)
dict'
)
)
val
\ No newline at end of file
Przemyslaw Kaminski
@cgenie
mentioned in commit
5660aec0
·
Oct 08, 2024
mentioned in commit
5660aec0
mentioned in commit 5660aec07ec5a0a0a5468f440092c1a8f57a864e
Toggle commit list
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