cndict 0.4.4 → 0.4.5
raw patch · 2 files changed
+3/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- cndict.cabal +1/−1
- src/Data/Chinese/CCDict.hs +2/−2
cndict.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: cndict-version: 0.4.4+version: 0.4.5 synopsis: Chinese/Mandarin <-> English dictionary, Chinese lexer. -- description: license: PublicDomain
src/Data/Chinese/CCDict.hs view
@@ -238,9 +238,9 @@ maxBy' hiScore hiItem (y:ys) = let score = fn y in if score > hiScore then maxBy' score y ys else maxBy' hiScore hiItem ys- geoMean :: [Int] -> Double+ geoMean :: [Int] -> Integer geoMean [] = 0- geoMean n = fromIntegral (product n)**(recip (fromIntegral (length n)))+ geoMean n = product $ map fromIntegral n -- assocs = [ (node, geoMean (filter (/=0) (nodeSum node))) -- | node <- forest ] wordCount word = maybe 1 subtlexWCount (M.lookup word subtlex)