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
158
Issues
158
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
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
65f36dec
Commit
65f36dec
authored
May 26, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Lists] fix candidates list
parent
2e194ab3
Pipeline
#1467
failed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
List.hs
src/Gargantext/Core/Text/List.hs
+10
-11
No files found.
src/Gargantext/Core/Text/List.hs
View file @
65f36dec
...
...
@@ -260,18 +260,23 @@ buildNgramsTermsList user uCid mCid groupParams (nt, _mapListSize)= do
inclSize
=
0.4
::
Double
exclSize
=
1
-
inclSize
splitAt'
n'
=
(
both
(
HashMap
.
fromList
))
.
(
List
.
splitAt
(
round
$
n'
*
listSizeLocal
))
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
=
splitAt'
$
monoSize
*
inclSize
/
2
(
monoScoredInclHead
,
_
monoScoredInclTail
)
=
monoInc_size
$
(
sortOn
scored_genInc
)
monoScoredIncl
monoInc_size
=
splitAt'
listSizeLocal
$
monoSize
*
inclSize
/
2
(
monoScoredInclHead
,
monoScoredInclTail
)
=
monoInc_size
$
(
sortOn
scored_genInc
)
monoScoredIncl
(
monoScoredExclHead
,
_monoScoredExclTail
)
=
monoInc_size
$
(
sortOn
scored_speExc
)
monoScoredExcl
multExc_size
=
splitAt'
$
multSize
*
exclSize
/
2
multExc_size
=
splitAt'
listSizeLocal
$
multSize
*
exclSize
/
2
(
multScoredInclHead
,
multScoredInclTail
)
=
multExc_size
$
(
sortOn
scored_genInc
)
multScoredIncl
(
multScoredExclHead
,
multScoredExclTail
)
=
multExc_size
$
(
sortOn
scored_speExc
)
multScoredExcl
(
candidatesHead
,
_candidatesTail
)
=
splitAt'
4000
(
0.5
::
Double
)
$
sortOn
scored_genInc
$
monoScoredInclTail
<>
multScoredInclTail
<>
multScoredExclTail
printDebug
"stopWords"
stopTerms
------------------------------------------------------------
...
...
@@ -285,11 +290,7 @@ buildNgramsTermsList user uCid mCid groupParams (nt, _mapListSize)= do
<>
multScoredExclHead
-- An original way to filter to start with
cands
=
setListType
(
Just
CandidateTerm
)
$
{- monoScoredInclTail
<> monoScoredExclTail
<> -}
multScoredInclTail
<>
multScoredExclTail
cands
=
setListType
(
Just
CandidateTerm
)
candidatesHead
cands'
=
setListType
(
Just
CandidateTerm
)
{-$ groupedMonoTail
...
...
@@ -303,6 +304,4 @@ buildNgramsTermsList user uCid mCid groupParams (nt, _mapListSize)= do
)]
]
-- printDebug "result" result
pure
result
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