$ List.sortOn (Down . viewScore . snd)
$ HashMap.toList tailTerms'
+
pure $ Map.fromList [( nt, (toNgramsElement stopTerms)
<> (toNgramsElement mapTerms )
<> (toNgramsElement $ setListType (Just MapTerm ) mapTerms' )
-- filter with max score
partitionWithMaxScore = HashMap.partition (\g -> (view scored_genInc $ view gts'_score g)
- > (view scored_speExc $ view gts'_score g)
- )
+ > (view scored_speExc $ view gts'_score g)
+ )
(monoScoredIncl, monoScoredExcl) = partitionWithMaxScore monoScored
(multScoredIncl, multScoredExcl) = partitionWithMaxScore multScored
let
-- use % of list if to big, or Int if to small
mapSize = 1000 :: Double
- canSize = mapSize * 10 :: Double
+ canSize = mapSize * 5 :: Double
inclSize = 0.4 :: Double
exclSize = 1 - inclSize
{-\$ 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
)]
]