phladiprelio-ukrainian-simple 0.3.0.0 → 0.3.0.1
raw patch · 4 files changed
+8/−6 lines, 4 files
Files
- CHANGELOG.md +4/−0
- README.md +1/−1
- app/Main.hs +2/−4
- phladiprelio-ukrainian-simple.cabal +1/−1
CHANGELOG.md view
@@ -32,3 +32,7 @@ of the line. The latter one works for most cases because of the highly not equal pairwise values for the syllable durations. +## 0.3.0.1 -- 2023-03-19++* Third version revised A. Some minor code improvements.+
README.md view
@@ -1,6 +1,6 @@ The executable is the new implementation of the ideas related to PhLADiPreLiO (Phonetic Languages Approach to Discovering the Preferred Line Options) for Ukrainian language. It uses hashes and-has at the moment (as of the version 0.3.0.0) not the full functionality. The previous implementation +has at the moment (as of the version 0.3.0.1) not the full functionality. The previous implementation and its documentation are at the links: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array
app/Main.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE NoImplicitPrelude #-}-{-# OPTIONS_GHC -threaded #-} module Main where @@ -37,8 +36,8 @@ else if length syllableDurationsDs >= k then syllableDurationsDs !! (k - 1) else syllableDurationsD2) . createSyllablesUkrS if numTest == 0 then do putStrLn "Feet Val Stat Proxim" - sequence . map putStrLn . map (\(q,qs) -> let m = stat1 syllN (q,qs) in let max1 = maximumBy (comparing (f syllableDurationsDs q qs)) universalSet in let mx = f syllableDurationsDs q qs max1 in (show (fromEnum q) `mappend` " | " `mappend` show mx `mappend` " " `mappend` show m `mappend` " -> " `mappend` show (100 * fromIntegral mx / fromIntegral m) `mappend` "%")) $ [(2,[1]),(3,[2,1]),(4,[3,2]),(5,[4,3,2]),(6,[5,4,3]),(7,[6,5,4,3,2])]- else mapM (\(x,y) -> putStrLn (show x `mappend` (' ':y))) . sortOn (\(u,w) -> if descending then ((-1) * u, w) else (u,w)) . map (\xss -> (f syllableDurationsDs grps mxms xss, xss)) $ universalSet+ mapM (\(q,qs) -> let m = stat1 syllN (q,qs) in let max1 = maximumBy (comparing (f syllableDurationsDs q qs)) universalSet in let mx = f syllableDurationsDs q qs max1 in putStrLn (show (fromEnum q) `mappend` " | " `mappend` show mx `mappend` " " `mappend` show m `mappend` " -> " `mappend` show (100 * fromIntegral mx / fromIntegral m) `mappend` "%")) $ [(2,[1]),(3,[2,1]),(4,[3,2]),(5,[4,3,2]),(6,[5,4,3]),(7,[6,5,4,3,2])]+ else mapM (\(x,y) -> putStrLn (show x `mappend` (' ':y))) . (let h1 = if descending then (\(u,w) -> ((-1) * u, w)) else id in sortOn h1) . map (\xss -> (f syllableDurationsDs grps mxms xss, xss)) $ universalSet countSyll :: String -> Int countSyll xs = fromEnum . foldr (\x y -> if isVowel1 x then y + 1 else y) 0 . convertToProperUkrainianI8 $ xs@@ -50,7 +49,6 @@ main = do args <- getArgs let (argsA, argsB, _, arg2s) = args2Args3R (aSpecs `mappend` bSpecs) args- -- (argsA, _) = takeAsR aSpecs args fileDu = concat . getB "+d" $ argsB sylD = let k = snd (fromMaybe 2 (readMaybe (concat . getB "+s" $ argsB)::Maybe Int) `quotRemInt` 4) in if k == 0 then 4 else k hc = readHashCorrections . concat . getB "+c" $ argsB
phladiprelio-ukrainian-simple.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: phladiprelio-ukrainian-simple-version: 0.3.0.0+version: 0.3.0.1 -- A short (one-line) description of the package. synopsis: A PhLADiPreLiO implementation for Ukrainian that uses hashes