From c6414b7d453d8ef1b51b23fb9227a28be9b9e3f0 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 29 Aug 2025 22:31:32 +0200 Subject: [PATCH] update --- data/styles/Rosetta/Common.css | 14 ++ flake.nix | 5 +- tests/Language/ChineseSpec.hs | 6 +- tests/Language/EnglishSpec.hs | 256 +++++++++++++++++++++++++++++++-- tests/Language/FrenchSpec.hs | 111 +++++++++++++- tests/Recipes/recipe.css | 3 + tests/Spec.hs | 35 ++--- worksheets.cabal | 4 + 8 files changed, 398 insertions(+), 36 deletions(-) create mode 100644 tests/Recipes/recipe.css diff --git a/data/styles/Rosetta/Common.css b/data/styles/Rosetta/Common.css index e020bc0..a81fb83 100644 --- a/data/styles/Rosetta/Common.css +++ b/data/styles/Rosetta/Common.css @@ -164,6 +164,13 @@ box-sizing:border-box; } .sentence-cell.pronunciation.cell-even.cell-depends-on-meaning:before { + position:absolute; + display:block; + content:''; + bottom:0; + height:4px; + width:var(--pronunciation-border-size); + box-sizing:border-box; width:100%; border-bottom:var(--pronunciation-border-size) dotted var(--pronunciation-even); } @@ -201,6 +208,13 @@ box-sizing:border-box; } .sentence-cell.pronunciation.cell-odd.cell-depends-on-meaning:after { + position:absolute; + display:block; + content:''; + right:0; + bottom:0; + height:4px; + box-sizing:border-box; width:100%; border-bottom:var(--pronunciation-border-size) dotted var(--pronunciation-odd); } diff --git a/flake.nix b/flake.nix index 879d498..c91fa49 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ { description = "Worksheet"; inputs = { - nixpkgs.url = "flake:nixpkgs"; + nixpkgs.url = "github:NixOS/nixpkgs/9cb344e96d5b6918e94e1bca2d9f3ea1e9615545"; git-hooks.url = "github:cachix/git-hooks.nix"; git-hooks.inputs.nixpkgs.follows = "nixpkgs"; symantic-base = { url = "git://git.sourcephile.fr/haskell/symantic-base.git"; flake = false; }; @@ -65,6 +65,9 @@ haskellPackages.hlint #pkgs.git-chglog pkgs.reuse + pkgs.xdot + pkgs.zgrviewer + pkgs.gephi ]; withHoogle = false; inherit (inputs.self.checks.${system}.git-hooks-check) shellHook; diff --git a/tests/Language/ChineseSpec.hs b/tests/Language/ChineseSpec.hs index 48ec825..e57dbd3 100644 --- a/tests/Language/ChineseSpec.hs +++ b/tests/Language/ChineseSpec.hs @@ -69,8 +69,8 @@ spec = goldenShowWithOuter "keysWithoutFreq" $ keysWithoutFreq >>> Set.size describe "dictToWeights" do aroundAllWith (\k dict -> k (Chinese.dictToWeights dict)) do - goldenShowWithOuter "size" Map.size - goldenShowWithOuter "take_10" $ Map.take 10 + goldenShowWithOuter "size" $ Chinese.weightsMap >>> Map.size + goldenShowWithOuter "take_10" $ Chinese.weightsMap >>> Map.take 10 describe "dictOrder" do aroundAllWith (\k weights -> k ((Chinese.dictOrder weights))) do goldenBuilderWithOuter "all" chineseOrderTsv @@ -86,7 +86,7 @@ chineseOrderTsv (Chinese.ChineseOrder o) = ] & mconcat | (Down weight, keyToBC) <- o & Map.toList - , key <- keyToBC & Map.keys + , key <- keyToBC & Chinese.weightsMap & Map.keys ] & mconcat diff --git a/tests/Language/EnglishSpec.hs b/tests/Language/EnglishSpec.hs index 889368b..1740bf2 100644 --- a/tests/Language/EnglishSpec.hs +++ b/tests/Language/EnglishSpec.hs @@ -18,7 +18,7 @@ import Data.Validity.Map () import Data.Validity.Set () import Data.Validity.Text () import Language -import Language.English +import Language.English hiding (pronunciationRules) import Language.English qualified as English import Language.Pronunciation (ExampleLiteral (..), Lexeme (..), Rule (..), RuleLexemes, after, before, begining, ending, meaning, occurence, rule, silent, word) import Language.Pronunciation qualified as Pron @@ -73,115 +73,351 @@ sentences = -- -- , [LexemeVowel] <> ending "sy" := Rule{rulePron = [[LexemeVowel] <> ending "sy" := "zi"], ruleExamples = []} pronunciationRules :: Pron.Table pronunciationRules = - [ -- "chry" := Rule{rulePron = [], ruleExamples = ["chrysanthemum" := "kɹɪ.sæn.θə.məm"]} - -- , [LexemeVowel] <> "san" := Rule{rulePron = [[LexemeVowel] <> "san" := "sæn"], ruleExamples = ["chrysanthemum" := "kɹɪ.sæn.θə.məm"]} - -- , "themum" := Rule{rulePron = ["the" := "θə", "mum" := "məm"], ruleExamples = ["chrysanthemum" := "kɹɪ.sæn.θə.məm"]} - "chrysanthemum" := Rule{rulePron = ["chry" := "kɹɪ", "san" := "ˈsæn", "the" := "θə", "mum" := "məm"], ruleExamples = ["chrysanthemum" := "kɹɪ.ˈsæn.θə.məm"]} + [ "chrysanthemum" := Rule{rulePron = ["chry" := "kɹɪ", "san" := "ˈsæn", "the" := "θə", "mum" := "məm"], ruleExamples = ["chrysanthemum" := "kɹɪ.ˈsæn.θə.məm"]} , "Andúril" := Rule{rulePron = ["An" := "æn", "dú" := "dy", "ril" := "ɹil"], ruleExamples = ["Andúril" := "æn.dy.ɹil"]} , "Angmar" := Rule{rulePron = ["Ang" := "ˈæng", "mar" := "maɹ"], ruleExamples = ["Angmar" := "ˈæng.maɹ"]} + , "Aragorn" := Rule{rulePron = ["A" := "ˈa", "ra" := "ra", "gorn" := "ɡɔrn"], ruleExamples = ["Aragorn" := "ˈa.ra.ɡɔrn"]} + , "Arwen" := Rule{rulePron = ["Ar" := "ɑɹ", "wen" := "wɛn"], ruleExamples = ["Arwen" := "ɑɹ.wɛn"]} , "Barad-dûr" := Rule{rulePron = ["Ba" := "ba", "rad" := "ɹad", "-" := [], "dûr" := "dyɹ"], ruleExamples = ["Barad-dûr" := "ba.ɹad.dyɹ"]} + , "Boromir" := Rule{rulePron = ["Bo" := "bo", "ro" := "ɹəʊ", "mir" := "miɹ"], ruleExamples = ["Boromir" := "bo.ɹəʊ.miɹ"]} , "Elendil" := Rule{rulePron = ["E" := "ɛ", "len" := "ˈlen", "dil" := "dil"], ruleExamples = ["Elendil" := "ɛ.ˈlen.dil"]} , "Escherichia" := Rule{rulePron = ["E" := "ˌɛ", "sche" := "ʃə", "ri" := "ˈɹɪ", "chia" := "kiə"], ruleExamples = ["Escherichia" := "ˌɛ.ʃə.ˈɹɪ.kiə"]} , "Frodo" := Rule{rulePron = ["Fro" := "ˈfɹɒd", "do" := "dəʊ"], ruleExamples = ["Frodo" := "ˈfɹɒd.dəʊ"]} + , "Galadriel" := Rule{rulePron = ["Ga" := "ɡa", "la" := "ˈla", "dri" := "dri", "el" := "ɛl"], ruleExamples = ["Galadriel" := "ɡa.ˈla.dri.ɛl"]} + , "Gandalf" := Rule{rulePron = ["gand" := "ˈgænd", "alf" := "ɑlf"], ruleExamples = ["Gandalf" := "ˈgænd.ɑlf"]} + , "Gimli" := Rule{rulePron = ["Gim" := "ˈgɪm", "li" := "liː"], ruleExamples = ["Gimli" := "ˈgɪm.liː"]} , "Gollum" := Rule{rulePron = ["Go" := "ˈgɑ", "llum" := "ləm"], ruleExamples = ["Gollum" := "ˈgɑ.ləm"]} + , "Gondor" := Rule{rulePron = ["gon" := "ɡɒn", "dor" := "dɔɹ"], ruleExamples = ["Gondor" := "ɡɒn.dɔɹ"]} + , "Gwaihir" := Rule{rulePron = ["gwai" := "gwaɪ", "hir" := "hɪɹ"], ruleExamples = ["Gwaihir" := "gwaɪ.hɪɹ"]} , "Isildur" := Rule{rulePron = ["I" := "i", "sil" := "ˈsil", "dur" := "duɹ"], ruleExamples = ["Isildur" := "i.ˈsil.duɹ"]} + , "Khazad-dûm" := Rule{rulePron = ["Kha" := "kə", "zad" := "ˈzɑd", "-" := [], "dûm" := "dum"], ruleExamples = ["Khazad-dûm" := "kə.ˈzɑd.dum"]} + , "Legolas" := Rule{rulePron = ["Le" := "ˈlɛ", "go" := "ɡɔ", "las" := "las"], ruleExamples = ["Legolas" := "ˈlɛ.ɡɔ.las"]} + , "Lindon" := Rule{rulePron = ["Lin" := "ˈlɪn", "don" := "dɒn"], ruleExamples = ["Lindon" := "ˈlɪn.dɒn"]} , "Mordor" := Rule{rulePron = ["Mor" := "ˈmɔɹ", "dor" := "dɔɹ"], ruleExamples = ["Mordor" := "ˈmɔɹ.dɔɹ"]} + , "Moria" := Rule{rulePron = ["Mo" := "mɔ", "ria" := "ʁja"], ruleExamples = ["Moria" := "mɔ.ʁja"]} , "Narsil" := Rule{rulePron = ["Nar" := "naɹ", "sil" := "sil"], ruleExamples = ["Narsil" := "naɹ.sil"]} + , "Pippin" := Rule{rulePron = ["pi" := "ˈpɪ", "ppin" := "pɪn"], ruleExamples = ["Pippin" := "ˈpɪ.pɪn"]} , "Sam" := Rule{rulePron = ["Sam" := "ˈsæm"], ruleExamples = ["Sam" := "ˈsæm"]} + , "Saruman" := Rule{rulePron = ["sa" := "ˈsɑ", "ru" := "ru", "man" := "mɑn"], ruleExamples = ["Saruman" := "ˈsɑ.ru.mɑn"]} , "Sauron" := Rule{rulePron = ["Sau" := "ˈsaʊ", "ron" := "ɹɒn"], ruleExamples = ["Sauron" := "ˈsaʊ.ɹɒn"]} + , "Shelob" := Rule{rulePron = ["she" := "ʃiː", "lob" := "lɒb"], ruleExamples = ["Shelob" := "ʃiː.lɒb"]} + , "Smaug" := Rule{rulePron = ["Smaug" := "smaʊɡ"], ruleExamples = ["Smaug" := "smaʊɡ"]} + , "Thorin" := Rule{rulePron = ["Tho" := "θɔː", "rin" := "ɹɪn"], ruleExamples = ["Thorin" := "θɔː.ɹɪn"]} + , "Thranduil" := Rule{rulePron = ["Thran" := "θɹæn", "duil" := "dyil"], ruleExamples = ["Thranduil" := "θɹæn.dyil"]} + , "Uruk-hai" := Rule{rulePron = ["U" := "u", "ruk" := "ɹuk", "-" := [], "hai" := "aj"], ruleExamples = ["Uruk-hai" := "u.ɹuk.aj"]} + , "Valinor" := Rule{rulePron = ["Va" := "va", "li" := "lɪ", "nor" := "nɔɹ"], ruleExamples = ["Valinor" := "va.lɪ.nɔɹ"]} + , "above" := Rule{rulePron = ["a" := "ə", "bove" := "ˈbʌv"], ruleExamples = ["above" := "ə.ˈbʌv"]} + , "adventure" := Rule{rulePron = ["ad" := "əd", "ven" := "ˈvɛn", "ture" := "t͡ʃə"], ruleExamples = ["adventure" := "əd.ˈvɛn.t͡ʃə"]} + , "against" := Rule{rulePron = ["a" := "ə", "gainst" := "ˈɡɛnst"], ruleExamples = ["against" := "ə.ˈɡɛnst"]} , "alligator" := Rule{rulePron = ["all" := "ˈæl", "i" := "ɪ", "ga" := "geɪ", "tor" := "tə"], ruleExamples = ["alligator" := "ˈæl.ɪ.geɪ.tə"]} + , "an" := Rule{rulePron = ["an" := "ˈæn"], ruleExamples = ["an" := "ˈæn"]} , "anchor" := Rule{rulePron = ["an" := "ˈæŋ", "kor" := "kə"], ruleExamples = ["anchor" := "ˈæŋ.kə"]} + , "ant" := Rule{rulePron = ["ant" := "ænt"], ruleExamples = ["ant" := "ænt"]} + , "ants" := Rule{rulePron = ["ants" := "ænts"], ruleExamples = ["ants" := "ænts"]} + , "are" := Rule{rulePron = ["are" := "ɑː"], ruleExamples = ["are" := "ɑː"]} + , "around" := Rule{rulePron = ["a" := "ə", "round" := "ˈɹaʊnd"], ruleExamples = ["around" := "ə.ˈɹaʊnd"]} + , "assault" := Rule{rulePron = ["a" := "ə", "ssault" := "ˈsɒlt"], ruleExamples = ["assault" := "ə.ˈsɒlt"]} + , "assaults" := Rule{rulePron = ["a" := "ə", "ssaults" := "ˈsɒlts"], ruleExamples = ["assaults" := "ə.ˈsɒlts"]} , "at" := Rule{rulePron = ["at" := "æt"], ruleExamples = ["at" := "æt"]} + , "axe" := Rule{rulePron = ["axe" := "æks"], ruleExamples = ["axe" := "æks"]} + , "back" := Rule{rulePron = ["back" := "bæk"], ruleExamples = ["back" := "bæk"]} + , "baggins" := Rule{rulePron = ["ba" := "ˈbæ", "ggins" := "gɪnz"], ruleExamples = ["baggins" := "ˈbæ.gɪnz"]} + , "balrog" := Rule{rulePron = ["bal" := "ˈbal", "rog" := "ɹɑg"], ruleExamples = ["balrog" := "ˈbal.ɹɑg"]} , "bat" := Rule{rulePron = ["bat" := "bæt"], ruleExamples = ["bat" := "bæt"]} + , "be" := Rule{rulePron = ["be" := "biː"], ruleExamples = ["be" := "biː"]} , "bee" := Rule{rulePron = ["bee" := "ˈbiː"], ruleExamples = ["beeing" := "ˈbiː.ɪŋ"]} + , "before" := Rule{rulePron = ["be" := "bɪ", "fore" := "ˈfɔː"], ruleExamples = ["before" := "bɪ.ˈfɔː"]} + , "big" := Rule{rulePron = ["big" := "bɪg"], ruleExamples = ["big" := "bɪg"]} + , "bilbo" := Rule{rulePron = ["bil" := "ˈbɪl", "bo" := "bəʊ"], ruleExamples = ["bilbo" := "ˈbɪl.bəʊ"]} + , "bird" := Rule{rulePron = ["bird" := "bəːd"], ruleExamples = ["blackbird" := "blak.bəːd"]} + , "black" := Rule{rulePron = ["black" := "blak"], ruleExamples = ["blackbird" := "blak.bəːd"]} , "blade" := Rule{rulePron = ["blade" := "bleɪd"], ruleExamples = ["blade" := "bleɪd"]} + , "bladed" := Rule{rulePron = ["bla" := "ˈbleɪ", "ded" := "dɪd"], ruleExamples = ["bladed" := "ˈbleɪ.dɪd"]} + , "blocks" := Rule{rulePron = ["blocks" := "blɒks"], ruleExamples = ["blocks" := "blɒks"]} , "board" := Rule{rulePron = ["board" := "bɔːd"], ruleExamples = ["board" := "bɔːd"]} , "boat" := Rule{rulePron = ["boat" := "bəʊt"], ruleExamples = ["boat" := "bəʊt"]} , "body" := Rule{rulePron = ["bod" := "ˈbɒd", "y" := "i"], ruleExamples = ["body" := "ˈbɒd.i"]} + , "both" := Rule{rulePron = ["both" := "bəʊθ"], ruleExamples = ["both" := "bəʊθ"]} + , "breath" := Rule{rulePron = ["breath" := "ˈbɹiːð"], ruleExamples = ["breath" := "ˈbɹiːð"]} + , "bridge" := Rule{rulePron = ["bridge" := "bɹɪd͡ʒ"], ruleExamples = ["bridge" := "bɹɪd͡ʒ"]} + , "bright" := Rule{rulePron = ["bright" := "bɹaɪt"], ruleExamples = ["bright" := "bɹaɪt"]} , "buoy" := Rule{rulePron = ["buoy" := "ˈbɔɪ"], ruleExamples = ["buoy" := "ˈbɔɪ"]} + , "busy" := Rule{rulePron = ["bu" := "ˈbɪ", "sy" := "zi"], ruleExamples = ["busy" := "ˈbɪ.zi"]} + , "buzzard" := Rule{rulePron = ["buzz" := "ˈbʌz", "ard" := "əɹd"], ruleExamples = ["buzzard" := "ˈbʌz.əɹd"]} + , "by" := Rule{rulePron = ["by" := "baɪ"], ruleExamples = ["by" := "baɪ"]} , "calla" := Rule{rulePron = ["ca" := "kæ", "lla" := "lə"], ruleExamples = ["calla" := "kæ.lə"]} + , "can" := Rule{rulePron = ["can" := "ˈkæn"], ruleExamples = ["can" := "ˈkæn"]} , "canal" := Rule{rulePron = ["ca" := "kə", "nal" := "ˈnæl"], ruleExamples = ["canal" := "kə.ˈnæl"]} , "canoe" := Rule{rulePron = ["ca" := "kə", "noe" := "ˈnu"], ruleExamples = ["canoeing" := "kə.ˈnu.ɪŋ"]} , "cap" := Rule{rulePron = ["cap" := "kæp"], ruleExamples = ["cap" := "kæp"]} + , "car" := Rule{rulePron = ["car" := "kɑː"], ruleExamples = ["car" := "kɑː"]} , "carnation" := Rule{rulePron = ["car" := "kɑː", "na" := "ˈneɪ", "tion" := "ʃən"], ruleExamples = ["carnation" := "kɑː.ˈneɪ.ʃən"]} + , "cast" := Rule{rulePron = ["cast" := "kɑːst"], ruleExamples = ["cast" := "kɑːst"]} + , "castle" := Rule{rulePron = ["castle" := "kɑːsl̩"], ruleExamples = ["castle" := "kɑːsl̩"]} + , "casts" := Rule{rulePron = ["casts" := "kɑːsts"], ruleExamples = ["casts" := "kɑːsts"]} , "cat" := Rule{rulePron = ["cat" := "kæt"], ruleExamples = ["cat" := "kæt"]} + , "close" := Rule{rulePron = ["close" := "kləʊz"], ruleExamples = ["close" := "kləʊz"]} , "coli" := Rule{rulePron = ["co" := "ˈkoʊ", "li" := "laɪ"], ruleExamples = ["Escherichia coli" := "ˌɛ.ʃə.ˈɹɪ.kiə.ˈkoʊ.laɪ"]} + , "command" := Rule{rulePron = ["co" := "kə", "mmand" := "ˈmɑːnd"], ruleExamples = ["command" := "kə.ˈmɑːnd"]} + , "control" := Rule{rulePron = ["con" := "kən", "trol" := "ˈtɹəʊl"], ruleExamples = ["control" := "kən.ˈtɹəʊl"]} + , "crane" := Rule{rulePron = ["crane" := "kɹeɪn"], ruleExamples = ["crane" := "kɹeɪn"]} + , "crow" := Rule{rulePron = ["crow" := "kɹəʊ"], ruleExamples = ["crow" := "kɹəʊ"]} , "crown" := Rule{rulePron = ["crown" := "kɹaʊn"], ruleExamples = ["crown" := "kɹaʊn"]} + , "cub" := Rule{rulePron = ["cub" := "kʌb"], ruleExamples = ["cub" := "kʌb"]} + , "cut" := Rule{rulePron = ["cut" := "kʌt"], ruleExamples = ["cut" := "kʌt"]} , "daffodil" := Rule{rulePron = ["da" := "ˈdæ", "ffo" := "fə", "dil" := "ˌdɪl"], ruleExamples = ["daffodil" := "ˈdæ.fə.ˌdɪl"]} , "dagger" := Rule{rulePron = ["da" := "ˈdæ", "gger" := "gə"], ruleExamples = ["dagger" := "ˈdæ.gə"]} , "daisy" := Rule{rulePron = ["dai" := "ˈdeɪ", "sy" := "zi"], ruleExamples = ["daisy" := "ˈdeɪ.zi"]} , "dandelion" := Rule{rulePron = ["dan" := "ˈdæn", "de" := "dɪ", "li" := "ˌlaɪ", "on" := "ən"], ruleExamples = ["dandelion" := "ˈdæn.dɪ.ˌlaɪ.ən"]} , "dark" := Rule{rulePron = ["dark" := "dɑːk"], ruleExamples = ["dark" := "dɑːk"]} + , "dead" := Rule{rulePron = ["dead" := "dɛd"], ruleExamples = ["dead" := "dɛd"]} + , "death" := Rule{rulePron = ["death" := "dɛθ"], ruleExamples = ["death" := "dɛθ"]} , "deceiver" := Rule{rulePron = ["de" := "dɪ", "cei" := "ˈsiː", "ver" := "və"], ruleExamples = ["deceiver" := "dɪ.ˈsiː.və"]} , "dinghy" := Rule{rulePron = ["dingh" := "ˈdɪŋ", "y" := "i"], ruleExamples = ["dinghy" := "ˈdɪŋ.i"]} , "diving" := Rule{rulePron = ["di" := "ˈdaɪ", "ving" := "vɪŋ"], ruleExamples = ["diving" := "ˈdaɪ.vɪŋ"]} , "doom" := Rule{rulePron = ["doom" := "duːm"], ruleExamples = ["doom" := "duːm"]} + , "door" := Rule{rulePron = ["door" := "dɔː"], ruleExamples = ["door" := "dɔː"]} + , "doors" := Rule{rulePron = ["doors" := "dɔːz"], ruleExamples = ["doors" := "dɔːz"]} + , "double" := Rule{rulePron = ["dou" := "ˈdʌ", "ble" := "bl"], ruleExamples = ["double" := "ˈdʌ.bl"]} + , "dove" := Rule{rulePron = ["dove" := "dʌv"], ruleExamples = ["dove" := "dʌv"]} + , "dragon" := Rule{rulePron = ["dra" := "ˈdɹæ", "gon" := "ɡən"], ruleExamples = ["dragon" := "ˈdɹæ.ɡən"]} + , "drive" := Rule{rulePron = ["drive" := "dɹaɪv"], ruleExamples = ["drive" := "dɹaɪv"]} + , "drives" := Rule{rulePron = ["drives" := "dɹaɪvs"], ruleExamples = ["drives" := "dɹaɪvs"]} + , "dwarf" := Rule{rulePron = ["dwarf" := "dwɔɹf"], ruleExamples = ["dwarf" := "dwɔɹf"]} + , "dwarves" := Rule{rulePron = ["dwarves" := "dwɔːvz"], ruleExamples = ["dwarves" := "dwɔːvz"]} + , "eagle" := Rule{rulePron = ["ea" := "ˈiː", "gle" := "gɫ̩"], ruleExamples = ["eagle" := "ˈiː.gɫ̩"]} + , "earth" := Rule{rulePron = ["earth" := "ɜːθ"], ruleExamples = ["earth" := "ɜːθ"]} + , "eight" := Rule{rulePron = ["eight" := "eɪt"], ruleExamples = ["eight" := "eɪt"]} + , "elf" := Rule{rulePron = ["elf" := "ɛlf"], ruleExamples = ["elf" := "ɛlf"]} + , "elven" := Rule{rulePron = ["el" := "ˈɛl", "ven" := "vn"], ruleExamples = ["elven" := "ˈɛl.vn"]} + , "elves" := Rule{rulePron = ["elves" := "elvz"], ruleExamples = ["elves" := "elvz"]} + , "en" := Rule{rulePron = ["en" := "ɛn"], ruleExamples = ["golden" := "gəʊld.ɛn"]} + , "exhausted" := Rule{rulePron = ["e" := "ɪ", "x" := ["g", "ˈz"], "haus" := "ɔːs", "ted" := "tɪd"], ruleExamples = ["exhausted" := "ɪg.ˈzɔːs.tɪd"]} , "eye" := Rule{rulePron = ["eye" := "aɪ"], ruleExamples = ["eye" := "aɪ"]} + , "face" := Rule{rulePron = ["face" := "feɪs"], ruleExamples = ["face" := "feɪs"]} + , "faces" := Rule{rulePron = ["fa" := "ˈfeɪ", "ses" := "ɪz"], ruleExamples = ["faces" := "ˈfeɪ.sɪz"]} + , "family" := Rule{rulePron = ["fa" := "ˈfæ", "mi" := "mɪ", "ly" := "li"], ruleExamples = ["family" := "ˈfæ.mɪ.li"]} + , "fatally" := Rule{rulePron = ["fa" := "ˈfeɪ", "ta" := "tə", "lly" := "li"], ruleExamples = ["fatally" := "ˈfeɪ.tə.li"]} + , "fax" := Rule{rulePron = ["fax" := "fæks"], ruleExamples = ["fax" := "fæks"]} + , "fellow" := Rule{rulePron = ["fe" := "ˈfɛ", "llow" := "ləʊ"], ruleExamples = ["fellow" := "ˈfɛ.ləʊ"]} , "fight" := Rule{rulePron = ["fight" := "faɪt"], ruleExamples = ["fight" := "faɪt"]} + , "fights" := Rule{rulePron = ["fights" := "faɪts"], ruleExamples = ["fights" := "faɪts"]} + , "filled" := Rule{rulePron = ["filled" := "fɪld"], ruleExamples = ["filled" := "fɪld"]} + , "finger" := Rule{rulePron = ["fin" := "ˈfɪŋ", "ger" := "gə"], ruleExamples = ["finger" := "ˈfɪŋ.gə"]} , "fire" := Rule{rulePron = ["fi" := "ˈfaɪ", "re" := "ə"], ruleExamples = ["fire" := "ˈfaɪ.ə"]} + , "flail" := Rule{rulePron = ["flail" := "fleɪl"], ruleExamples = ["flail" := "fleɪl"]} , "flaming" := Rule{rulePron = ["fla" := "ˈfleɪ", "ming" := "mɪŋ"], ruleExamples = ["flaming" := "ˈfleɪ.mɪŋ"]} + , "flies" := Rule{rulePron = ["flies" := "flaɪz"], ruleExamples = ["flies" := "flaɪz"]} + , "friends" := Rule{rulePron = ["friends" := "fɹɛndz"], ruleExamples = ["friends" := "fɹɛndz"]} + , "frighten" := Rule{rulePron = ["frigh" := "ˈfɹaɪ", "ten" := "tən"], ruleExamples = ["frighten" := "ˈfɹaɪ.tən"]} + , "frightened" := Rule{rulePron = ["frigh" := "ˈfɹaɪ", "tened" := "tn̩d"], ruleExamples = ["frightened" := "ˈfɹaɪ.tn̩d"]} + , "frightens" := Rule{rulePron = ["frigh" := "ˈfɹaɪ", "tens" := "təns"], ruleExamples = ["frightens" := "ˈfɹaɪ.təns"]} , "gangway" := Rule{rulePron = ["gang" := "ˈgæŋ", "way" := "weɪ"], ruleExamples = ["gangway" := "ˈgæŋ.weɪ"]} + , "giant" := Rule{rulePron = ["gi" := "ˈd͡ʒaɪ", "ant" := "ənt"], ruleExamples = ["giant" := "ˈd͡ʒaɪ.ənt"]} , "gifts" := Rule{rulePron = ["gifts" := "gɪfts"], ruleExamples = ["gifts" := "gɪfts"]} + , "giraffe" := Rule{rulePron = ["gi" := "dʒɪ", "raffe" := "ˈɹɑːf"], ruleExamples = ["giraffe" := "dʒɪ.ˈɹɑːf"]} , "goggles" := Rule{rulePron = ["go" := "ˈgɑ", "ggles" := "gəlz"], ruleExamples = ["goggles" := "ˈgɑ.gəlz"]} + , "gold" := Rule{rulePron = ["gold" := "gəʊld"], ruleExamples = ["gold" := "gəʊld"]} + , "grab" := Rule{rulePron = ["grab" := "gɹæb"], ruleExamples = ["grab" := "gɹæb"]} + , "grabs" := Rule{rulePron = ["grabs" := "gɹæbs"], ruleExamples = ["grabs" := "gɹæbs"]} + , "great" := Rule{rulePron = ["great" := "ˈgɹeɪt"], ruleExamples = ["great" := "ˈgɹeɪt"]} + , "grey" := Rule{rulePron = ["grey" := "gɹeɪ"], ruleExamples = ["grey" := "gɹeɪ"]} + , "hand" := Rule{rulePron = ["hand" := "hænd"], ruleExamples = ["hand" := "hænd"]} + , "hands" := Rule{rulePron = ["hands" := "hænds"], ruleExamples = ["hands" := "hænds"]} + , "has" := Rule{rulePron = ["has" := "hæz"], ruleExamples = ["has" := "hæz"]} + , "head" := Rule{rulePron = ["head" := "ˈhɛd"], ruleExamples = ["head" := "ˈhɛd"]} + , "her" := Rule{rulePron = ["her" := "ˈhɜː"], ruleExamples = ["her" := "ˈhɜː"]} -- stressed + , "hippopotamus" := Rule{rulePron = ["hippo" := "ˌhɪpə", "pot" := "ˈpɒt", "a" := "ə", "mus" := "məs"], ruleExamples = ["hippopotamus" := "ˌhɪpə.ˈpɒt.ə.məs"]} + , "his" := Rule{rulePron = ["his" := "ˈhɪz"], ruleExamples = ["his" := "ˈhɪz"]} + , "hobbit" := Rule{rulePron = ["ho" := "ˈhɒ", "bbit" := "bɪt"], ruleExamples = ["hobbit" := "ˈhɒ.bɪt"]} + , "hobbits" := Rule{rulePron = ["ho" := "ˈhɒ", "bbits" := "bɪts"], ruleExamples = ["hobbits" := "ˈhɒ.bɪts"]} , "hold" := Rule{rulePron = ["hold" := "həʊld"], ruleExamples = ["hold" := "həʊld"]} , "holds" := Rule{rulePron = ["holds" := "həʊldz"], ruleExamples = ["holds" := "həʊldz"]} - , "horse" := Rule{rulePron = ["hor" := "hɔː", "se" := "s"], ruleExamples = ["horse" := "hɔː.s"]} + , "honey" := Rule{rulePron = ["ho" := "ˈhʌ", "ney" := "ni"], ruleExamples = ["honey" := "ˈhʌ.ni"]} + , "hood" := Rule{rulePron = ["hood" := "hʊd"], ruleExamples = ["hood" := "hʊd"]} + , "horse" := Rule{rulePron = ["horse" := "hɔːs"], ruleExamples = ["horse" := "hɔːs"]} , "hyacinth" := Rule{rulePron = ["hy" := "ˈhaɪ", "a" := "ə", "cinth" := "sɪnθ"], ruleExamples = ["hyacinth" := "ˈhaɪ.ə.sɪnθ"]} + , "index" := Rule{rulePron = ["in" := "ˈɪn", "dex" := "dɛks"], ruleExamples = ["index" := "ˈɪn.dɛks"]} , "inflatable" := Rule{rulePron = ["in" := "ɪn", "fla" := "ˈfleɪ", "ta" := "tə", "ble" := "bəl"], ruleExamples = ["inflatable" := "ɪn.ˈfleɪ.tə.bəl"]} , "iris" := Rule{rulePron = ["i" := "ˈaɪ", "ris" := "ɹɪs"], ruleExamples = ["iris" := "ˈaɪ.ɹɪs"]} + , "is" := Rule{rulePron = ["is" := "ɪz"], ruleExamples = ["is" := "ɪz"]} , "jacket" := Rule{rulePron = ["jack" := "ˈd͡ʒæk", "et" := "ɪt"], ruleExamples = ["jacket" := "ˈd͡ʒæk.ɪt"]} , "jasmine" := Rule{rulePron = ["jas" := "d͡ʒæz", "mine" := "ˈmɪn"], ruleExamples = ["jasmine" := "d͡ʒæz.ˈmɪn"]} , "jet" := Rule{rulePron = ["jet" := "d͡ʒɛt"], ruleExamples = ["jet" := "d͡ʒɛt"]} , "jetty" := Rule{rulePron = ["jett" := "d͡ʒɛt", "y" := "i"], ruleExamples = ["jetty" := "d͡ʒɛt.i"]} + , "journey" := Rule{rulePron = ["jour" := "ˈd͡ʒɜː", "ney" := "ni"], ruleExamples = ["journey" := "ˈd͡ʒɜː.ni"]} + , "kangaroo" := Rule{rulePron = ["kan" := "ˌkæŋ", "ga" := "gə", "roo" := "ˈɹu"], ruleExamples = ["kangaroo" := "ˌkæŋ.gə.ˈɹu"]} + , "kid" := Rule{rulePron = ["kid" := "kɪd"], ruleExamples = ["kid" := "kɪd"]} , "king" := Rule{rulePron = ["king" := "kɪŋ"], ruleExamples = ["king" := "kɪŋ"]} + , "kneel" := Rule{rulePron = ["kneel" := "niːl"], ruleExamples = ["kneel" := "niːl"]} + , "kneels" := Rule{rulePron = ["kneels" := "niːlz"], ruleExamples = ["kneels" := "niːlz"]} + , "knight" := Rule{rulePron = ["knight" := "naɪt"], ruleExamples = ["knight" := "naɪt"]} , "life" := Rule{rulePron = ["life" := "laɪf"], ruleExamples = ["life" := "laɪf"]} + , "light" := Rule{rulePron = ["light" := "laɪt"], ruleExamples = ["light" := "laɪt"]} , "lilly" := Rule{rulePron = ["lill" := "ˈlɪl", "y" := "i"], ruleExamples = ["lilly" := "ˈlɪl.i"]} , "lily" := Rule{rulePron = ["lil" := "ˈlɪ", "ly" := "li"], ruleExamples = ["lily" := "ˈlɪ.li"]} , "liner" := Rule{rulePron = ["li" := "ˈlaɪ", "ner" := "nə"], ruleExamples = ["liner" := "ˈlaɪ.nə"]} + , "lion" := Rule{rulePron = ["lion" := "ˈlaɪən"], ruleExamples = ["lion" := "ˈlaɪən"]} + , "lioness" := Rule{rulePron = ["li" := "ˈlaɪ", "o" := "ə", "ness" := "nɪs"], ruleExamples = ["lioness" := "ˈlaɪ.ə.nɪs"]} + , "little" := Rule{rulePron = ["li" := "ˈlɪ", "ttle" := "tl"], ruleExamples = ["little" := "ˈlɪ.tl"]} + , "long" := Rule{rulePron = ["long" := "lɔːŋ"], ruleExamples = ["long" := "lɔːŋ"]} , "look" := Rule{rulePron = ["look" := "ˈlʊk"], ruleExamples = ["look" := "ˈlʊk"]} , "looks" := Rule{rulePron = ["looks" := "ˈlʊks"], ruleExamples = ["looks" := "ˈlʊks"]} , "lord" := Rule{rulePron = ["lord" := "lɔːd"], ruleExamples = ["lord" := "lɔːd"]} + , "mace" := Rule{rulePron = ["mace" := "meɪs"], ruleExamples = ["mace" := "meɪs"]} + , "magic" := Rule{rulePron = ["ma" := "ˈma", "gic" := "d͡ʒɪk"], ruleExamples = ["magic" := "ˈma.d͡ʒɪk"]} , "master" := Rule{rulePron = ["mas" := "ˈmɑːs", "ter" := "tə"], ruleExamples = ["master" := "ˈmɑːs.tə"]} + , "men" := Rule{rulePron = ["men" := "mɛn"], ruleExamples = ["men" := "mɛn"]} + , "middle" := Rule{rulePron = ["mi" := "ˈmɪ", "ddle" := "dəl"], ruleExamples = ["middle" := "ˈmɪ.dəl"]} + , "mines" := Rule{rulePron = ["mines" := "maɪnz"], ruleExamples = ["mines" := "maɪnz"]} + , "misty" := Rule{rulePron = ["mis" := "ˈmɪs", "ty" := "ti"], ruleExamples = ["misty" := "ˈmɪs.ti"]} + , "monkey" := Rule{rulePron = ["monk" := "ˈmʌŋk", "ey" := "i"], ruleExamples = ["monkey" := "ˈmʌŋk.i"]} , "mount" := Rule{rulePron = ["mount" := "maʊnt"], ruleExamples = ["mount" := "maʊnt"]} + , "mountain" := Rule{rulePron = ["moun" := "maʊn", "tain" := "tɪn"], ruleExamples = ["mountain" := "maʊn.tɪn"]} , "nazgûl" := Rule{rulePron = ["naz" := "ˈnæz", "gûl" := "gul"], ruleExamples = ["nazgûl" := "ˈnæz.gul"]} - , "nazgûls" := Rule{rulePron = ["naz" := "ˈnæz", "gûl" := "guls"], ruleExamples = ["nazgûls" := "ˈnæz.guls"]} + , "nazgûls" := Rule{rulePron = ["naz" := "ˈnæz", "gûls" := "guls"], ruleExamples = ["nazgûls" := "ˈnæz.guls"]} , "necromancer" := Rule{rulePron = ["ne" := "ˈnɛ", "cro" := "kɹəʊ", "man" := "ˌmæn", "cer" := "sə"], ruleExamples = ["necromancer" := "ˈnɛ.kɹəʊ.ˌmæn.sə"]} + , "ness" := Rule{rulePron = ["ness" := "nɛs"], ruleExamples = ["ness" := "nɛs"]} + , "next" := Rule{rulePron = ["next" := "nɛkst"], ruleExamples = ["next" := "nɛkst"]} + , "north" := Rule{rulePron = ["north" := "nɔːθ"], ruleExamples = ["north" := "nɔːθ"]} , "on" := Rule{rulePron = ["on" := "ɒn"], ruleExamples = ["on" := "ɒn"]} + , "open" := Rule{rulePron = ["o" := "ˈəʊ", "pen" := "pn"], ruleExamples = ["open" := "ˈəʊ.pn"]} + , "orc" := Rule{rulePron = ["orc" := "ɔːk"], ruleExamples = ["orc" := "ɔːk"]} + , "orcs" := Rule{rulePron = ["orcs" := "ɔːks"], ruleExamples = ["orcs" := "ɔːks"]} + , "out" := Rule{rulePron = ["out" := "aʊt"], ruleExamples = ["out" := "aʊt"]} , "paddle" := Rule{rulePron = ["pa" := "ˈpæ", "ddle" := "dəl"], ruleExamples = ["paddle" := "ˈpæ.dəl"]} + , "palantír" := Rule{rulePron = ["pa" := "pa", "lan" := "ˈlan", "tír" := "ˌtiːr"], ruleExamples = ["palantír" := "pa.ˈlan.ˌtiːr"]} + , "phial" := Rule{rulePron = ["phial" := "ˈfaɪəl"], ruleExamples = ["phial" := "ˈfaɪəl"]} + , "picture" := Rule{rulePron = ["pic" := "ˈpɪk", "ture" := "ʃə"], ruleExamples = ["picture" := "ˈpɪk.ʃə"]} + , "pipe" := Rule{rulePron = ["pipe" := "ˈpaɪp"], ruleExamples = ["pipe" := "ˈpaɪp"]} + , "pointy" := Rule{rulePron = ["poin" := "pɔɪn", "ty" := "ti"], ruleExamples = ["pointy" := "pɔɪn.ti"]} , "polo" := Rule{rulePron = ["po" := "ˈpəʊ", "lo" := "ləʊ"], ruleExamples = ["polo" := "ˈpəʊ.ləʊ"]} , "pool" := Rule{rulePron = ["pool" := "pul"], ruleExamples = ["pool" := "pul"]} + , "power" := Rule{rulePron = ["power" := "ˈpaʊ̯ə̯"], ruleExamples = ["power" := "ˈpaʊ̯ə̯"]} + , "powers" := Rule{rulePron = ["powers" := "ˈpaʊəz"], ruleExamples = ["powers" := "ˈpaʊəz"]} + , "queen" := Rule{rulePron = ["queen" := "kwiːn"], ruleExamples = ["queen" := "kwiːn"]} + , "raft" := Rule{rulePron = ["raft" := "ɹɑːft"], ruleExamples = ["raft" := "ɹɑːft"]} + , "ranger" := Rule{rulePron = ["ran" := "ˈɹeɪn", "ger" := "d͡ʒə"], ruleExamples = ["ranger" := "ˈɹeɪn.d͡ʒə"]} + , "real" := Rule{rulePron = ["real" := "ˈɹiːəl"], ruleExamples = ["real" := "ˈɹiːəl"]} + , "really" := Rule{rulePron = ["rea" := "ˈɹɪə", "lly" := "li"], ruleExamples = ["really" := "ˈɹɪə.li"]} + , "realm" := Rule{rulePron = ["realm" := "ɹɛlm"], ruleExamples = ["realm" := "ɹɛlm"]} + , "red" := Rule{rulePron = ["red" := "ɹɛd"], ruleExamples = ["red" := "ɹɛd"]} + , "rhinoceros" := Rule{rulePron = ["rhi" := "ɹaɪ", "noc" <> [LexemeVowel] := "ˈnɒs", "e" := "ə", "ros" := "ɹəs"], ruleExamples = ["rhinoceros" := "ɹaɪ.ˈnɒs.ə.ɹəs"]} , "riding" := Rule{rulePron = ["ri" := "ˈɹaɪ", "ding" := "dɪŋ"], ruleExamples = ["riding" := "ˈɹaɪ.dɪŋ"]} , "ring" := Rule{rulePron = ["ring" := "ɹɪŋ"], ruleExamples = ["ring" := "ɹɪŋ"]} , "rings" := Rule{rulePron = ["rings" := "ɹɪŋz"], ruleExamples = ["rings" := "ɹɪŋz"]} + , "run" := Rule{rulePron = ["run" := "ɹʌn"], ruleExamples = ["run" := "ɹʌn"]} + , "runs" := Rule{rulePron = ["runs" := "ɹʌns"], ruleExamples = ["runs" := "ɹʌns"]} , "sailing" := Rule{rulePron = ["sai" := "ˈseɪ", "ling" := "lɪŋ"], ruleExamples = ["sailing" := "ˈseɪ.lɪŋ"]} + , "scare" := Rule{rulePron = ["scare" := "skɛə"], ruleExamples = ["scare" := "skɛə"]} + , "scares" := Rule{rulePron = ["scares" := "skɛɹz"], ruleExamples = ["scares" := "skɛɹz"]} , "scary" := Rule{rulePron = ["sca" := "ˈskɛə", "ry" := "ɹi"], ruleExamples = ["scary" := "ˈskɛə.ɹi"]} , "scuba" := Rule{rulePron = ["scu" := "ˈskuː", "ba" := "bə"], ruleExamples = ["scuba" := "ˈskuː.bə"]} , "seek" := Rule{rulePron = ["seek" := "siːk"], ruleExamples = ["seek" := "siːk"]} + , "shadow" := Rule{rulePron = ["sha" := "ˈʃæ", "dow" := "dəʊ"], ruleExamples = ["shadow" := "ˈʃæ.dəʊ"]} + , "ship" := Rule{rulePron = ["ship" := "ʃɪp"], ruleExamples = ["ship" := "ʃɪp"]} + , "shoot" := Rule{rulePron = ["shoot" := "ʃuːt"], ruleExamples = ["shoot" := "ʃuːt"]} + , "shoots" := Rule{rulePron = ["shoots" := "ʃuːts"], ruleExamples = ["shoots" := "ʃuːts"]} , "short" := Rule{rulePron = ["short" := "ʃɔːt"], ruleExamples = ["short" := "ʃɔːt"]} + , "sick" := Rule{rulePron = ["sick" := "sɪk"], ruleExamples = ["sick" := "sɪk"]} + , "sit" := Rule{rulePron = ["sit" := "ˈsɪt"], ruleExamples = ["sit" := "ˈsɪt"]} + , "skeleton" := Rule{rulePron = ["ske" := "ˈskɛ", "le" := "lɪ", "ton" := "tn"], ruleExamples = ["skeleton" := "ˈskɛ.lɪ.tn"]} , "ski" := Rule{rulePron = ["ski" := "skiː"], ruleExamples = ["ski" := "skiː"]} + , "smoke" := Rule{rulePron = ["smoke" := "sməʊk"], ruleExamples = ["smoke" := "sməʊk"]} + , "smokes" := Rule{rulePron = ["smokes" := "sməʊks"], ruleExamples = ["smokes" := "sməʊks"]} , "snorkel" := Rule{rulePron = ["snor" := "ˈsnɔː", "kel" := "kəl"], ruleExamples = ["snorkel" := "ˈsnɔː.kəl"]} + , "stab" := Rule{rulePron = ["stab" := "stæb"], ruleExamples = ["stab" := "stæb"]} + , "stabs" := Rule{rulePron = ["stabs" := "stæbs"], ruleExamples = ["stabs" := "stæbs"]} , "staff" := Rule{rulePron = ["staff" := "stɑːf"], ruleExamples = ["staff" := "stɑːf"]} + , "stand" := Rule{rulePron = ["stand" := "stænd"], ruleExamples = ["stand" := "stænd"]} + , "get" := Rule{rulePron = ["get" := "gɛt"], ruleExamples = ["get" := "gɛt"]} + , "stealthy" := Rule{rulePron = ["steal" := "ˈstɛl", "thy" := "θɪ"], ruleExamples = ["stealthy" := "ˈstɛl.θɪ"]} , "suit" := Rule{rulePron = ["suit" := "suːt"], ruleExamples = ["suit" := "suːt"]} , "swim" := Rule{rulePron = ["swim" := "swɪm"], ruleExamples = ["swim" := "swɪm"]} , "swimmer" := Rule{rulePron = ["swi" := "ˈswɪ", "mmer" := "mə"], ruleExamples = ["swimmer" := "ˈswɪ.mə"]} , "swimming" := Rule{rulePron = ["swi" := "ˈswɪ", "mming" := "mɪŋ"], ruleExamples = ["swimming" := "ˈswɪ.mɪŋ"]} , "sword" := Rule{rulePron = ["sword" := "sɔːd"], ruleExamples = ["sword" := "sɔːd"]} + , "teeth" := Rule{rulePron = ["teeth" := "ˈtiːθ"], ruleExamples = ["teeth" := "ˈtiːθ"]} + , "terrifying" := Rule{rulePron = ["te" := "ˈtɛ", "rri" := "ɹɪ", "fy" := "faɪ", "ing" := "ɪŋ"], ruleExamples = ["terrifying" := "ˈtɛ.ɹɪ.faɪ.ɪŋ"]} + , "tiara" := Rule{rulePron = ["ti" := "ti", "ra" := "ˈɑːɹə"], ruleExamples = ["tiara" := "ti.ˈɑːɹə"]} + , "tiger" := Rule{rulePron = ["ti" := "ˈtaɪ", "ger" := "gə"], ruleExamples = ["tiger" := "ˈtaɪ.gə"]} + , "tigress" := Rule{rulePron = ["ti" := "ˈtaɪ", "gress" := "gɹɪs"], ruleExamples = ["tigress" := "ˈtaɪ.gɹɪs"]} + , "together" := Rule{rulePron = ["to" := "tʊ", "geth" := "ˈgɛð", "er" := "ə"], ruleExamples = ["together" := "tʊ.ˈgɛð.ə"]} , "top" := Rule{rulePron = ["top" := "tɒp"], ruleExamples = ["top" := "tɒp"]} + , "touches" := Rule{rulePron = ["tou" := "ˈtʌ", "ches" := "t͡ʃɪz"], ruleExamples = ["touches" := "ˈtʌ.t͡ʃɪz"]} , "track" := Rule{rulePron = ["track" := "tɹæk"], ruleExamples = ["track" := "tɹæk"]} , "trawler" := Rule{rulePron = ["traw" := "ˈtrɔː", "ler" := "lə"], ruleExamples = ["trawler" := "ˈtrɔː.lə"]} + , "tree" := Rule{rulePron = ["tree" := "tɹiː"], ruleExamples = ["tree" := "tɹiː"]} + , "trees" := Rule{rulePron = ["trees" := "tɹiːs"], ruleExamples = ["trees" := "tɹiːs"]} + , "tries" := Rule{rulePron = ["tries" := "tɹaɪz"], ruleExamples = ["tries" := "tɹaɪz"]} , "trunks" := Rule{rulePron = ["trunks" := "tɹʌŋks"], ruleExamples = ["trunks" := "tɹʌŋks"]} + , "two" := Rule{rulePron = ["two" := "tu"], ruleExamples = ["two" := "tu"]} + , "under" := Rule{rulePron = ["un" := "ˈʌn", "der" := "də"], ruleExamples = ["under" := "ˈʌn.də"]} + , "unexpected" := Rule{rulePron = ["un" := "ʌn", "e" := "ɪ", "x" := ["k", "ˈs"], "pec" := "pɛk", "ted" := "tɪd"], ruleExamples = ["unexpected" := "ʌn.ɪk.ˈspɛk.tɪd"]} + , "up" := Rule{rulePron = ["up" := "ʌp"], ruleExamples = ["up" := "ʌp"]} + , "wait" := Rule{rulePron = ["wait" := "weɪt"], ruleExamples = ["wait" := "weɪt"]} + , "waits" := Rule{rulePron = ["waits" := "weɪts"], ruleExamples = ["waits" := "weɪts"]} + , "walk" := Rule{rulePron = ["walk" := "wɔːk"], ruleExamples = ["walk" := "wɔːk"]} + , "walks" := Rule{rulePron = ["walks" := "wɔːks"], ruleExamples = ["walks" := "wɔːks"]} + , "war" := Rule{rulePron = ["war" := "wɔː"], ruleExamples = ["war" := "wɔː"]} + , "wars" := Rule{rulePron = ["wars" := "wɔːz"], ruleExamples = ["wars" := "wɔːz"]} , "water" := Rule{rulePron = ["wa" := "ˈwɔː", "ter" := "tə"], ruleExamples = ["water" := "ˈwɔː.tə"]} + , "wears" := Rule{rulePron = ["wears" := "wɛəz"], ruleExamples = ["wears" := "wɛəz"]} + , "white" := Rule{rulePron = ["white" := "waɪt"], ruleExamples = ["white" := "waɪt"]} + , "wield" := Rule{rulePron = ["wield" := "wiːld"], ruleExamples = ["wield" := "wiːld"]} + , "wields" := Rule{rulePron = ["wields" := "wiːlds"], ruleExamples = ["wields" := "wiːlds"]} , "witch" := Rule{rulePron = ["witch" := "wɪt͡ʃ"], ruleExamples = ["witch" := "wɪt͡ʃ"]} + , "women" := Rule{rulePron = ["wom" := "ˈwɪm", "en" := "ɪn"], ruleExamples = ["women" := "ˈwɪm.ɪn"]} + , "wood" := Rule{rulePron = ["wood" := "wʊd"], ruleExamples = ["wood" := "wʊd"]} , "wraith" := Rule{rulePron = ["wraith" := "ɹeɪθ"], ruleExamples = ["wraith" := "ɹeɪθ"]} , "yacht" := Rule{rulePron = ["yacht" := "jɒt"], ruleExamples = ["yacht" := "jɒt"]} + , "cherry" := Rule{rulePron = ["che" := "ˈt͡ʃɛ", "rry" := "ɹi"], ruleExamples = ["cherry" := "ˈt͡ʃɛ.ɹi"]} + , "blue" := Rule{rulePron = ["blue" := "ˈbluː"], ruleExamples = ["blue" := "ˈbluː"]} + , "peach" := Rule{rulePron = ["peach" := "piːt͡ʃ"], ruleExamples = ["peach" := "piːt͡ʃ"]} + , "wild" := Rule{rulePron = ["wild" := "waɪld"], ruleExamples = ["wild" := "waɪld"]} + , "straw" := Rule{rulePron = ["straw" := "stɹɔː"], ruleExamples = ["straw" := "stɹɔː"]} + , "green" := Rule{rulePron = ["green" := "gɹiːn"], ruleExamples = ["green" := "gɹiːn"]} + , "syrup" := Rule{rulePron = ["sy" := "sɪ", "rup" := "ɹəp"], ruleExamples = ["syrup" := "sɪ.ɹəp"]} + , "berry" := Rule{rulePron = ["be" := "ˈbɛ", "rry" := "ɹi"], ruleExamples = ["blueberry" := "ˈbluː.ˈbɛ.ɹi"]} + , "cantaloupe" := Rule{rulePron = ["can" := "ˈkæn", "ta" := "tə", "loupe" := "luːp"], ruleExamples = ["cantaloupe" := "ˈkæn.tə.luːp"]} , "zombie" := Rule{rulePron = ["zom" := "zɒm", "bie" := "bi"], ruleExamples = ["zombie" := "zɒm.bi"]} + , "must" := Rule{rulePron = ["must" := "mʌst"], ruleExamples = ["must" := "mʌst"]} + , "mustang" := Rule{rulePron = ["mus" := "ˈmʌs", "tang" := "ˌtæŋ"], ruleExamples = ["mustang" := "ˈmʌs.ˌtæŋ"]} + , "leans" := Rule{rulePron = ["leans" := "liːnz"], ruleExamples = ["leans" := "liːnz"]} + , "apple" := Rule{rulePron = ["a" := "ˈæ", "pple" := "pl"], ruleExamples = ["apple" := "ˈæ.pl"]} + , "orange" := Rule{rulePron = ["o" := "ˈɒ", "range" := "ɹɪnd͡ʒ"], ruleExamples = ["orange" := "ˈɒ.ɹɪnd͡ʒ"]} + , "banana" := Rule{rulePron = ["ba" := "bə", "na" := "ˈnɑː", "na" := "nə"], ruleExamples = ["banana" := "bə.ˈnɑː.nə"]} + , "ananas" := Rule{rulePron = ["a" := "ə", "na" := "ˈneɪ", "nas" := "nəs"], ruleExamples = ["ananas" := "ə.ˈneɪ.nəs"]} + , "apricot" := Rule{rulePron = ["a" := "ˈeɪ", "pri" := "pɹɪ", "cot" := "kɒt"], ruleExamples = ["apricot" := "ˈeɪ.pɹɪ.kɒt"]} + , "lemon" := Rule{rulePron = ["lem" := "ˈlɛm", "on" := "ən"], ruleExamples = ["lemon" := "ˈlɛm.ən"]} + , "sweet" := Rule{rulePron = ["sweet" := "swiːt"], ruleExamples = ["sweet" := "swiːt"]} + , "lime" := Rule{rulePron = ["lime" := "laɪm"], ruleExamples = ["lime" := "laɪm"]} + , "ginger" := Rule{rulePron = ["gin" := "ˈdʒɪn", "ger" := "dʒə"], ruleExamples = ["ginger" := "ˈdʒɪn.dʒə"]} + , "raspberry" := Rule{rulePron = ["ras" := "ˈɹɑːz", "be" := "bə", "rry" := "ɹi"], ruleExamples = ["raspberry" := "ˈɹɑːz.bə.ɹi"]} + , "hibiscus" := Rule{rulePron = ["hi" := "hɪ", "bis" := "ˈbɪs", "cus" := "kəs"], ruleExamples = ["hibiscus" := "hɪ.ˈbɪs.kəs"]} + , "mandarin" := Rule{rulePron = ["man" := "ˈmæn", "da" := "də", "rin" := "ɹɪn"], ruleExamples = ["mandarin" := "ˈmæn.də.ɹɪn"]} + , "party" := Rule{rulePron = ["par" := "ˈpɑː", "ty" := "ti"], ruleExamples = ["party" := "ˈpɑː.ti"]} + , "greetings" := Rule{rulePron = ["gree" := "ˈgɹiː", "tings" := "tɪŋz"], ruleExamples = ["greetings" := "ˈgɹiː.tɪŋz"]} + , "decorations" := Rule{rulePron = ["de" := "ˌdɛ", "co" := "kə", "ra" := "ˈɹeɪ", "tions" := "ʃənz"], ruleExamples = ["decorations" := "ˌdɛ.kə.ˈɹeɪ.ʃənz"]} + , "tart" := Rule{rulePron = ["tart" := "tɑːt"], ruleExamples = ["tart" := "tɑːt"]} + , "cake" := Rule{rulePron = ["cake" := "keɪk"], ruleExamples = ["cake" := "keɪk"]} + , "fruit" := Rule{rulePron = ["fruit" := "fɹuːt"], ruleExamples = ["fruit" := "fɹuːt"]} + , "gift" := Rule{rulePron = ["gift" := "gɪft"], ruleExamples = ["gift" := "gɪft"]} + , "juice" := Rule{rulePron = ["juice" := "d͡ʒuːs"], ruleExamples = ["juice" := "d͡ʒuːs"]} + , "works" := Rule{rulePron = ["works" := "wɜːks"], ruleExamples = ["fireworks" := "ˈfaɪ.ə.wɜːks"]} + , "drink" := Rule{rulePron = ["drink" := "dɹɪŋk"], ruleExamples = ["drink" := "dɹɪŋk"]} + , "fizzy" := Rule{rulePron = ["fi" := "ˈfɪ", "zzy" := "zi"], ruleExamples = ["fizzy" := "ˈfɪ.zi"]} + , "Éowyn" := Rule{rulePron = ["Eo" := "ˈeɪoʊ", "wyn" := "wɪn"], ruleExamples = ["Éowyn" := "ˈeɪoʊ.wɪn"]} + , -- , "her" := Rule{rulePron = ["her" := "ə"], ruleExamples = ["her" := "ə"]} -- unstressed + ending "'s" := Rule{rulePron = ["'" := [], ending "s" := "s"], ruleExamples = ["tiger's" := "ˈtaɪ.gə.s"]} , ending "for" := Rule{rulePron = [word "for" := "fɔː"], ruleExamples = ["for" := "fɔː"]} , ending "ing" := Rule{rulePron = [ending "ing" := "ɪŋ"], ruleExamples = ["beeing" := "ˈbiː.ɪŋ"]} , ending "ling" := Rule{rulePron = [ending "ling" := "lɪŋ"], ruleExamples = ["snorkelling" := "ˈsnɔː.kəl.lɪŋ"]} , ending "with" := Rule{rulePron = [ending "with" := "wɪθ"], ruleExamples = ["with" := "wɪθ"]} - , ending "with" <> " " <> [LexemeBorder, LexemeVowel] := Rule{rulePron = [ending "with" <> " " <> [LexemeBorder, LexemeVowel] := "wɪð"], ruleExamples = ["with you" := "wɪð.ju"]} - , ending "with" <> " " <> [LexemeVowel] := Rule{rulePron = [ending "with" <> " " <> [LexemeVowel] := "wɪð"], ruleExamples = ["with you" := "wɪð.ju"]} - , word "a" := Rule{rulePron = [word "a" := "ə"], ruleExamples = ["a" := "ə"]} + , ending "with" <> " " <> begining [LexemeSemiVowel] := Rule{rulePron = [ending "with" <> " " <> begining [LexemeSemiVowel] := "wɪð"], ruleExamples = ["with you" := "wɪð.ju"]} + , ending "with" <> " " <> begining [LexemeSemiVowel] := Rule{rulePron = [ending "with" <> " " <> begining [LexemeSemiVowel] := "wɪð"], ruleExamples = ["with you" := "wɪð.ju"]} + , -- , ending "with" <> " " <> [LexemeVowel] := Rule{rulePron = [ending "with" <> " " <> [LexemeVowel] := "wɪð"], ruleExamples = ["with you" := "wɪð.ju"]} + word "a" := Rule{rulePron = [word "a" := "ə"], ruleExamples = ["a" := "ə"]} , word "and" := Rule{rulePron = [word "and" := "ænd"], ruleExamples = ["and" := "ænd"]} , word "end" := Rule{rulePron = ["end" := "ɛnd"], ruleExamples = ["end" := "ɛnd"]} , word "in" := Rule{rulePron = [word "in" := "ɪn"], ruleExamples = ["in" := "ɪn"]} diff --git a/tests/Language/FrenchSpec.hs b/tests/Language/FrenchSpec.hs index 0d38e6a..5b4f06d 100644 --- a/tests/Language/FrenchSpec.hs +++ b/tests/Language/FrenchSpec.hs @@ -288,9 +288,15 @@ pronunciationRules = [ "Escherichia" := Rule{rulePron = ["E" := "ɛ", "sche" := "ʃe", "ri" := "ʁi", "chia" := "ʃja"], ruleExamples = ["Escherichia" := "ɛ.ʃe.ʁi.ʃja"]} , "Maël" := Rule{rulePron = ["ma" := "ma", "ël" := "ɛl"], ruleExamples = ["Maël" := "ma.ɛl"]} , "a" := Rule{rulePron = ["a" := "a"], ruleExamples = ["allume" := "a.lym"]} + , "au" := Rule{rulePron = ["au" := "o"], ruleExamples = ["au" := "o"]} + , "à" := Rule{rulePron = ["à" := "a"], ruleExamples = ["à" := "a"]} + , "arc" := Rule{rulePron = ["arc" := "aʁk"], ruleExamples = ["arc" := "aʁk"]} + , word "l" := Rule{rulePron = ["l" := "l"], ruleExamples = ["l" := "l"]} , "ancrage" := Rule{rulePron = ["an" := "ɑ̃", "crage" := "kʁaʒ"], ruleExamples = ["ancrage" := "ɑ̃.kʁaʒ"]} , "ancre" := Rule{rulePron = ["ancre" := "ɑ̃kʁ"], ruleExamples = ["ancre" := "ɑ̃kʁ"]} , "ba" := Rule{rulePron = ["ba" := "ba"], ruleExamples = ["bateau" := "ba.to"]} + , "bal" := Rule{rulePron = ["bal" := "bal"], ruleExamples = ["bal" := "bal"]} + , "balle" := Rule{rulePron = ["balle" := "bal"], ruleExamples = ["balle" := "bal"]} , "bain" := Rule{rulePron = ["bain" := "bɛ̃"], ruleExamples = ["bain" := "bɛ̃"]} , "bile" := Rule{rulePron = ["bile" := "bil"], ruleExamples = ["immobile" := "i.mɔ.bil"]} , "bo" := Rule{rulePron = ["bo" := "bɔ"], ruleExamples = ["bobo" := "bɔ.bo"]} @@ -304,6 +310,9 @@ pronunciationRules = , "chon" := Rule{rulePron = ["chon" := "ʃɔ̃"], ruleExamples = ["cochon" := "kɔ.ʃɔ̃"]} , "chry" := Rule{rulePron = ["chry" := "kʁi"], ruleExamples = ["chrysanthème" := "kʁi.zɑ̃.tɛm"]} , "ci" := Rule{rulePron = ["ci" := "si"], ruleExamples = ["mucidule" := "my.si.dyl"]} + , "cla" := Rule{rulePron = ["cla" := "kla"], ruleExamples = ["éclat" := "e.kla"]} + , "clate" := Rule{rulePron = ["clate" := "klat"], ruleExamples = ["éclate" := "e.klat"]} + , "clatent" := Rule{rulePron = ["clatent" := "klat"], ruleExamples = ["éclatent" := "e.klat"]} , "cinthe" := Rule{rulePron = ["cinthe" := "sɛ̃t"], ruleExamples = ["jacinthe" := "ʒa.sɛ̃t"]} , "co" := Rule{rulePron = ["co" := "kɔ"], ruleExamples = ["cochon" := "kɔ.ʃɔ̃"]} , "de" := Rule{rulePron = ["de" := "də"], ruleExamples = ["demi" := "də.mi"]} @@ -317,28 +326,49 @@ pronunciationRules = , "dule" := Rule{rulePron = ["dule" := "dyl"], ruleExamples = ["mucidule" := "my.si.dyl"]} , "en" := Rule{rulePron = ["en" := "ɑ̃"], ruleExamples = ["en" := "ɑ̃"]} , "ette" := Rule{rulePron = ["ette" := "ɛt"], ruleExamples = ["brouette" := "bʁu.ɛt"]} + , ending "blanc" := Rule{rulePron = [ending "blanc" := "blɑ̃"], ruleExamples = ["blanc" := "blɑ̃"]} + , "blanche" := Rule{rulePron = ["blanche" := "blɑ̃ʃ"], ruleExamples = ["blanche" := "blɑ̃ʃ"]} + , "blan" <> [LexemeConsonant] := Rule{rulePron = ["blan" <> [LexemeConsonant] := "blɑ̃"], ruleExamples = ["blanc" := "blɑ̃"]} + , "che" := Rule{rulePron = ["che" := "ʃə"], ruleExamples = ["cheval" := "ʃə.val"]} + , "val" := Rule{rulePron = ["val" := "val"], ruleExamples = ["cheval" := "ʃə.val"]} , "fait" := Rule{rulePron = ["fait" := "fɛ"], ruleExamples = ["fait" := "fɛ"]} + , "fa" <> [LexemeConsonant] := Rule{rulePron = ["fa" <> [LexemeConsonant] := "fa"], ruleExamples = ["famille" := "fa.mij"]} + , "da" <> [LexemeConsonant] := Rule{rulePron = ["da" <> [LexemeConsonant] := "da"], ruleExamples = ["mandarine" := "mɑ̃.da.ʁin"]} + , "gin" <> [LexemeConsonant] := Rule{rulePron = ["gin" := "ʒɛ̃"], ruleExamples = ["gingembre" := "ʒɛ̃.ʒɑ̃bʁ"]} + , "gembre" := Rule{rulePron = ["gembre" := "ʒɑ̃bʁ"], ruleExamples = ["gingembre" := "ʒɛ̃.ʒɑ̃bʁ"]} + , "mille" := Rule{rulePron = ["mille" := "mij"], ruleExamples = ["famille" := "fa.mij"]} + , "man" <> [LexemeConsonant] := Rule{rulePron = ["man" <> [LexemeConsonant] := "mɑ̃"], ruleExamples = ["mandarine" := "mɑ̃.da.ʁin"]} + , "fram" <> [LexemeConsonant] := Rule{rulePron = ["fram" <> [LexemeConsonant] := "fʁɑ̃"], ruleExamples = ["framboise" := "fʁɑ̃.bwaz"]} + , "boise" := Rule{rulePron = ["boise" := "bwaz"], ruleExamples = ["framboise" := "fʁɑ̃.bwaz"]} + , "hibiscus" := Rule{rulePron = ["hi" := "i", "bis" := "bis", "cus" := "kys"], ruleExamples = ["hibiscus" := "i.bis.kys"]} + , word "mille" := Rule{rulePron = [word "mille" := "mil"], ruleExamples = ["mille" := "mil"]} , "feu" := Rule{rulePron = ["feu" := "fø"], ruleExamples = ["feu" := "fø"]} + , "four" := Rule{rulePron = ["four" := "fuʁ"], ruleExamples = ["four" := "fuʁ"]} , "feuille" := Rule{rulePron = ["feuille" := "fœj"], ruleExamples = ["feuille" := "fœj"]} , "font" := Rule{rulePron = ["font" := "fɔ̃"], ruleExamples = ["font" := "fɔ̃"]} , "fraise" := Rule{rulePron = ["fraise" := "fʁɛz"], ruleExamples = ["fraise" := "fʁɛz"]} , "ga" := Rule{rulePron = ["ga" := "ga"], ruleExamples = ["alligator" := "a.li.ga.tɔʁ"]} , "ge" := Rule{rulePron = ["ge" := "ʒə"], ruleExamples = ["gelée" := "ʒə.le"]} + , "grue" := Rule{rulePron = ["grue" := "gʁy"], ruleExamples = ["grue" := "gʁy"]} + , "sque" := Rule{rulePron = ["sque" := "skə"], ruleExamples = ["squelette" := "skə.lɛt"]} + , "lette" := Rule{rulePron = ["lette" := "lɛt"], ruleExamples = ["squelette" := "skə.lɛt"]} , "geoir" := Rule{rulePron = ["geoir" := "ʒwaʁ"], ruleExamples = ["plongeoir" := "plɔ̃.ʒwaʁ"]} , "geur" := Rule{rulePron = ["geur" := "ʒœʁ"], ruleExamples = ["nageur" := "na.ʒœʁ"]} , "geuse" := Rule{rulePron = ["geuse" := "ʒøz"], ruleExamples = ["nageuse" := "na.ʒøz"]} - , "gi" <> [LexemeConsonant] := Rule{rulePron = ["gi" := "ʒi"], ruleExamples = ["gilet" := "ʒi.lɛ"]} + , "gi" <> [LexemeConsonant] := Rule{rulePron = ["gi" <> [LexemeConsonant] := "ʒi"], ruleExamples = ["gilet" := "ʒi.lɛ"]} , "glace" := Rule{rulePron = ["glace" := "glas"], ruleExamples = ["glace" := "glas"]} , "gnon" := Rule{rulePron = ["gnon" := "ɲɔ̃"], ruleExamples = ["champignon" := "ʃɑ̃.pi.ɲɔ̃"]} , "gou" := Rule{rulePron = ["gou" := "gu"], ruleExamples = ["gouttière" := "gu.tjɛʁ"]} , "gue" := Rule{rulePron = ["gue" := "gə"], ruleExamples = ["marguerite" := "maʁ.gə.ʁit"]} , "gâ" := Rule{rulePron = ["gâ" := "ga"], ruleExamples = ["gâté" := "ga.te"]} + , "gé" := Rule{rulePron = ["gé" := "ʒe"], ruleExamples = ["orangé" := "ɔ.ʁɑ̃.ʒe"]} , "gée" := Rule{rulePron = ["gée" := "ʒe"], ruleExamples = ["orangée" := "ɔ.ʁɑ̃.ʒe"]} , "hi" := Rule{rulePron = ["hi" := "i"], ruleExamples = ["hippopotame" := "i.pɔ.pɔ.tam"]} , "ppo" := Rule{rulePron = ["ppo" := "pɔ"], ruleExamples = ["hippopotame" := "i.pɔ.pɔ.tam"]} , "tame" := Rule{rulePron = ["tame" := "tam"], ruleExamples = ["hippopotame" := "i.pɔ.pɔ.tam"]} , "ho" := Rule{rulePron = ["ho" := "o"], ruleExamples = ["homo" := "o.mo"]} , "hêtre" := Rule{rulePron = ["hêtre" := "ɛtʁ"], ruleExamples = ["hêtre" := "ɛtʁ"]} + , "é" := Rule{rulePron = ["é" := "e"], ruleExamples = ["éclat" := "e.kla"]} , "i" := Rule{rulePron = ["i" := "i"], ruleExamples = ["ibis" := "i.bis"]} , "illet" := Rule{rulePron = ["illet" := "jɛ"], ruleExamples = ["œillet" := "œ.jɛ"]} , "illo" := Rule{rulePron = ["illo" := "jo"], ruleExamples = ["maillot" := "ma.jo"]} @@ -347,16 +377,19 @@ pronunciationRules = , "je" := Rule{rulePron = ["je" := "ʒə"], ruleExamples = ["jetée" := "ʒə.te"]} , "jon" <> [LexemeConsonant] := Rule{rulePron = ["jon" := "ʒɔ̃"], ruleExamples = ["jonquille" := "ʒɔ̃.kij"]} , "ju" := Rule{rulePron = ["ju" := "ʒy"], ruleExamples = ["judo" := "ʒy.do"]} - , "kan" := Rule{rulePron = ["kan" := "kɑ̃"], ruleExamples = ["kangourou" := "kɑ̃.gu.ʁu"]} + , "kan" <> [LexemeConsonant] := Rule{rulePron = ["kan" <> [LexemeConsonant] := "kɑ̃"], ruleExamples = ["kangourou" := "kɑ̃.gu.ʁu"]} , "gou" := Rule{rulePron = ["gou" := "gu"], ruleExamples = ["kangourou" := "kɑ̃.gu.ʁu"]} , "rou" := Rule{rulePron = ["rou" := "ʁu"], ruleExamples = ["kangourou" := "kɑ̃.gu.ʁu"]} + , "rousse" := Rule{rulePron = ["rousse" := "ʁus"], ruleExamples = ["rousse" := "ʁus"]} , "la" := Rule{rulePron = ["la" := "la"], ruleExamples = ["la" := "la"]} + , "lac" := Rule{rulePron = ["lac" := "lak"], ruleExamples = ["lac" := "lak"]} , "langue" := Rule{rulePron = ["langue" := "lɑ̃g"], ruleExamples = ["langue" := "lɑ̃g"]} , "le" := Rule{rulePron = ["le" := "lə"], ruleExamples = ["le" := "lə"]} , "li" := Rule{rulePron = ["li" := "li"], ruleExamples = ["pissenlit" := "pi.sɑ̃.li"]} , "lier" := Rule{rulePron = ["lier" := "lje"], ruleExamples = ["voilier" := "vwa.lje"]} , "lin" <> [LexemeBorder] := Rule{rulePron = ["lin" := "lɛ̃"], ruleExamples = ["merlin" := "mɛʁ.lɛ̃"]} , "lion" := Rule{rulePron = ["lion" := "ljɔ̃"], ruleExamples = ["lion" := "ljɔ̃"]} + , "lionne" := Rule{rulePron = ["lionne" := "ljɔ̃n"], ruleExamples = ["lionne" := "ljɔ̃n"]} , "lla" := Rule{rulePron = ["lla" := "la"], ruleExamples = ["calla" := "ka.la"]} , "lli" := Rule{rulePron = ["lli" := "li"], ruleExamples = ["alligator" := "a.li.ga.tɔʁ"]} , "llon" := Rule{rulePron = ["llon" := "jɔ̃"], ruleExamples = ["papillon" := "pa.pi.jɔ̃"]} @@ -364,14 +397,22 @@ pronunciationRules = , "lu" := Rule{rulePron = ["lu" := "ly"], ruleExamples = ["révolution" := "ʁe.vɔ.ly.sjɔ̃"]} , "ly" := Rule{rulePron = ["ly" := "li"], ruleExamples = ["polypore" := "pɔ.li.pɔʁ"]} , "lé" := Rule{rulePron = ["lé" := "le"], ruleExamples = ["gelé" := "ʒə.le"]} + , "leur" := Rule{rulePron = ["leur" := "lœʁ"], ruleExamples = ["leur" := "lœʁ"]} + , "griffe" := Rule{rulePron = ["griffe" := "gʁif"], ruleExamples = ["griffe" := "gʁif"]} + , "ra" := Rule{rulePron = ["ra" := "ʁa"], ruleExamples = ["ra" := "ʁa"]} , "ma" := Rule{rulePron = ["ma" := "ma"], ruleExamples = ["ma" := "ma"]} , "mar" <> [LexemeConsonant] := Rule{rulePron = ["mar" <> [LexemeConsonant] := "maʁ"], ruleExamples = ["marguerite" := "maʁ.gə.ʁit"]} , "masque" := Rule{rulePron = ["masque" := "mask"], ruleExamples = ["masque" := "mask"]} , "mer" <> [LexemeConsonant] := Rule{rulePron = ["mer" <> [LexemeConsonant] := "mɛʁ"], ruleExamples = ["merlin" := "mɛʁ.lɛ̃"]} , "mi" := Rule{rulePron = ["mi" := "mi"], ruleExamples = ["demi" := "də.mi"]} + , "miel" := Rule{rulePron = ["miel" := "mjɛl"], ruleExamples = ["miel" := "mjɛl"]} , "mmo" := Rule{rulePron = ["mmo" := "mɔ"], ruleExamples = ["immobile" := "i.mɔ.bil"]} , "mo" := Rule{rulePron = ["mo" := "mɔ"], ruleExamples = ["moto" := "mɔ.to"]} - , "mu" := Rule{rulePron = ["mu" := "my"], ruleExamples = ["mucidule" := "my.si.dyl"]} + , -- , "mon" := Rule{rulePron = ["mon" := "mɔ̃"], ruleExamples = ["montre" := "mɔ̃"]} + "montre" := Rule{rulePron = ["montre" := "mɔ̃tʁ"], ruleExamples = ["montre" := "mɔ̃tʁ"]} + , "montrent" := Rule{rulePron = ["montrent" := "mɔ̃tʁ"], ruleExamples = ["montrent" := "mɔ̃tʁ"]} + , -- , "tre" := Rule{rulePron = ["tre" := "tʁ"], ruleExamples = ["montre" := "tʁ"]} + "mu" := Rule{rulePron = ["mu" := "my"], ruleExamples = ["mucidule" := "my.si.dyl"]} , "mène" := Rule{rulePron = ["mène" := "mɛn"], ruleExamples = ["promène" := "pʁɔ.mɛn"]} , "mènent" := Rule{rulePron = ["mènent" := "mɛn"], ruleExamples = ["promènent" := "pʁɔ.mɛn"]} , "na" := Rule{rulePron = ["na" := "na"], ruleExamples = ["na" := "na"]} @@ -390,6 +431,8 @@ pronunciationRules = , "plon" := Rule{rulePron = ["plon" := "plɔ̃"], ruleExamples = ["plongeoir" := "plɔ̃.ʒwaʁ"]} , "pneu" := Rule{rulePron = ["pneu" := "pnø"], ruleExamples = ["pneumatique" := "pnø.ma.tik"]} , "po" := Rule{rulePron = ["po" := "pɔ"], ruleExamples = ["polypore" := "pɔ.li.pɔʁ"]} + , "foin" := Rule{rulePron = ["foin" := "fwɛ̃"], ruleExamples = ["foin" := "fwɛ̃"]} + , "pon" := Rule{rulePron = ["pon" := "pɔ̃"], ruleExamples = ["pont" := "pɔ̃"]} , "pore" := Rule{rulePron = ["pore" := "pɔʁ"], ruleExamples = ["polypore" := "pɔ.li.pɔʁ"]} , "porte" := Rule{rulePron = ["porte" := "pɔʁt"], ruleExamples = ["porte" := "pɔʁt"]} , "pro" := Rule{rulePron = ["pro" := "pʁɔ"], ruleExamples = ["promène" := "pʁɔ.mɛn"]} @@ -401,20 +444,42 @@ pronunciationRules = , "quille" := Rule{rulePron = ["quille" := "kij"], ruleExamples = ["jonquille" := "ʒɔ̃.kij"]} , "quipe" := Rule{rulePron = ["quipe" := "kip"], ruleExamples = ["équipe" := "e.kip"]} , "range" := Rule{rulePron = ["range" := "ʁɑ̃ʒ"], ruleExamples = ["orange" := "ɔ.ʁɑ̃ʒ"]} + , "rangent" := Rule{rulePron = ["rangent" := "ʁɑ̃ʒ"], ruleExamples = ["rangent" := "ʁɑ̃ʒ"]} + , "ran" <> [LexemeConsonant] := Rule{rulePron = ["range" <> [LexemeConsonant] := "ʁɑ̃"], ruleExamples = ["orangé" := "ɔ.ʁɑ̃.ʒe"]} , "relle" := Rule{rulePron = ["relle" := "ʁɛl"], ruleExamples = ["passerelle" := "pas.ʁɛl"]} + , -- , "ra" := Rule{rulePron = ["ra" := "ʁa"], ruleExamples = ["girafe" := "ʒi.ʁaf"]} + "rafe" := Rule{rulePron = ["rafe" := "ʁaf"], ruleExamples = ["girafe" := "ʒi.ʁaf"]} + , "aigle" := Rule{rulePron = ["aigle" := "ɛgl"], ruleExamples = ["aigle" := "ɛgl"]} + , "cor" <> [LexemeConsonant] := Rule{rulePron = ["cor" <> [LexemeConsonant] := "kɔʁ"], ruleExamples = ["corbeau" := "kɔʁ.bo"]} , "ri" := Rule{rulePron = ["ri" := "ʁi"], ruleExamples = ["rideau" := "ʁi.do"]} + , "rhi" := Rule{rulePron = ["rhi" := "ʁi"], ruleExamples = ["rhinocéros" := "ʁi.nɔ.se.ʁɔs"]} + , "no" := Rule{rulePron = ["no" := "nɔ"], ruleExamples = ["rhinocéros" := "ʁi.nɔ.se.ʁɔs"]} + , "cé" := Rule{rulePron = ["cé" := "se"], ruleExamples = ["rhinocéros" := "ʁi.nɔ.se.ʁɔs"]} + , "rhinocéros" := Rule{rulePron = ["rhi" := "ʁi", "no" := "nɔ", "cé" := "se", "ros" <> [LexemeMeaning "animal"] := "ʁɔs"], ruleExamples = ["rhinocéros" := "ʁi.nɔ.se.ʁɔs"]} + , "no" := Rule{rulePron = ["no" := "nɔ"], ruleExamples = ["rhinocéros" := "ʁi.nɔ.se.ʁɔs"]} + , "cé" := Rule{rulePron = ["cé" := "se"], ruleExamples = ["rhinocéros" := "ʁi.nɔ.se.ʁɔs"]} , "rine" := Rule{rulePron = ["rine" := "ʁin"], ruleExamples = ["marine" := "ma.ʁin"]} , "rite" := Rule{rulePron = ["rite" := "ʁit"], ruleExamples = ["marguerite" := "maʁ.gə.ʁit"]} , "ro" := Rule{rulePron = ["ro" := "rɔ"], ruleExamples = ["robot" := "rɔ.bo"]} + , "rose" := Rule{rulePron = ["rose" := "rɔz"], ruleExamples = ["rose" := "rɔz"]} , "rou" := Rule{rulePron = ["rou" := "ʁu"], ruleExamples = ["rouler" := "ʁu.le"]} , "rouge" := Rule{rulePron = ["rouge" := "ʁuʒ"], ruleExamples = ["rouge" := "ʁuʒ"]} , "rri" := Rule{rulePron = ["rri" := "ʁi"], ruleExamples = ["nourrit" := "nu.ʁi"]} , "ré" := Rule{rulePron = ["ré" := "ʁe"], ruleExamples = ["révolution" := "ʁe.vɔ.ly.sjɔ̃"]} , "sa" := Rule{rulePron = ["sa" := "sa"], ruleExamples = ["satellite" := "sa.te.lit"]} + , begining "singe" := Rule{rulePron = [begining "singe" := "sɛ̃ʒ"], ruleExamples = ["singe" := "sɛ̃ʒ"]} + , "buse" := Rule{rulePron = ["buse" := "byz"], ruleExamples = ["buse" := "byz"]} + , "bulle" := Rule{rulePron = ["bulle" := "byl"], ruleExamples = ["bulle" := "byl"]} + , "tigre" := Rule{rulePron = ["tigre" := "tigʁ"], ruleExamples = ["tigre" := "tigʁ"]} + , "tigresse" := Rule{rulePron = ["ti" := "ti", "gresse" := "gʁɛs"], ruleExamples = ["tigresse" := "ti.gʁɛs"]} + , "lombe" := Rule{rulePron = ["lombe" := "lɔ̃b"], ruleExamples = ["colombe" := "kɔ.lɔ̃b"]} , "sauve" := Rule{rulePron = ["sauve" := "sov"], ruleExamples = ["sauvetage" := "sov.taʒ"]} , "scine" := Rule{rulePron = ["scine" := "sin"], ruleExamples = ["piscine" := "pi.sin"]} , "short" := Rule{rulePron = ["short" := "ʃɔʁt"], ruleExamples = ["short" := "ʃɔʁt"]} , "ssen" := Rule{rulePron = ["ssen" := "sɑ̃"], ruleExamples = ["pissenlit" := "pi.sɑ̃.li"]} + , "cha" := Rule{rulePron = ["cha" := "ʃa"], ruleExamples = ["cha" := "ʃa"]} + , "chasse" := Rule{rulePron = ["chasse" := "ʃas"], ruleExamples = ["chasse" := "ʃas"]} + , "chassent" := Rule{rulePron = ["chassent" := "ʃas"], ruleExamples = ["chassent" := "ʃas"]} , "sur" := Rule{rulePron = ["sur" := "syʁ"], ruleExamples = ["sur" := "syʁ"]} , "ta" := Rule{rulePron = ["ta" := "ta"], ruleExamples = ["ta" := "ta"]} , "tage" := Rule{rulePron = ["tage" := "taʒ"], ruleExamples = ["sauvetage" := "sov.taʒ"]} @@ -425,8 +490,15 @@ pronunciationRules = , "tient" := Rule{rulePron = ["tient" := "tjɛ̃"], ruleExamples = ["tient" := "tjɛ̃"]} , "tier" := Rule{rulePron = ["tier" := "tje"], ruleExamples = ["chalutier" := "ʃa.ly.tje"]} , "tion" := Rule{rulePron = ["tion" := "sjɔ̃"], ruleExamples = ["révolution" := "ʁe.vɔ.ly.sjɔ̃"]} + , "ssion" := Rule{rulePron = ["ssion" := "sjɔ̃"], ruleExamples = ["passion" := "pa.sjɔ̃"]} + , "tille" := Rule{rulePron = ["tille" := "tij"], ruleExamples = ["myrtille" := "miʁ.tij"]} , "tique" := Rule{rulePron = ["tique" := "tik"], ruleExamples = ["pneumatique" := "pnø.ma.tik"]} - , "tire" := Rule{rulePron = ["tire" := "tiʁ"], ruleExamples = ["tire" := "tiʁ"]} + , "tir" := Rule{rulePron = ["tir" := "tiʁ"], ruleExamples = ["tire" := "tiʁ"]} + , "pêche" := Rule{rulePron = ["pêche" := "pɛʃ"], ruleExamples = ["pêche" := "pɛʃ"]} + , "vert" := Rule{rulePron = ["vert" := "vɛʁ"], ruleExamples = ["vert" := "vɛʁ"]} + , "myr" := Rule{rulePron = ["myr" := "miʁ"], ruleExamples = ["myrtille" := "miʁ.tij"]} + , begining "si" := Rule{rulePron = [begining "si" := "si"], ruleExamples = ["sirop" := "si.ʁo"]} + , ending "rop" := Rule{rulePron = ["rop" := "ʁo"], ruleExamples = ["sirop" := "si.ʁo"]} , "tor" := Rule{rulePron = ["tor" := "tɔʁ"], ruleExamples = ["alligator" := "a.li.ga.tɔʁ"]} , "touche" := Rule{rulePron = ["touche" := "tuʃ"], ruleExamples = ["touche" := "tuʃ"]} , "tris" <> [LexemeConsonant] := Rule{rulePron = ["tris" := "tʁis"], ruleExamples = ["ma" := "ma"]} @@ -440,11 +512,33 @@ pronunciationRules = , "vec" := Rule{rulePron = ["vec" := "vɛk"], ruleExamples = ["avec" := "a.vɛk"]} , "vis" := Rule{rulePron = ["vis" := "vis"], ruleExamples = ["visqueuse" := "vis.køz"]} , "vo" := Rule{rulePron = ["vo" := "vɔ"], ruleExamples = ["révolution" := "ʁe.vɔ.ly.sjɔ̃"]} + , "von" := Rule{rulePron = ["von" := "vɔ̃"], ruleExamples = ["savon" := "sa.vɔ̃"]} + , "sson" := Rule{rulePron = ["sson" := "sɔ̃"], ruleExamples = ["boisson" := "bwa.sɔ̃"]} + , "zeuse" := Rule{rulePron = ["zeuse" := "zøz"], ruleExamples = ["gazeuse" := "ga.zøz"]} , "voi" := Rule{rulePron = ["voi" := "vwa"], ruleExamples = ["voilier" := "vwa.lje"]} , "vé" := Rule{rulePron = ["vé" := "ve"], ruleExamples = ["vélo" := "ve.lo"]} + , "fête" := Rule{rulePron = ["fête" := "fɛt"], ruleExamples = ["fête" := "fɛt"]} + , "fruit" := Rule{rulePron = ["fruit" := "fʁɥi"], ruleExamples = ["fruit" := "fʁɥi"]} + , "nane" := Rule{rulePron = ["nane" := "nan"], ruleExamples = ["banane" := "ba.nan"]} + , "pomme" := Rule{rulePron = ["pomme" := "pɔm"], ruleExamples = ["pomme" := "pɔm"]} + , "ce" := Rule{rulePron = ["ce" := "sə"], ruleExamples = ["cerise" := "sə.ʁiz"]} + , "rise" := Rule{rulePron = ["rise" := "ʁiz"], ruleExamples = ["cerise" := "sə.ʁiz"]} , "yo" := Rule{rulePron = ["yo" := "jo"], ruleExamples = ["Yohan" := "jo.an"]} , "é" := Rule{rulePron = ["é" := "e"], ruleExamples = ["équipe" := "e.kip"]} + , "dé" := Rule{rulePron = ["dé" := "de"], ruleExamples = ["décorations" := "de.kɔ.ʁa.sjɔ̃"]} , "œ" := Rule{rulePron = ["œ" := "œ"], ruleExamples = ["œillet" := "œ.jɛ"]} + , "ti" := Rule{rulePron = ["ti" := "ti"], ruleExamples = ["d'artifices" := "daʁ.ti.fis"]} + , "fice" := Rule{rulePron = ["fice" := "fis"], ruleExamples = ["d'artifices" := "daʁ.ti.fis"]} + , -- kɑ̃.ta.lu + "can" <> [LexemeConsonant] := Rule{rulePron = ["can" <> [LexemeConsonant] := "kɑ̃"], ruleExamples = ["cantaloup" := "kɑ̃.ta.lu"]} + , ending "loup" := Rule{rulePron = [ending "loup" := "lu"], ruleExamples = ["cantaloup" := "kɑ̃.ta.lu"]} + , begining "d'ar" := Rule{rulePron = [begining "d'ar" := "daʁ"], ruleExamples = ["d'artifices" := "daʁ.ti.fis"]} + , "mustang" := Rule{rulePron = ["mus" := "mys", "tang" := "tɑ̃g"], ruleExamples = ["mustang" := "mys.tɑ̃g"]} + , "tarte" := Rule{rulePron = ["tarte" := "taʁt"], ruleExamples = ["tarte" := "taʁt"]} + , "citron" := Rule{rulePron = ["ci" := "si", "tron" := "tʁɔ̃"], ruleExamples = ["citron" := "si.tʁɔ̃"]} + , begining "d'o" := Rule{rulePron = [begining "d'o" := "dɔ"], ruleExamples = ["d'orange" := "dɔ.ʁɑ̃ʒ"]} + , begining "d'a" <> [LexemeConsonant] := Rule{rulePron = [begining "d'a" <> [LexemeConsonant] := "da"], ruleExamples = ["d'ananas" := "da.na.nas"]} + , word "d'ananas" := Rule{rulePron = ["d'a" <> [LexemeMeaning "fruit"] := "da", "na" <> [LexemeMeaning "fruit"] := "na", "nas" <> [LexemeMeaning "fruit"] := "nas"], ruleExamples = ["d'ananas" := "da.na.nas"]} , [LexemeVowel] <> "san" <> [LexemeConsonant] := Rule{rulePron = [[LexemeVowel] <> "san" <> [LexemeConsonant] := "zɑ̃"], ruleExamples = ["chrysanthème" := "kʁi.zɑ̃.tɛm"]} , [LexemeVowel] <> "sienne" := Rule{rulePron = [[LexemeVowel] <> "sienne" := "zjɛn"], ruleExamples = ["draisienne" := "dʁɛ.zjɛn"]} , [LexemeVowel] <> "ya" := Rule{rulePron = [[LexemeVowel] <> "ya" := "ja"], ruleExamples = ["ya" := "ja"]} @@ -468,15 +562,20 @@ pronunciationRules = , ending "mmo" := Rule{rulePron = [ending "mmo" := "mo"], ruleExamples = ["immo" := "i.mo"]} , ending "mo" := Rule{rulePron = [ending "mo" := "mo"], ruleExamples = ["homo" := "o.mo"]} , ending "mot" := Rule{rulePron = [ending "mot" := "mo"], ruleExamples = ["mot" := "mo"]} + , ending "doux" := Rule{rulePron = [ending "doux" := "du"], ruleExamples = ["doux" := "du"]} , ending "not" := Rule{rulePron = [ending "not" := "no"], ruleExamples = ["canot" := "ka.no"]} - , ending "s" := Rule{rulePron = [ending "s" := [""]], ruleExamples = []} + , ending "s" := Rule{rulePron = [ending "s" := [""]], ruleExamples = ["bulles" := "byl"]} + , ending "ent" := Rule{rulePron = [ending "ent" := [""]], ruleExamples = ["tirent" := "tiʁ"]} , ending "t" := Rule{rulePron = [ending "t" := [""]], ruleExamples = []} , ending "tan" := Rule{rulePron = [ending "tan" := "tɑ̃"], ruleExamples = ["tan" := "tɑ̃"]} - , ending "teau" := Rule{rulePron = [ending "teau" := "to"], ruleExamples = ["bateau" := "ba.to"]} + , "teau" := Rule{rulePron = ["teau" := "to"], ruleExamples = ["bateau" := "ba.to"]} + , "beau" := Rule{rulePron = ["beau" := "bo"], ruleExamples = ["corbeau" := "kɔʁ.bo"]} + , "ceau" := Rule{rulePron = ["ceau" := "so"], ruleExamples = ["lionceau" := "ljɔ̃.so"]} , ending "to" := Rule{rulePron = [ending "to" := "to"], ruleExamples = ["moto" := "mɔ.to"]} , ending "ts" := Rule{rulePron = [ending "ts" := [""]], ruleExamples = ["maillots" := "ma.jo"]} , word "dans" := Rule{rulePron = [word "dans" := "dɑ̃"], ruleExamples = ["dans" := "dɑ̃"]} , word "et" := Rule{rulePron = [word "et" := "e"], ruleExamples = ["et" := "e"]} + , word "des" := Rule{rulePron = ["des" := "de"], ruleExamples = ["des" := "de"]} , word "les" := Rule{rulePron = [word "les" := "le"], ruleExamples = ["les" := "le"]} , word "sous" := Rule{rulePron = [word "sous" := "su"], ruleExamples = ["sous" := "su"]} , word "un" := Rule{rulePron = [word "un" := "œ̃"], ruleExamples = ["un" := "œ̃"]} diff --git a/tests/Recipes/recipe.css b/tests/Recipes/recipe.css new file mode 100644 index 0000000..82e13b1 --- /dev/null +++ b/tests/Recipes/recipe.css @@ -0,0 +1,3 @@ +text { + font-variant-ligatures:none; +} diff --git a/tests/Spec.hs b/tests/Spec.hs index 91b0a38..ea3cfe8 100644 --- a/tests/Spec.hs +++ b/tests/Spec.hs @@ -5,6 +5,7 @@ import Test.Syd import Language.ChineseSpec qualified import Language.EnglishSpec qualified import Language.FrenchSpec qualified +import RecipesSpec qualified import Rosetta.ReadingSpec qualified import Rosetta.WritingSpec qualified import WiktionarySpec qualified @@ -14,22 +15,24 @@ main :: IO () main = sydTest spec spec = do - WiktionarySpec.spec - -- xdescribe "Language" do - -- describe "Chinese" do - -- Language.ChineseSpec.spec - withTimeout 3000000 do - withoutRetries do - describe "Language" do - describe "EnglishSpec" do - Language.EnglishSpec.spec - describe "FrenchSpec" do - Language.FrenchSpec.spec - - withoutRetries do - describe "Rosetta" do - describe "ReadingSpec" do - Rosetta.ReadingSpec.spec + RecipesSpec.spec + +-- WiktionarySpec.spec +---- xdescribe "Language" do +---- describe "Chinese" do +---- Language.ChineseSpec.spec +-- withTimeout 3000000 do +-- withoutRetries do +-- describe "Language" do +-- describe "EnglishSpec" do +-- Language.EnglishSpec.spec +-- describe "FrenchSpec" do +-- Language.FrenchSpec.spec + +-- withoutRetries do +-- describe "Rosetta" do +-- describe "ReadingSpec" do +-- Rosetta.ReadingSpec.spec -- --describe "WritingSpec" do -- Rosetta.WritingSpec.spec diff --git a/worksheets.cabal b/worksheets.cabal index e2f9c6b..e99f306 100644 --- a/worksheets.cabal +++ b/worksheets.cabal @@ -91,6 +91,7 @@ common library-deps , filepath , generic-data , ipa + , ListZipper , megaparsec , parser-combinators , pretty-simple @@ -116,6 +117,7 @@ library hs-source-dirs: src autogen-modules: Paths_worksheets exposed-modules: + Graph.DOT Language Language.Chinese Language.Chinese.Pinyin @@ -200,6 +202,8 @@ test-suite worksheets-tests Language.EnglishSpec Language.FrenchSpec Paths_worksheets + Recipes + RecipesSpec Rosetta.ReadingSpec Rosetta.WritingSpec Utils.Pronunciation -- 2.47.2