Commit 461124e8 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[flow] fix hardcoded list size in build terms

parent e71c52ec
Pipeline #3488 passed with stage
in 92 minutes and 24 seconds
...@@ -29,4 +29,3 @@ data OutputFlow ...@@ -29,4 +29,3 @@ data OutputFlow
flow :: Flow -> OutputFlow flow :: Flow -> OutputFlow
flow = undefined flow = undefined
...@@ -63,4 +63,3 @@ toDoc' la (HAL.Corpus i t ab d s aus affs struct_id) = do ...@@ -63,4 +63,3 @@ toDoc' la (HAL.Corpus i t ab d s aus affs struct_id) = do
, _hd_publication_minute = Nothing , _hd_publication_minute = Nothing
, _hd_publication_second = Nothing , _hd_publication_second = Nothing
, _hd_language_iso2 = Just $ (pack . show) la } , _hd_language_iso2 = Just $ (pack . show) la }
...@@ -159,7 +159,7 @@ buildNgramsTermsList :: ( HasNodeError err ...@@ -159,7 +159,7 @@ buildNgramsTermsList :: ( HasNodeError err
-> GroupParams -> GroupParams
-> (NgramsType, MapListSize) -> (NgramsType, MapListSize)
-> m (Map NgramsType [NgramsElement]) -> m (Map NgramsType [NgramsElement])
buildNgramsTermsList user uCid mCid mfslw groupParams (nt, _mapListSize)= do buildNgramsTermsList user uCid mCid mfslw groupParams (nt, MapListSize mapListSize)= do
-- Filter 0 With Double -- Filter 0 With Double
-- Computing global speGen score -- Computing global speGen score
...@@ -179,13 +179,13 @@ buildNgramsTermsList user uCid mCid mfslw groupParams (nt, _mapListSize)= do ...@@ -179,13 +179,13 @@ buildNgramsTermsList user uCid mCid mfslw groupParams (nt, _mapListSize)= do
) )
printDebug "[buildNgramsTermsList: Flow Social List / end]" nt printDebug "[buildNgramsTermsList: Flow Social List / end]" nt
let !ngramsKeys = HashSet.fromList $ List.take 1000 $ HashSet.toList $ HashMap.keysSet allTerms let !ngramsKeys = HashSet.fromList $ List.take mapListSize $ HashSet.toList $ HashMap.keysSet allTerms
printDebug "[buildNgramsTermsList: ngramsKeys]" (HashSet.size ngramsKeys) printDebug "[buildNgramsTermsList: ngramsKeys]" (HashSet.size ngramsKeys)
!groupParams' <- getGroupParams groupParams (HashSet.map (text2ngrams . unNgramsTerm) ngramsKeys) !groupParams' <- getGroupParams groupParams (HashSet.map (text2ngrams . unNgramsTerm) ngramsKeys)
printDebug "[buildNgramsTermsList: groupParams']" (""::Text) printDebug "[buildNgramsTermsList: groupParams']" ("" :: Text)
let let
!socialLists_Stemmed = addScoreStem groupParams' ngramsKeys socialLists !socialLists_Stemmed = addScoreStem groupParams' ngramsKeys socialLists
......
...@@ -78,4 +78,3 @@ instance ToRow InputData where ...@@ -78,4 +78,3 @@ instance ToRow InputData where
, toField (0 :: Int) , toField (0 :: Int)
, toField (1 :: Int) , toField (1 :: Int)
] ]
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