snowball 0.1.0 → 0.1.0.1
raw patch · 2 files changed
+4/−6 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- snowball.cabal +2/−4
- src/Text/Snowball.hs +2/−2
snowball.cabal view
@@ -1,5 +1,5 @@ name : snowball-version : 0.1.0+version : 0.1.0.1 homepage : http://hub.darcs.net/dag/snowball category : Natural Language Processing, Text maintainer : dag.odenhall@gmail.com@@ -8,9 +8,7 @@ description : The Snowball library is used to compute the stems of words in natural languages. .- Compared to the older- <http://hackage.haskell.org/package/stemmer stemmer>- package, this one:+ Compared to the older <stemmer> package, this one: . * Correctly handles unicode without relying on the system locale
src/Text/Snowball.hs view
@@ -16,7 +16,7 @@ packCStringLen, useAsCString) import Data.Text (Text) import qualified Data.Text as Text-import Data.Text.Encoding (decodeUtf8, encodeUtf8)+import Data.Text.Encoding (decodeUtf8', encodeUtf8) ------------------------------------------------------------------------------- import Foreign (Ptr) import Foreign.C (CInt (..), CString)@@ -59,7 +59,7 @@ do ptr <- sb_stemmer_stem stemmer word' (fromIntegral $ Text.length word) len <- sb_stemmer_length stemmer bytes <- packCStringLen (ptr,fromIntegral len)- return $ decodeUtf8 bytes+ return $ either (const word) id $ decodeUtf8' bytes {-# RULES "map/stem" forall a xs. map (stem a) xs = stems a xs #-}