Commit 23ef92fa authored by Alexandre Delanoë's avatar Alexandre Delanoë

[TextFlow] map list acceptable for tests (WIP)

parent e16a2824
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment