concraft 0.7.0 → 0.7.1
raw patch · 3 files changed
+8/−14 lines, 3 filesdep +lazy-iodep ~crf-chain1-constraineddep ~crf-chain2-tiersdep ~sgdPVP ok
version bump matches the API change (PVP)
Dependencies added: lazy-io
Dependency ranges changed: crf-chain1-constrained, crf-chain2-tiers, sgd
API changes (from Hackage documentation)
Files
- concraft.cabal +5/−4
- src/NLP/Concraft.hs +1/−0
- src/NLP/Concraft/Analysis.hs +2/−10
concraft.cabal view
@@ -1,5 +1,5 @@ name: concraft-version: 0.7.0+version: 0.7.1 synopsis: Morphological disambiguation based on constrained CRFs description: A morphological disambiguation library based on@@ -32,11 +32,11 @@ , text-binary >= 0.1 && < 0.2 , vector , vector-binary- , crf-chain1-constrained >= 0.2 && < 0.3 , monad-ox >= 0.3 && < 0.4- , sgd >= 0.3 && < 0.4+ , sgd >= 0.3.2 && < 0.4 , tagset-positional >= 0.3 && < 0.4- , crf-chain2-tiers >= 0.1 && < 0.2+ , crf-chain1-constrained >= 0.2.1 && < 0.3+ , crf-chain2-tiers >= 0.1.1 && < 0.2 , monad-codec >= 0.2 && < 0.3 , data-lens , transformers@@ -44,6 +44,7 @@ , temporary , aeson >= 0.6 && < 0.7 , zlib >= 0.5 && < 0.6+ , lazy-io exposed-modules: NLP.Concraft
src/NLP/Concraft.hs view
@@ -93,6 +93,7 @@ -- Training --------------------- + -- INFO: We take an input dataset as a list, since it is read only once. -- | Train guessing and disambiguation models.
src/NLP/Concraft/Analysis.hs view
@@ -15,7 +15,7 @@ ) where -import System.IO.Unsafe (unsafeInterleaveIO)+import qualified Control.Monad.LazyIO as LazyIO import qualified Data.Text.Lazy as L import NLP.Concraft.Morphosyntax@@ -60,15 +60,7 @@ -- | Reanalyse paragraph. reAnaPar :: Word w => P.Tagset -> Analyse w P.Tag -> [SentO w P.Tag] -> IO [Sent w P.Tag]-reAnaPar tagset ana = lazyMapM (reAnaSent tagset ana)---lazyMapM :: (a -> IO b) -> [a] -> IO [b]-lazyMapM f (x:xs) = do- y <- f x- ys <- unsafeInterleaveIO $ lazyMapM f xs- return (y:ys)-lazyMapM _ [] = return []+reAnaPar tagset ana = LazyIO.mapM (reAnaSent tagset ana) ---------------------