{-# LANGUAGE NoImplicitPrelude #-}
module Phladiprelio.General.Simple where
import GHC.Base
import Text.Show (show)
import Phladiprelio.General.PrepareText
import Phladiprelio.General.Syllables
import Phladiprelio.General.Base
import System.Environment (getArgs)
import GHC.Num ((-))
import Text.Read (readMaybe)
import System.IO (putStrLn, FilePath)
import Rhythmicity.MarkerSeqs hiding (id)
import Rhythmicity.BasicF
import Data.List
import Data.Maybe (fromMaybe)
import Data.Tuple (fst,snd)
import CLI.Arguments
import CLI.Arguments.Get
import CLI.Arguments.Parsing
import GHC.Int (Int8)
generalF
:: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.
-> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon (e. g. allophones). Must be sorted in the ascending order to be used correctly.
-> CharPhoneticClassification
-> SegmentRulesG
-> String -- ^ Corresponds to the 100 delimiter in the @ukrainian-phonetics-basic-array@ package.
-> String -- ^ Corresponds to the 101 delimiter in the @ukrainian-phonetics-basic-array@ package.
-> ([[[PRS]]] -> [[Double]])
-> HashCorrections
-> (Int8,[Int8])
-> [String]
-> IO [()]
generalF wrs ks arr gs us vs h hc (grps,mxms) = mapM (\(x,y) -> putStrLn (show x `mappend` (' ':y))) . sortOn id . map ((\xss -> (f xss, xss)) . unwords) . permutations
where f = sum . countHashesG hc grps mxms . mconcat . h . createSyllablesPL wrs ks arr gs us vs
processingF
:: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.
-> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon (e. g. allophones). Must be sorted in the ascending order to be used correctly.
-> CharPhoneticClassification
-> SegmentRulesG
-> String -- ^ Corresponds to the 100 delimiter in the @ukrainian-phonetics-basic-array@ package.
-> String -- ^ Corresponds to the 101 delimiter in the @ukrainian-phonetics-basic-array@ package.
-> ([[[PRS]]] -> [[Double]])
-> HashCorrections
-> (Int8,[Int8])
-> [[String]]
-> [[String]]
-> String
-> IO ()
processingF wrs ks arr gs us vs h hc (grps,mxms) ysss zsss xs = do
args <- getArgs
let str1 = take 7 . words . mconcat . prepareText ysss zsss xs . unwords $ args
generalF wrs ks arr gs us vs h hc (grps,mxms) str1 >> return ()