Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Maintainer | olexandr543@yahoo.com |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
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
- prepareText :: String -> [String]
- prepareTextN :: Int -> String -> [String]
- complexWords :: [String] -> [String]
- splitLines :: [String] -> [String]
- splitLinesN :: Int -> [String] -> [String]
- auxiliary1 :: [String] -> [String]
- isPreposition :: String -> Bool
- isConcatenated :: String -> Bool
- isSpC :: Char -> Bool
- concatenated2 :: [String] -> [String]
- jottedConv :: String -> String
- aux4 :: String -> Char
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.
auxiliary1 :: [String] -> [String] Source #
isPreposition :: String -> Bool Source #
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.
concatenated2 :: [String] -> [String] Source #
jottedConv :: String -> String Source #