phonetic-languages-ukrainian-array-0.1.0.0: Prepares Ukrainian text to be used as a phonetic language text
Copyright(c) OleksandrZhabenko 2020
LicenseMIT
Maintainerolexandr543@yahoo.com
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

Phonetic.Languages.Ukrainian.PrepareText

Description

Helps to order the 7 or less Ukrainian words (or their concatenations) to obtain (to some extent) suitable for poetry or music text. Earlier it has been a module DobutokO.Poetry.Ukrainian.PrepareText from the dobutokO-poetry package. In particular, this module can be used to prepare the Ukrainian text by applying the most needed grammar to avoid misunderstanding for the produced text. The attention is paid to the prepositions, pronouns, conjunctions and particles that are most commonly connected (or not) in a significant way with the next text. Uses the information from: https://uk.wikipedia.org/wiki/%D0%A1%D0%BF%D0%BE%D0%BB%D1%83%D1%87%D0%BD%D0%B8%D0%BA and https://uk.wikipedia.org/wiki/%D0%A7%D0%B0%D1%81%D1%82%D0%BA%D0%B0_(%D0%BC%D0%BE%D0%B2%D0%BE%D0%B7%D0%BD%D0%B0%D0%B2%D1%81%D1%82%D0%B2%D0%BE)

Uses arrays instead of vectors.

Synopsis

Basic functions

prepareText :: String -> [String] Source #

Is used to convert a Ukrainian text into list of String each of which is ready to be used by the functions from the other modules in the package. It applies minimal grammar links and connections between the most commonly used Ukrainian words that "should" be paired and not dealt with separately to avoid the misinterpretation and preserve maximum of the semantics for the "phonetic" language on the Ukrainian basis.

prepareTextN :: Int -> String -> [String] Source #

A generalized variant of the prepareText with the arbitrary maximum number of the words in the lines given as the first argument.

complexWords :: [String] -> [String] Source #

Concatenates complex words in Ukrainian so that they are not separated further by possible words order rearrangements (because they are treated as a single word). This is needed to preserve basic grammar in phonetic languages.

splitLines :: [String] -> [String] Source #

Since 0.2.1.0 version the function is recursive and is applied so that all returned elements (String) are no longer than 7 words in them.

splitLinesN :: Int -> [String] -> [String] Source #

A generalized variant of the splitLines with the arbitrary maximum number of the words in the lines given as the first argument.

isConcatenated :: String -> Bool Source #

Since the dobutokO-poetry version 0.16.3.0 the (||) operator has been changed to the (&&). The idea is that these words are the ones that are pronouns and they "should" be treated (by the author's understanding) as independent words.

Used to transform after convertToProperUkrainian from mmsyn6ukr package

aux4 :: String -> Char Source #

Can be used to prepare the text after convertToProperUkrainian from Ukrainian module from mmsyn6ukr package so that all the String can be represented as unique Char.