packages feed

rhythmic-sequences 0.3.0.0 → 0.4.0.0

raw patch · 4 files changed

+57/−9 lines, 4 files

Files

CHANGELOG.md view
@@ -58,3 +58,7 @@ the values in the hashList function for the positive values of the second parameter in  the argument HashCorrections in it. +## 0.4.0.0 -- 2023-08-14++* Fourth version. Added a new function for working with points of incongruences showZerosFor2Period.+
README.md view
@@ -1,4 +1,4 @@-This is one of the core components of the other new project that uses the ideas similar to the ones in the project+This is one of the core components of the other new improved project that uses the ideas similar to the ones in the project https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array and  https://hackage.haskell.org/package/phonetic-languages-simplified-genaralized-examples-array@@ -6,6 +6,15 @@ Discovering the Preferred Line Options — that is to the topic of creating texts and music with some properties, e. g. poetic. +For some theoretical end experimental background for the usage of the library and its successors,+see the papers below:++See for the theoretical idea the paper by the link:++[Why some lines are easy to pronounce and others are not, or prosodic unpredictability as a characteristic of text](https://www.academia.edu/105067761/Why_some_lines_are_easy_to_pronounce_and_others_are_not_or_prosodic_unpredictability_as_a_characteristic_of_text)++[Чому деякі рядки легко вимовляти, а інші — ні, або просодична неспрогнозованість як характеристика тексту](https://www.academia.edu/105067723/%D0%A7%D0%BE%D0%BC%D1%83_%D0%B4%D0%B5%D1%8F%D0%BA%D1%96_%D1%80%D1%8F%D0%B4%D0%BA%D0%B8_%D0%BB%D0%B5%D0%B3%D0%BA%D0%BE_%D0%B2%D0%B8%D0%BC%D0%BE%D0%B2%D0%BB%D1%8F%D1%82%D0%B8_%D0%B0_%D1%96%D0%BD%D1%88%D1%96_%D0%BD%D1%96_%D0%B0%D0%B1%D0%BE_%D0%BF%D1%80%D0%BE%D1%81%D0%BE%D0%B4%D0%B8%D1%87%D0%BD%D0%B0_%D0%BD%D0%B5%D1%81%D0%BF%D1%80%D0%BE%D0%B3%D0%BD%D0%BE%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D1%96%D1%81%D1%82%D1%8C_%D1%8F%D0%BA_%D1%85%D0%B0%D1%80%D0%B0%D0%BA%D1%82%D0%B5%D1%80%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0_%D1%82%D0%B5%D0%BA%D1%81%D1%82%D1%83)+ The previous extended implementation and its documentation are at the links:  https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array@@ -29,4 +38,10 @@ using the URL:  [Contact Foundation GASTROSTARS](https://gastrostars.nl/hou-mij-op-de-hoogte)++or:++[Donation Page](https://gastrostars.nl/doneren)++The version 0.4.0.0 is devoted to [Enzo Kok](https://www.enzokok.nl) because on the 14th of August is his Birthday. 
rhythmic-sequences.cabal view
@@ -2,13 +2,13 @@ name:               rhythmic-sequences  -- The package version.-version:            0.3.0.0+version:            0.4.0.0  -- A short (one-line) description of the package. synopsis:-    Library to deal with rhythmicity of short sequences+    Improved library to deal with rhythmicity of short sequences -- A longer description of the package.-description: The library deals with the model similar to the one given at the work https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.pdf and https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array+description: The improved library that deals with the model similar to the one given at the work https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.pdf and https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array   -- The license under which the package is released.
src/Rhythmicity/MarkerSeqs.hs view
@@ -27,6 +27,7 @@ import Rhythmicity.BasicF import Text.Read import GHC.Enum (fromEnum)+import GHC.Arr (listArray,unsafeAt)  -- | The similar function is since @base-4.16.0.0@ in the 'Numeric' module. Is not used  -- further, is provided here mostly for testing purposes.@@ -180,11 +181,15 @@ -- https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html#SaaW). -- For more information on the metrical feet you can see e. g.  ----- > @article{kagerfeet,--- >   title={Feet and metrical stress},--- >   author={Kager, Rene},--- >   journal={This page intentionally left blank},--- >   pages={195}+-- > @article{hyde2002restrictive,+-- >   title={A restrictive theory of metrical stress},+-- >   author={Hyde, Brett},+-- >   journal={Phonology},+-- >   volume={19},+-- >   number={3},+-- >   pages={313--359},+-- >   year={2002},+-- >   publisher={Cambridge University Press} -- > } -- grouppingR :: String -> (Int8, [Int8])@@ -273,4 +278,28 @@ -- slower than the former one). toNum2 :: [Int8] -> Integer toNum2 xs = (sum . map (shiftL 1 . fromEnum) $ xs)::Integer++------------------------------------------------------++-- | Function for generating the information to be used for evaluation of the points of the uncongruencies' influences on the pauses in the case of the period of the line is equal to 2 (two-syllable meter).+--  See for the theoretical idea the paper by the link:+--  https://www.academia.edu/105067761/Why_some_lines_are_easy_to_pronounce_and_others_are_not_or_prosodic_unpredictability_as_a_characteristic_of_text (English text)+--  https://www.academia.edu/105067723/%D0%A7%D0%BE%D0%BC%D1%83_%D0%B4%D0%B5%D1%8F%D0%BA%D1%96_%D1%80%D1%8F%D0%B4%D0%BA%D0%B8_%D0%BB%D0%B5%D0%B3%D0%BA%D0%BE_%D0%B2%D0%B8%D0%BC%D0%BE%D0%B2%D0%BB%D1%8F%D1%82%D0%B8_%D0%B0_%D1%96%D0%BD%D1%88%D1%96_%D0%BD%D1%96_%D0%B0%D0%B1%D0%BE_%D0%BF%D1%80%D0%BE%D1%81%D0%BE%D0%B4%D0%B8%D1%87%D0%BD%D0%B0_%D0%BD%D0%B5%D1%81%D0%BF%D1%80%D0%BE%D0%B3%D0%BD%D0%BE%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D1%96%D1%81%D1%82%D1%8C_%D1%8F%D0%BA_%D1%85%D0%B0%D1%80%D0%B0%D0%BA%D1%82%D0%B5%D1%80%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0_%D1%82%D0%B5%D0%BA%D1%81%D1%82%D1%83 (Ukrainian text)+showZerosFor2Period +  :: (Ord a) => [[a]] -- The representation of the data to be analysed.+  -> Int +  -> (b -> String)+  -> [[[b]]]+  -> (String, [Integer])+showZerosFor2Period structData syllN f sylls = (breaks, rs)+  where rs = concat . countHashesPrioritized . getHashes2 2 [1] . mconcat $ structData+        indeces = findIndices (== 0) rs+        resSylls = listArray (0,syllN - 1) . map (concatMap f) . concat $ sylls+        addlist +           | syllN `rem` 2 == 0 = [0,1,2] : ((splitF 2 . take (syllN - 6) $ [3,4..]) `mappend` [[syllN - 3, syllN - 2, syllN - 1]])+           | otherwise = [0,1,2] : (splitF 2 . take (syllN - 3) $ [3,4..])+        arrinds = listArray (0,syllN `quot` 2) addlist+        neededinds = map (unsafeAt arrinds) indeces+        neededsylls = map (map (unsafeAt resSylls)) neededinds+        breaks = intercalate " ... " . map unwords $ neededsylls