hist-pl-transliter 0.1.0 → 0.1.1
raw patch · 2 files changed
+9/−45 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- hist-pl-transliter.cabal +9/−3
- src/NLP/HistPL/Transliter.hs +0/−42
hist-pl-transliter.cabal view
@@ -1,10 +1,16 @@ name: hist-pl-transliter-version: 0.1.0+version: 0.1.1 synopsis: A simple EDSL for transliteration rules description: The library provides a simple embedded domain specific language for- transliteration rules and a set of rules prepared for documents- from the IMPACT project.+ defining transliteration rules.+ Additionally, the library includes a set of rules prepared (within the SYNAT+ project) for documents collected throughout the IMPACT project (available+ at <http://dl.psnc.pl/activities/projekty/impact/results/>).+ .+ A transliteration system, developed independently within the IMPACT+ project, may be also of interest.+ It can be found at <https://bitbucket.org/jsbien/pol>. license: BSD3 license-file: LICENSE cabal-version: >= 1.6
src/NLP/HistPL/Transliter.hs view
@@ -112,45 +112,3 @@ ys = iterate (parseWord rules) x ps = zip ys $ tail ys eq = uncurry (==)---- -- Text parsing--- --- removeHyp :: String -> String--- removeHyp ('‑':'\n':xs) = removeHyp xs--- removeHyp (x:xs) = x : removeHyp xs--- removeHyp [] = []--- --- type Text = [Line]--- type Line = [Seg]--- data Seg = Orth String--- | Interp String--- | Space String--- deriving (Show)--- --- parseText :: String -> Text--- parseText text =--- map parseLine $ lines $ removeHyp $ map toLower text--- where--- parseLine x = case parse lineParser x x of--- Left err -> error $ "parseText: " ++ show err--- Right y -> y--- lineParser = many segParser--- segParser = (Space <$> spaceParser)--- <|> (Interp <$> interpParser)--- <|> (Orth <$> orthParser)--- spaceParser = many1 $ satisfy isSpace--- interpParser = many1 $ satisfy isPunctuation--- orthParser = many1 $ satisfy $ \c ->--- not (isPunctuation c) && not (isSpace c)--- --- unParseText :: Text -> String--- unParseText =--- unlines . map unLine--- where--- unLine = concatMap unSeg--- unSeg (Orth x) = transcript x--- unSeg (Interp x) = x--- unSeg (Space x) = x--- --- transcriptText :: String -> String--- transcriptText = unParseText . parseText