From 23ef92fa4ee1bf828bcdbde9f61c97f552d0489c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Delano=C3=AB?= <devel+git@delanoe.org> Date: Fri, 11 Sep 2020 10:02:18 +0200 Subject: [PATCH] [TextFlow] map list acceptable for tests (WIP) --- src/Gargantext/Core/Text/List.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Gargantext/Core/Text/List.hs b/src/Gargantext/Core/Text/List.hs index 53872df8..01e0676e 100644 --- a/src/Gargantext/Core/Text/List.hs +++ b/src/Gargantext/Core/Text/List.hs @@ -99,17 +99,17 @@ buildNgramsTermsList :: Lang -> MasterCorpusId -> Cmd err (Map NgramsType [NgramsElement]) buildNgramsTermsList _l _n _m s uCid mCid = do - candidates <- sortTficf Down <$> getTficf uCid mCid NgramsTerms + candidates <- sortTficf Up <$> getTficf uCid mCid NgramsTerms printDebug "head candidates" (List.take 10 $ candidates) printDebug "tail candidates" (List.take 10 $ List.reverse $ candidates) let - candidatesSize = 400 - candidatesHead = List.take candidatesSize candidates - candidatesTail = List.drop candidatesSize candidates + (candidatesHead, candidatesTail0) = List.splitAt 3 candidates + (candidatesMap, candidatesTailFinal) = List.splitAt 400 candidatesTail0 - termList = (map (toGargList ((isStopTerm s) .fst) MapTerm) candidatesHead) - <> (map (toGargList ((isStopTerm s) .fst) CandidateTerm) candidatesTail) + termList = (map (toGargList ((isStopTerm s) . fst) CandidateTerm) candidatesHead) + <> (map (toGargList ((isStopTerm s) . fst) MapTerm) candidatesMap) + <> (map (toGargList ((isStopTerm s) . fst) CandidateTerm) candidatesTailFinal) ngs = List.concat $ map toNgramsElement -- 2.21.0