diff --git a/regenpfeifer/assets/patterns/right_patterns.json b/regenpfeifer/assets/patterns/right_patterns.json index 2989cb2..418a5b0 100644 --- a/regenpfeifer/assets/patterns/right_patterns.json +++ b/regenpfeifer/assets/patterns/right_patterns.json @@ -8,7 +8,10 @@ "tt": "t", "ren": "[-RPB]", "lsch": "[-RBL]", + "lch": "[-FPL]", "ldet": "[-LTD]", + "ltst": "[-FLT]", + "lbst": "[-FLT]", "ndst": "[-FPBT]", "ngst": "[-FPBGT]", "fen": "[-FPB]", @@ -20,13 +23,17 @@ "mpf": "[-FPL]", "nst": "[-FPBT]", "tzt": "[-FT]", + "len": "[-PBL]", "nem": "[-PBL]", + "men": "[-PBL]", + "ln": "[-PBL]", "sch": "[-RB]", "nch": "[-FRPB]", "rch": "[-FRPB]", "ser": "[-FR]", "ßer": "[-FR]", "end": "[-PBD]", + "rfst": "[-FRT]*", "rst": "[-FRT]", "bst": "[-FBT]", "der": "[-RD]", @@ -43,6 +50,7 @@ "rf": "[-FR]", "nf": "[-FPB]", "nk": "[-PBG]", + "gen": "[-PBG]", "ch": "[-FP]", "tz": "[-TS]", "dt": "[-TD]", diff --git a/regenpfeifer/assets/patterns/vowel_patterns.json b/regenpfeifer/assets/patterns/vowel_patterns.json index ea5a955..5fb0543 100644 --- a/regenpfeifer/assets/patterns/vowel_patterns.json +++ b/regenpfeifer/assets/patterns/vowel_patterns.json @@ -8,10 +8,12 @@ "[e|eu]": "[e|OEU]", "[e|i]e": "[e|AOEU]", "[e|i]h": "[e|AOEU]", + "[e|e]e": "[e|AOE]", "[e|ö]": "[e|OE]", "[e|ä]": "[e|AE]", "[e|ü]": "[e|OU]", "[e|a]": "[e|A]", + "[e|o]o": "[e|AO]", "[e|o]": "[e|O]", "[e|e]": "[e|E]", "[e|u]": "[e|U]", diff --git a/test/test_stroke_generator.py b/test/test_stroke_generator.py index 358615d..bda077f 100644 --- a/test/test_stroke_generator.py +++ b/test/test_stroke_generator.py @@ -38,9 +38,10 @@ def test_easy_words(self): self.run_test("Beute", "sg", ["PWOEU/TE"]) self.run_test("Beutezug", "sg", ["PWOEU/TE/ZUG"]) self.run_test("unglück", "sg", ["UPB/TKPWHROUBG"]) - self.run_test("sollend", "part", ["SOL/HREPBD"]) + self.run_test("sollend", "part", ["SOPBLD", "SOL/HREPBD"]) self.run_test("Aufgaben", "pl", ["AUF/TKPWA/PWEPB"]) self.run_test("seinen", "prp$", ["SAEU/TPHEPB"]) + self.run_test("Boot", "nn", ["PWAOT"]) def run_test(self, word, word_type, expected): self.assertEqual(expected, self.stroke_generator.generate(word, word_type)) diff --git a/test/test_word_emphasizer.py b/test/test_word_emphasizer.py index ed7016f..abaa94a 100644 --- a/test/test_word_emphasizer.py +++ b/test/test_word_emphasizer.py @@ -13,7 +13,6 @@ def setUp(self): self.word_emphasizer = WordEmphasizer() def test_simple_words(self): - print() self.run_test("wegen", "inf", "w[e|e]gen") self.run_test("beim", "in", "b[e|ei]m") self.run_test("erst", "rb", "[e|e]rst") @@ -21,6 +20,9 @@ def test_simple_words(self): self.run_test("un", "other", "[e|u]n") self.run_test("glück", "other", "gl[e|ü]ck") + def test_double_vowel_words(self): + self.run_test("Boot", "other", "B[e|o]ot") + def test_compound_words(self): self.run_test("Baustellenschild", "other", "B[e|au]stellenschild") diff --git a/test/test_word_syllable_splitter.py b/test/test_word_syllable_splitter.py index ee7e9fe..1d2327f 100644 --- a/test/test_word_syllable_splitter.py +++ b/test/test_word_syllable_splitter.py @@ -24,9 +24,7 @@ def test_split(self): self.run_test("erklären", ["er", "klä", "ren"]) self.run_test("gesprochen", ["ge", "spro", "chen"]) self.run_test("Million", ["Mil", "li", "on"]) - # self.run_test('Millionen', ['Mil', 'li', 'o', 'nen']) - # self.run_test('Januar', ['Ja', 'nu', 'ar']) - # self.run_test('Januare', ['Ja', 'nu', 'a', 're']) + self.run_test("Millionen", ["Mil", "lio", "nen"]) self.run_test("Ionen", ["Io", "nen"]) self.run_test("Arbeit", ["Ar", "beit"]) self.run_test("seiet", ["sei", "et"]) @@ -46,10 +44,16 @@ def test_split(self): self.run_test("Hoffnung", ["Hoff", "nung"]) self.run_test("Liste", ["Lis", "te"]) self.run_test("neue", ["neu", "e"]) - # self.run_test('andere', ['an', 'de', 're']) self.run_test("altes", ["al", "tes"]) self.run_test("müssten", ["müss", "ten"]) self.run_test("seinen", ["sei", "nen"]) + # currently failing: + # self.run_test("gestanden", ["ge", "stan","den"]) + # self.run_test('gestellt', ['ge', 'stellt']) + # self.run_test('andere', ['an', 'de', 're']) + # self.run_test('Januar', ['Ja', 'nu', 'ar']) + # self.run_test('Januare', ['Ja', 'nu', 'a', 're']) + # self.run_test('bereits', ['be', 'reits']) def run_test(self, word, expected): self.assertEqual(expected, self.syllable_splitter.split(word))