Commit 54d4ebd0 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] compiles now (@np maybe you can add your fix now).

parent 66f9aa8a
......@@ -101,16 +101,12 @@ data Scored t = Scored { _scored_terms :: !t
, _scored_speGen :: !SpecificityGenericity
} deriving (Show)
--coocScored :: Ord t => Map (t,t) Int -> [Scored t]
--coocScored m = zipWith (\(i,t) (inc,spe) -> Scored t inc spe) (M.toList fi) scores
coocScored :: (DAA.Elt t, Ord t) => Map (t,t) Int -> [Scored t]
coocScored m = map (\(t,inc,spe) -> Scored t inc spe) scores
coocScored :: Ord t => Map (t,t) Int -> [Scored t]
coocScored m = zipWith (\(i,t) (inc,spe) -> Scored t inc spe) (M.toList fi) scores
where
(ti,fi) = createIndices m
(is, ss) = incExcSpeGen $ cooc2mat ti m
scores = DAA.toList $ DAA.run $ DAA.zip3 (DAA.use ts) (DAA.use is) (DAA.use ss)
ts = DAA.fromList (DAA.arrayShape is) (snd <$> M.toAscList fi)
-- TODO fi should already be a Vector
scores = DAA.toList $ DAA.run $ DAA.zip (DAA.use is) (DAA.use ss)
......
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