Copyright | (c) Oleksandr Zhabenko 2020-2023 |
---|---|
License | MIT |
Maintainer | oleksandr.zhabenko@yahoo.com |
Stability | Experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Extensions | BangPatterns |
Functions to encode and decode String
-> \['Int8'\] used in the Simple/Main.hs code.
Firstly were taken from the phonetic-languages-simplified-lists-examples
package.
Is modified from the module Phladiprelio.Simplified.DeEnCoding from the
phonetic-languages-simplified-examples-common
package.
Synopsis
- encodeToInt :: Ord a => [[a]] -> Int
- indexedL :: Foldable t => b -> t b -> [(Int8, b)]
- trans2 :: [[a]] -> [(Int8, [a])]
- trans232 :: [[a]] -> [(Int, [a])]
- int2l :: Int -> [Int8]
- decodeToStr :: [Int8] -> String -> String
- decodeToReadyFCPL :: [Int8] -> ReadyForConstructionPL -> ReadyForConstructionPL
- toHeap :: [String] -> Heap Int
- toHeapR :: [ReadyForConstructionPL] -> Heap Int
- fromHeap :: String -> Heap Int -> [String]
- fromHeapReadyFCPL :: ReadyForConstructionPL -> Heap Int -> [ReadyForConstructionPL]
- intersectInterResults :: [String] -> [String] -> [String]
- intersectInterReadyFCPL :: (String -> [[[Int8]]]) -> [ReadyForConstructionPL] -> [ReadyForConstructionPL] -> [ReadyForConstructionPL]
- intersectInterReadyFCPL2 :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> [ReadyForConstructionPL] -> [ReadyForConstructionPL] -> [ReadyForConstructionPL]
- newLineEnding :: String
- foldlI :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> [[ReadyForConstructionPL]] -> [ReadyForConstructionPL]
Documentation
encodeToInt :: Ord a => [[a]] -> Int Source #
indexedL :: Foldable t => b -> t b -> [(Int8, b)] Source #
Is taken mostly from the Phladiprelio.Simplified.Lists.UniquenessPeriodsG module from the phonetic-languages-simplified-common
package.
decodeToStr :: [Int8] -> String -> String Source #
So for the strings consisting of no more than 10 words: > decodeToStr (int2l . encodeToInt . words $ xs) xs == unwords . words $ xs
decodeToReadyFCPL :: [Int8] -> ReadyForConstructionPL -> ReadyForConstructionPL Source #
For the ReadyForConstructionUkr
that corresponds to the String
consisting of no more than 10 words.
toHeap :: [String] -> Heap Int Source #
Every String
consists of words with whitespace symbols in between.
toHeapR :: [ReadyForConstructionPL] -> Heap Int Source #
Every ReadyForConstructionUkr
corresponds to the String
that consists of words with whitespace symbols in between.
The list must be consistent -- either FSL
-constructed or Str
-constructed.
intersectInterReadyFCPL :: (String -> [[[Int8]]]) -> [ReadyForConstructionPL] -> [ReadyForConstructionPL] -> [ReadyForConstructionPL] Source #
It is not well tested. Just as the whole module.
intersectInterReadyFCPL2 Source #
:: GWritingSystemPRPLX | Data used to obtain the phonetic language representation of the text. |
-> [(Char, Char)] | The pairs of the |
-> CharPhoneticClassification | The |
-> SegmentRulesG | |
-> String | Corresponds to the '0' symbol delimiter in the |
-> String | Corresponds to the '1' and '-' symbol delimiters in the |
-> String | |
-> [ReadyForConstructionPL] | |
-> [ReadyForConstructionPL] | |
-> [ReadyForConstructionPL] |
newLineEnding :: String Source #
Auxiliary printing function to define the line ending in some cases. Is taken from the
Languages.UniquenessPeriods.Vector.General.DebugG module from the phonetic-languages-general
package
:: GWritingSystemPRPLX | Data used to obtain the phonetic language representation of the text. |
-> [(Char, Char)] | The pairs of the |
-> CharPhoneticClassification | The |
-> SegmentRulesG | |
-> String | Corresponds to the '0' symbol delimiter in the |
-> String | Corresponds to the '1' and '-' symbol delimiters in the |
-> String | |
-> [[ReadyForConstructionPL]] | |
-> [ReadyForConstructionPL] |