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
145
Issues
145
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
e3fed9b2
Commit
e3fed9b2
authored
Jun 04, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Candiate List Size
parent
3cf08bbe
Pipeline
#1531
passed with stage
in 18 minutes and 17 seconds
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
List.hs
src/Gargantext/Core/Text/List.hs
+8
-4
No files found.
src/Gargantext/Core/Text/List.hs
View file @
e3fed9b2
...
...
@@ -118,6 +118,7 @@ buildNgramsOthersList user uCid _groupParams (nt, MapListSize mapListSize) = do
$
List
.
sortOn
(
Down
.
viewScore
.
snd
)
$
HashMap
.
toList
tailTerms'
pure
$
Map
.
fromList
[(
nt
,
(
toNgramsElement
stopTerms
)
<>
(
toNgramsElement
mapTerms
)
<>
(
toNgramsElement
$
setListType
(
Just
MapTerm
)
mapTerms'
)
...
...
@@ -265,8 +266,8 @@ buildNgramsTermsList user uCid mCid groupParams (nt, _mapListSize)= do
splitAt'
max'
n'
=
(
both
(
HashMap
.
fromList
))
.
(
List
.
splitAt
(
round
$
n'
*
max'
))
sortOn
f
=
(
List
.
sortOn
(
Down
.
(
view
(
gts'_score
.
f
))
.
snd
))
.
HashMap
.
toList
monoInc_size
n
=
splitAt'
n
$
monoSize
*
inclSize
/
4
multExc_size
n
=
splitAt'
n
$
multSize
*
exclSize
/
4
monoInc_size
n
=
splitAt'
n
$
monoSize
*
inclSize
/
2
multExc_size
n
=
splitAt'
n
$
multSize
*
exclSize
/
2
(
mapMonoScoredInclHead
,
monoScoredInclTail
)
=
monoInc_size
mapSize
$
(
sortOn
scored_genInc
)
monoScoredIncl
...
...
@@ -304,11 +305,14 @@ buildNgramsTermsList user uCid mCid groupParams (nt, _mapListSize)= do
{-\$ groupedMonoTail
<>-}
groupedMultTail
-- Quick FIX
candNgramsElement
=
List
.
take
5000
$
toNgramsElement
cands
<>
toNgramsElement
cands'
result
=
Map
.
unionsWith
(
<>
)
[
Map
.
fromList
[(
nt
,
toNgramsElement
maps
<>
toNgramsElement
cands
<>
toNgramsElement
cands'
<>
toNgramsElement
stopTerms
<>
candNgramsElement
)]
]
...
...
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