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
197
Issues
197
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
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
Hide 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
...
@@ -118,6 +118,7 @@ buildNgramsOthersList user uCid _groupParams (nt, MapListSize mapListSize) = do
$
List
.
sortOn
(
Down
.
viewScore
.
snd
)
$
List
.
sortOn
(
Down
.
viewScore
.
snd
)
$
HashMap
.
toList
tailTerms'
$
HashMap
.
toList
tailTerms'
pure
$
Map
.
fromList
[(
nt
,
(
toNgramsElement
stopTerms
)
pure
$
Map
.
fromList
[(
nt
,
(
toNgramsElement
stopTerms
)
<>
(
toNgramsElement
mapTerms
)
<>
(
toNgramsElement
mapTerms
)
<>
(
toNgramsElement
$
setListType
(
Just
MapTerm
)
mapTerms'
)
<>
(
toNgramsElement
$
setListType
(
Just
MapTerm
)
mapTerms'
)
...
@@ -265,8 +266,8 @@ buildNgramsTermsList user uCid mCid groupParams (nt, _mapListSize)= do
...
@@ -265,8 +266,8 @@ buildNgramsTermsList user uCid mCid groupParams (nt, _mapListSize)= do
splitAt'
max'
n'
=
(
both
(
HashMap
.
fromList
))
.
(
List
.
splitAt
(
round
$
n'
*
max'
))
splitAt'
max'
n'
=
(
both
(
HashMap
.
fromList
))
.
(
List
.
splitAt
(
round
$
n'
*
max'
))
sortOn
f
=
(
List
.
sortOn
(
Down
.
(
view
(
gts'_score
.
f
))
.
snd
))
.
HashMap
.
toList
sortOn
f
=
(
List
.
sortOn
(
Down
.
(
view
(
gts'_score
.
f
))
.
snd
))
.
HashMap
.
toList
monoInc_size
n
=
splitAt'
n
$
monoSize
*
inclSize
/
4
monoInc_size
n
=
splitAt'
n
$
monoSize
*
inclSize
/
2
multExc_size
n
=
splitAt'
n
$
multSize
*
exclSize
/
4
multExc_size
n
=
splitAt'
n
$
multSize
*
exclSize
/
2
(
mapMonoScoredInclHead
,
monoScoredInclTail
)
=
monoInc_size
mapSize
$
(
sortOn
scored_genInc
)
monoScoredIncl
(
mapMonoScoredInclHead
,
monoScoredInclTail
)
=
monoInc_size
mapSize
$
(
sortOn
scored_genInc
)
monoScoredIncl
...
@@ -304,11 +305,14 @@ buildNgramsTermsList user uCid mCid groupParams (nt, _mapListSize)= do
...
@@ -304,11 +305,14 @@ buildNgramsTermsList user uCid mCid groupParams (nt, _mapListSize)= do
{-\$ groupedMonoTail
{-\$ groupedMonoTail
<>-}
groupedMultTail
<>-}
groupedMultTail
-- Quick FIX
candNgramsElement
=
List
.
take
5000
$
toNgramsElement
cands
<>
toNgramsElement
cands'
result
=
Map
.
unionsWith
(
<>
)
result
=
Map
.
unionsWith
(
<>
)
[
Map
.
fromList
[(
nt
,
toNgramsElement
maps
[
Map
.
fromList
[(
nt
,
toNgramsElement
maps
<>
toNgramsElement
cands
<>
toNgramsElement
cands'
<>
toNgramsElement
stopTerms
<>
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