-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpluvier_test.py
2302 lines (1858 loc) · 66.6 KB
/
pluvier_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import sys
import json
import inspect
import numpy as np
from src.steno import Steno
from src.steno import Word
class TestPluvier:
one_syllabe_words = {
"TAS" : "tasse",
# "SUS" : "suce",
# "S" : "ce",
"WEU" : "vie",
"WEUT" : "vite",
"TEUP" : "type",
"TPEUL" : "fil",
# "-TS" : "être",
"PHAEB": "mienne",
}
i_words = {
"RAPD" : "rapide",
# "TKWEUS" : "édifice",
# "TPORPL/TKABL" : "formidable",
"WEUS" : "vis",
# "APBLG/OEUPBDZ": "adjoindre",
}
prefix_word = {
"SPWAPBD" : "entende",
"SPWAPBGS" : "intention",
}
suffix_word = {
"WHROUR" : "velours",
"TPROEURD": "froideur",
# "WLOEFS" : "voulez-vous"
# "PWAER" : "bière", abbrev
"SPWOUZ/KWRAFPL" : "enthousiasme",
"SPWOUZ/KWRA*S" : "enthousiaste",
"AFRS" : "avoir",
"POUFRS" : "pouvoir" ,
"RURL" : "rural",
"WEURL" : "viral",
"KOFRBL" : "comble",
"PAPBGS" : "pension",
"TERBL" : "terrible",
"THR-PLT" : "tellement",
"PAB" : "panne",
# -ne
# "ATS/LO*EG" : "astrologue",
# "HAER" : "hier",
# "TLOIK" : "technologique",
# "SLO*IG" : "psychologie",
"PAER" : "pierre",
"WHRUPL": "volume",
"WHRUPL/TPHAO": "volumineux", #remove star ?!
}
right_ch_sound = {
"AFRPB" : "arche",
"TOFRPB" : "torche",
"AFRPB/T*K" : "architecte",
"PHAFRPBLG" : "manche",
# "PWHRAFRPBLG" : "blanche",
# "SKHRAEU": "chalet",
# "SKWAL" : "cheval",
}
corpus = False
def read_corpus(self):
if self.corpus:
return self.corpus
print('read corpus')
words = []
source = "resources/Lexique383.tsv"
with open(source) as f:
corpus = f.readlines()
for line in corpus:
entry = line.split("\t")
word = Word(word = entry[0],
phonetics = entry[1],
lemme = entry[2],
cgram = entry[3],
cgramortho = entry[28],
genre = entry[4],
number = entry[5],
info_verb = entry[10],
syll = entry[22],
orthosyll = entry[27]
)
words.append(word)
return words
def setup_method(self, test_method):
self.corpus = self.read_corpus()
def steno(self,word, force_verb = False):
self.steno_class=Steno(self.corpus)
self.steno_class.force_verb=False
if force_verb:
self.steno_class.force_verb = True
return self.steno_class.transform(word)
def test_lesson1_e_muet(self):
self.assertSame(self.one_syllabe_words)
def test_lesson2_p(self):
self.assertSame({'PAP':'pape',
'SAP': 'sape',
'PAT': 'patte',
'PUS' : 'puce',
'TAP' : 'tape',
'PAS': 'passe'
})
def test_lesson3_r(self):
self.assertSame({
'RU' : 'rue',
'TRAP' : 'trappe',
'PART' : 'parte',
'STOR' : 'store',
'SORT' : 'sorte'
# 'RA*' : 'rat'
})
def test_lesson4_w_f(self):
self.assertSame({
#'WA' : 'va', #contradiction lesson 19
# 'WU' : 'vue',
'WOT' : 'vote',
'RAF' : 'rave',
# 'SAF' : 'save'
})
# def test_lesson4_ortho_star_verb(self):
# self.assertSame({
# 'WOE' : 'veau',
# 'WO*E' : 'vaut',
# })
#
def test_lesson5_K_L(self):
self.assertSame({
"K" : "que",
"KAR" : "car",
"KE" : "quai",
"WAG" : "vague",
"KOD" : "code",
"ROEL": "rôle",
"KOET": "côte",
# "KOEUL": "colis", inversion
# "KOEUP": "copie",
# "KOEUPB": "coin",
# "KOEUPBS": "coince",
})
def test_lesson5_omittedIWords(self):
self.assertSame(self.i_words)
def test_lesson6_H_B(self):
self.assertSame({'HOE' :'haut',
'HOET' : 'haute',
'HOT' : 'hotte',
'SOB' : 'sonne',
'PAB' : 'panne',
})
def test_lesson6_eu(self):
self.assertSame({ 'SAO' : 'ceux',
'SAOL' : 'seul'
})
def test_lesson7_G_D(self):
self.assertSame({ "WAG" : "vague",
"KOD" : "code",
"RAG" : 'rage',
'SAG' : 'sage',
'ROUG' : 'rouge'
})
def test_lesson7_AEU_ai(self):
self.assertSame({ 'RAEU' : 'raie',
# 'TRAEU' : 'trait',
'AEUD' : 'aide',
# 'SAEU*' : 'sait'
})
def test_lesson8_Z(self):
self.assertSame({
'ROZ' : 'rose', # was ROEZ
'RAZ' : 'rase',
'SAEUZ' : 'seize'
})
#skip lesson 9 on numbers
def test_lesson9_numbers(self):
self.assertSame({
#'TK' : 'deux',
'PHRABG' : 'plaque',
'HRAEUS' : 'laisse'
})
def test_lesson10_HR_for_L_BG_for_K_ending(self):
self.assertSame({ 'HREUR' : 'lire',
'PHRABG' : 'plaque',
'HRAEUS' : 'laisse'
})
def test_lesson11_TK_for_d_FL_for_F(self):
self.assertSame({ #'TK' : 'de',
'TKU' : 'du',
'TKOUT' : 'doute',
# 'WEUFL' : 'vif',
# 'WEUF' : 'vive'
})
def test_lesson11_AU_for_ui(self):
self.assertSame({ "PAU" : "puis",
"KAUT" : "cuite",
'KAUS' : 'cuisse',
'SAUFR' : 'suivre'
})
def test_lesson11_AU_for_long_A(self):
self.assertSame({ "PAUT" : "pâte",
"RAUP" : "râpe"
})
def test_lesson12_PW_for_Binit_PL_for_Mfinal(self):
self.assertSame({ # 'PWO' : 'beau',
# 'PWOR' : 'bord',
'KAPL' : 'came',
# 'AEUPL*' : 'aime'
})
def test_lesson12_ortho_aSem_for_ieme(self):
self.assertSame({'HAUT/A*EPL': 'huitième',
"SAEUZ/A*EPL": "seizième",
# should be "SAEUZ/A*EPL": "seizième",
})
def test_lesson12_AOEU_for_ieu(self):
self.assertSame({'WAOEU' : 'vieux',
'HRAOEU' : 'lieu',
# 'AOEU' : 'yeux',
# 'KRAOEU' : 'curieux' kur/aoeu
})
def test_lesson12_ortho_rightR_infinitif(self):
self.assertSame({
'PAPBS/-R' : 'penser',
'PARL/-R' : 'parler',
"SOUL/W-R" :"soulever",
"TW-R" : "tuer",
"TWED" : "tuée"
})
def test_lesson12_ortho_rightD_passe_compose(self):
self.assertSame({'PARL/-D' : 'parlé',
# 'SU/-D' : 'sué'
},True)
def test_lesson13_TP_for_F_init_PB_for_N_final(self):
self.assertSame({"TPEUL": "fil",
"TPAUT": "fuite",
"TPRAEU": "frais",
# "POPBT": "ponte",
"TOPB": "ton",
"TPOPB": "fond",
})
def test_lesson13_RE_prefix(self):
self.assertSame({ #"R-/TPHRU": "reflux" ,
# "R-FR": "refaire",
"R-L/WE": "relevé",
"R-LGS": "relation",
# "R-LT": "réalité",
}, False)
def test_lesson13_AE_for_ie(self):
self.assertSame({ "PAE" : "pied",
"HAER": "hier",
"SHRAR/AE":"salarié",
"SAEL" : "ciel",
"PAES": "pièce",
"TAERS": "tierce",
})
def test_lesson13_AER_suffix_ier_iere(self):
self.assertSame({"K-S/A*ER": "caissière",
"WOEUL/AER": "voilier",
"TE/A*ER": "théière",
})
self.assertNotIn( {
"K-S/AER": "caissière",
})
#TODO
def test_lesson13_inversion_ses_son(self):
return True
def test_lesson13_LEFT_R_can_be_read_as_i_infrontof_a_or_o(self):
self.assertSame({
'TKRABL' : 'diable',
# conflit brioche 'WROL' : 'viol'
})
# H- COTE gauche pour les groupement -> not to todo ?
def test_lesson13_S_alone_for_imparfait(self):
self.assertSame({"KRABG/-S": "craquait",
"PAS/-S": "passait",
"KOUR/-S": "courait",
})
def test_lesson13_RS_alone_for_conditionnel(self):
self.assertSame({
# "TP-RS": "ferait",
"KRABG/-RS": "craquerait",
"KOU/-RS": "courrait",
"PAS/-RS": "passerait",
})
def test_new_stl_RAEU_alone_for_futur_simple(self):
self.assertSame({
# "TP-RS": "ferait",
"RAPBDZ/AEU": "rendrai",
# "KOU/-RS": "courrait",
"PAS/-RS": "passerait",
})
def test_lesson13_AI_alone_for_nom_ai(self):
self.assertSame({
"TEUR/AEU": "tiret",
"TEUR/-S": "tirait",
"SORB/AEU": "sorbet",
"TPEUL/AEU": "filet",
})
def test_lesson13_G_alone_for_ant_participe_present(self):
self.assertSame({"KREU/-G": "criant",
"SA/-G": "saillant",
# "REU/-G": "riant",
"KOUR/-G": "courant",
})
def test_lesson13_BLG_alone_for_quel(self):
self.assertSame({
"SEBLG": "séquelle",
"HR-BLG": "lequel",
})
def test_lesson13_RP_for_peur_RL_for_leur(self):
self.assertSame({"TRARP": "trappeur",
"RAURL" : "râleur"
# "WRL": "voleur", #should be WORL ?
})
def test_lesson14_PH_for_M_initial(self):
self.assertSame({
"PHAOEU": "mieux",
"PHEUZ": "mise",
"PHARL": "malheur",
})
# def test_lesson14_LG_for_la(self):
def test_lesson14_OEU_for_oi_OEUN_for_oin(self):
self.assertSame({
"ROEU": "roi",
# "PWOEU": "bois",
# "TPOEUPB": "foin",
# "PWO*EUT": "boite",
})
def test_lesson14_e_never_inside_word_and_star_for_re_suffix(self):
self.assertSame({
# "R-L/WE": "relevé",
"TK-G/R*E": "degré",
# "TKG/R*E": "degré",
# "TKRE": "degré",
})
def test_lesson14_star_N_for_ending_on(self):
self.assertSame({
"PH-L/*PB": "melon",
"PHOPB": "mon",
})
def wrong_lesson14_star_S_for_ste(self):
self.assertSame({"P*EUS": "piste",
"HR*EUS": "liste",
})
def test_lesson15_TPH_for_N_initial(self):
self.assertSame({
# TPHU" : "nu",
"TPHOEU": "noix",
# "TPHEUD" : "nid", TODO if exists put D
})
def test_lesson15_GBS_for_final_X(self):
self.assertSame({ "TPEUBGS": "fixe",
"TABGS": "taxe",
})
# def test_lesson15_H_n_Negation(self):
def test_lesson15_AOU_is_oui(self):
self.assertSame({"AOU": "oui",
"TPAOUB": "fouine",
})
def test_lesson15_ez_star_EZ_and_REZ_for_rez(self):
self.assertSame({"TROUF/*EZ": "trouvez",
"PARL/*EZ": "parlez",
"APS/TPHAEZ": "appreniez",
"PARL/R*EZ": "parlerez",
})
def test_lesson16_KWR_for_y_and_G_for_j(self):
self.assertAllMatching("yacht", ["KWROT"]) #mistake in lesson : kwrat
self.assertSame({
"KWROT": "yacht", #mistake in lesson : kwrat
# "KWRAT/US": "hiatus", #strange hier is not kwr...
"PAG": "page",
"PHARG": "marge", #'maRZ'
})
def TODO_lesson16_conj_Y_for_il(self):
self.assertSame({
"KWROEUD": "il doit",
"KWRAOF": "il veut",
})
def test_lesson16_PBLG_for_dj_and_bj_median(self):
self.assertSame({
"APBLG/TEUFL" : "adjectif",
"OPBLG/TEUFL": "objectif",
"R-G": "rejet",
"SUPBLG": "sujet"
})
def test_lesson17_SKWR_for_J_initial_and_SWR_for_Z_initial(self):
self.assertSame({
#should be ? "SKWR-L/-D": "gelé",
# "SKWR-LD": "gelée",
# "SKWRL/-D": "gelé",
"SKWROEUPB": "joint",
"SWROUPL": "zoom",
# "SKWRA*EUT": "jette",
})
#TODO ?
def lesson17_nom_propre_ending_y_AO_star_E(self):
self.assertSame({
"HAR/AO*E": "Harry",
})
def test_lesson17_final_ette_is_separate_star_T(self):
self.assertSame({ "TOEUL/*T": "toilette",
"POPL/*T": "pommette",
})
def test_lesson18_TKPW_for_sound_gue_initial_KW_for_qwe(self):
self.assertSame({
#"TKPWOU": "goût",
"TKPWAPB": "gant",
"TKPWAFL": "gaffe",
"AD/KWA": "adéquat",
"AD/KWAT": "adéquate",
})
def test_lesson18_AIB_for_aine_sound(self):
self.assertSame({
"SAEUB": "saine",
"TKPWAEUB": "gaine",
# "TKEUBGS/A*EUB": "dizaine",
# "KEUPBZ/A*EUB": "quinzaine",
})
def test_lesson19_KP_for_X_in_egz_sound_followed_by_woyel(self):
self.assertSame({
"KPEUL": "exil",
"KPUT": "exécute",
"KPEUG": "exige",
})
def test_lesson19_W_is_we_sound(self):
self.assertSame({
"SWAEU": "souhait",
})
def test_lesson19_starEB_ending_ene(self):
self.assertSame({
"SEUR/*EB": "sirène",
# "KPEUG/*EB": "oxygène",
})
def test_lesson19_WstarE_ending_ue_oue(self):
self.assertSame({
"AF/W*E": "avoué",
"TKEUL/W*E": "dilué",
"TRAPL/W*E": "tramway",
#
},False)
def test_lesson19_WEL_ending_uel_stl_remove_star(self):
self.assertSame({
"WEUZ/WEL": "visuel",
# "TKWHR": "duel",
"TKPWRAD/WEL": "graduel",
"TKPWRAD/W*EL": "graduelle",
# "ABT/W*EL": "habituel",
})
def test_lesson19_separate_starZ_ending_a_sound(self):
self.assertSame({
"R-P/*Z": "repas",
# post prod: "SAGZ": "saga",
"SHRA": "cela",
# "EURZ": "ira",
"RA": "rat",
# "PRAPBD/-RZ": "prendra",
"PRAPBDZ/*Z": "prendra",
"SAG/*Z": "saga",
"KOUP/*Z": "coupa",
# "WOBGZ": "avocat",
# "WEUFR/*Z": "vivra",#removed i
})
self.assertNotIn({ 'OER/A' : "auras",
'PRAPBD/RA': "prendra"})
def test_cons_not_S_P(self):
self.assertNotIn( { 'S-P/EURGS' : 'conspiration' })
def test_lesson21_CH_init_is_SH_final_is_FP(self):
self.assertSame({
# "SHAER": "cher",
"KAFP": "cache",
"SHOEU": "choix",
# "SHO": "chaud",
"RUFP": "ruche",
# "SHE": "chez",
})
def test_lesson21_modify_stl_EL_el_ortho_final(self):
self.assertAllMatching("cruel", [ "KR/WEL", "KRUL", "KRU/EL", "KRU/AEUL"])
self.assertAllMatching("cruelle", [ "KR/W*EL", "KR*UL", "KRU/*EL"])
def test_lesson21_modify_stl_starEL_elle_ortho_final(self):
self.assertSame({
# "KRU/*EL": "cruel",
# "K-PB/*EL": "conditionnel",
# "K-PBL": "conditionnel",
"SAEUBGS/WEPLT":"sexuellement",
"TKPWROUPLT":"groupement",
"TPEUS/*EL": "ficelle",
})
def test_lesson21_RT_RTS_for_ortho_teur_trice(self):
self.assertSame({
"HRAEURT": "lecteur",
"ARTS": "actrice", # ABG/*RTS
# "HRAEUBG/RTS": "lectrice",
"HRAEURTS": "lectrice",
})
def test_lesson22_B_is_final_ne(self):
self.assertSame({
"PWOB": "bonne",
"SKWROEB": "jaune",
"SKWRAOB": "jeune",
"SKWRAOBS": "jeunesse",
})
def test_lesson22_AEN_ien_sound_AEB_for_ienne_sound_star_for_suffix(self):
self.assertSame({"PHAEPB": "mien",
"PHAEB": "mienne",
"HRAEPB": "lien",
# "SWAEPB": "souvient",
# "KWA*EPB": "convient",
})
def test_lesson22_AOUB_for_sound_ouine(self):
self.assertSame({
"TPAOUB": "fouine",
# "STKPWAOUB": "égoïne",
})
def test_lesson22_GZ_for_sound_zion_and_zon(self):
self.assertSame({
# "OGZ": "occasion",
"TPUGZ": "fusion",
# "SAEUGZ": "saison",
})
def test_lesson23_natural_combo_initial_consonne(self):
self.assertSame({
# "STKPWOPB": "second",
# "STPAEUR": "sphère", #'sfER'
"STRAT": "strate",
"STEUL": "style",
"SKRUT": "scrute",
"STRAT": "strate",
"STEUL": "style",
"SKRUT": "scrute",
"SKOUR": "secours",
# "SPHREUD": "splendide",
# "SPH-": "semaine",
"SPREUPBT": "sprint",
# "SRA": "serait",
"TKPWHRAS": "glace",
# "TKPWREU": "gris", conflit avec agricole
"TKREUPB": "drain", #'dR5'
# "TPHRAOR": "fleur", #'fl9R'
# "TPRAEUL": "frêle",#'fREl'
# "TROU": "trou",
"KHRAS": "classe",
"KRAPB": "cran",
"PWHROBG": "bloc",
"PWREUPB": "brin",
"PHRUPL": "plume",
"PREUZ": "prise",
"WHROUR": "velours",
"WRAEU": "vrai",
})
def test_lesson22_final_natural_consonnes(self):
self.assertSame({
"SOLD": "solde",
"TORS": "torse",
"TPORPL": "forme",
"TKOUBL": "double", #'dubl'
"TART": "tarte",
"KARP": "carpe",
# "KOFR": "coffre",
"KORB": "corne",
"KULT": "culte",
"KOPBT": "conte",
"SOPBD": "sonde","PARBG": "parc",
"PARL": "parle",
"PABGT": "pacte",
"PHORG": "morgue",
# "HRAPS/R-R": "laps",
"HROPBG": "longue",
"SOUFL": "souffle",
"HAEURB": "herbe",
# "AFPT": "achète", # a-SEt
# "ORPBLG": "orge", #'ORZ'
"OPT": "opte",
# "APBL/W*E": "enlevé",
})
def test_lesson25_KH_for_sound_mne(self):
self.assertSame({
"KHAS": "menace", #m°-nas
"KHU": "menu",
"KAL/O/KHAER":"calomnier",
"APB/KH-R": "emmener",
"APB/PH-L/-R": "emmêler",
# "KHAOR": "mineur",
"KHUT": "minute",
"KHAUZ/AER": "menuisier",
})
def test_lesson25_AE_for_starting_letter_a_word(self):
self.assertSame({
# "AE/WEUD": "avide",
"AE/TKOR": "adore",
"AE/TKAOEU": "adieu",
"AE/PHORS": "amorce",
"AE/TKOPT": "adopte",
})
#TODO il y a et preposition lesson 26
def test_lesson26_AEN_for_sound_ian(self):
self.assertSame({
"SAEPBS": "science", #'sj@s'
'KHRAEPB': 'client',
})
def test_lesson26_final_NS_for_ortho_ance_or_ence(self):
self.assertSame({
# "KROEUPBS": "croissance",
# should be "SAURPBS": "assurance", but assumed is
"AE/SURPBS" : "assurance",
"SEURBG/OPB/STAPBS" : "circonstance",
"SPHREPBS": "suppléance",
"STPRAPBS": "souffrance",
})
def test_lesson26_final_ND_for_ortho_ande(self):
self.assertSame({
"WEUPBD": "viande",
"TPREUPBD": "friande",
# "TPREUPBDZ": "friandise",
})
def test_lesson26_KT_for_ortho_cte(self):
self.assertSame({
"ABGT": "acte",
"TKEUBGT": "dicte",
"PABGT": "pacte",
"TRABGT": "tract",
# "KHRAEUBGT": "collecte",
})
def test_lesson26_KEOEN_for_prefix_con(self):
self.assertSame({
# "KOEPB/SAEPBS": "conscience",
"KOEPB/KAF": "concave",
"KOEPB/KHRUR": "conclure",
# ordre du slash "KOEPB/TOUR": "contour",
})
def test_lesson27_STK_for_starting_des_and_dec_following_by_woyel(self):
self.assertSame({
# "TKAEUS/*EUPB": "dessin",
"STKEUR": "désir",
# "STKAPBDZ": "descendre",
"STKU": "dessus",
# "STKOU": "dessous",
"STKAEUR": "désert",
#"STK*EUR": "désire",
})
def test_lesson27_DAOE_for_starting_ortho_de(self):
self.assertSame({
#"TKAOE/KOUDZ": "découdre",
# "TKAOE/KOFP/-R": "décocher",
# "TKAOE/PREPB": "déprend",
#lesson 56
})
def test_lesson27_ending_sounds_tre_ntre_rtre_dre_ndre_bre_rbre_pre_rpre(self):
self.assertSame({
"ATS": "astre",
# "KOPBTS": "ncontre",
# "REPBDZ": "rendre",
"SOBS": "sobre",
"PHARBS": "marbre",
"POURPS": "pourpre",
# "SHREUPBDZ": "cylindre",
"SKWREUFR": "givre",
"WEUTS": "vitre",
"TARTS": "tartre",
"PHOUDZ": "moudre",
"PHORDZ": "mordre",
"ARBS": "arbre",
"PROPS": "propre",
"HREUTS": "litre",
"ORDZ": "ordre",
"KADZ": "cadre",
})
def test_lesson28_Kstar_for_prefix_com_and_KM_for_comm(self):
self.assertSame({
# 2 ways to write KPAR
"KPHAPBS/-D" : "commencé",
"K*/PAR": "compare", #'k§-paR'
"KPAR": "compare", #'k§-paR'
# "K*/PHROE": "complot",
"K*/PHRO": "complot",
# "KPHROE": "complot",
"K*/PABGT": "compact",
"K*/PWATS": "combattre",
# "K*/PA*": "compas",
# "KPHEUBG": "communique",
"KPH": "comme",
# "KPHA": "comment",
"KPHAEURS": "commerce",
})
def test_lesson28_FBG_for_sound_fic_and_fec(self):
self.assertSame({"TRAFBG": "trafic",
# "AFBG/TE": "affecté"
})
def test_lesson29_STPH_for_sound_sne(self):
self.assertSame({
"STPHOB": "snob",
"STPHABG": "snack",
# "STPHEUPL": "synonyme",
# "SPHA": "cinéma",
"STPHEUTS": "sinistre",
# "STPHOPB": "sinon",
})
def test_lesson29_GSstarB_or_GZ_for_sound_tionne_and_zionne(self):
self.assertSame({
#"TPOPBGS": "fonction",
# "STAGS/*B": "stationne",
"STAGZ": "stationne",
# "PAGS": "passion",
"PAGZ": "passionne",
# "POEGZ": "positionne",
})
def test_lesson29_GZ_for_sound_zion(self):
self.assertSame({
#"TKWEUGZ": "division",
"WEUGZ": "vision",
"TPUGZ": "fusion",
# "TPUGZ/*B": "fusionne",
})
def test_lesson29_GS_for_cien_and_GZ_for_cienne(self):
self.assertSame({
"PHAG/EUGS": "magicien",
"PHAG/EUGZ": "magicienne",
# "POL/TEUGS": "politicien",
})
# test fail due to starting of word
def test_lesson29_BGS_suffix_for_cation(self):
self.assertSame({
# "EUD/TP*EUBGS": "identification",
# "HRAGS": "location",
"WEFRBGS": "vérification",
# "KPHEUBGS": "communication",
})
def test_lesson29_AO_for_diphtong_io(self):
self.assertSame({
"PWRAOFP": "brioche",
"PHAOP": "myope",
"PAOFP": "pioche",
# "HRAOPB": "lion",
# "KPHAOPB": "camion",
})
def test_lesson30_SPW_for_prefix_ent_int_end_ind(self):
self.assertSame({
"SPWAPBDZ": "entendre",
"SPWORS": "entorse",
"SPWAPBT": "entente",
"SPWAPBGS": "intention",
# "SPWEUBG": "indique",
"SPWUR": "endure",
# "SPWRER": "entrer",
"SPWREUG": "intrigue",
"SPWAEPB": "indien",
})
def test_lesson30_SP_R_for_prefix_super_and_MULT_for_multi(self):
self.assertSame({
# "SP-R/TPHRU": "superflu",
# "STPEUGS": "superficiel",
# "PHULT/PHR*EU": "multiplie",
# "PHULT/TKPWREUPB": "multigrains",
"PHULT/TPORPL": "multiforme"})
def test_lesson30_INTS_for_prefix_inter(self):
self.assertSame({
# "EUPBTS/*D": "interdit",
# "EUPBTS/-DZ": "interdire",
# "SPWAEURD": "interdit",
"SPWAEURDZ": "interdire",
})
def test_lesson30_W_for_F_initial(self):
self.assertSame({"WHEU": "fini",
"WHEUS": "finisse",
"WHAL": "final",
"WHEUGS": "finition",
})
def test_lesson30_I_for_y(self):
self.assertSame({ "EU" : "y" })
def test_lesson31_FT_for_ending_vite_or_cite(self):
self.assertSame({ #"ABG/TEUFT": "activité",
"PAS/EUFT": "passivité",
"EUPB/WAPBT/EUFT": "inventivité",
# "EBG/TREUFT": "électricité",
})
def test_lesson31_ending_RD_for_deur_RG_for_gueur_RN_for_neur_AOstarR_for_eur(self):
self.assertSame({
"TPROEURD": "froideur",
"REURG": "rigueur",
"ARD/AO*R": "ardeur",
"STKEURD": "décideur",
# "PWORPB": "bonheur",
"WEURG": "vigueur",
})
def test_lesson31_rightW_is_F_after_SD(self):
self.assertSame({"STKWOE": "défaut",
"STKWAPB": "défend",
"STKWOUL": "défoule",
"STKWAEURL": "déferle",
# "STKWEURB": "définir",
})
def test_lesson32_WHR_for_sound_vle(self):
self.assertSame({
"WHROUR": "velours",
# "WHRAE": "vouliez",
"WHROEUR": "vouloir",
})
def test_lesson32_sounds_FRB_mbe_FRBL_mble_FRBS_mbre_FRPS_mpre(self):
self.assertSame({
"TRAFRBL": "tremble",
"TOFRB": "tombe",
# "HREUFRB/R-R": "limbe",
"PHAFRBS": "membre",
# "KOFRBL": "comble",
"PWOFRB": "bombe",
# "TRAFRBL": "tremble",
"TEUFRBS": "timbre",
"PHROFRB": "plombe",
"ROFRPS": "rompre",
})
def test_lesson32_suffix_starIFL_for_if_and_starIF_for_ive(self):
self.assertSame({
"PAS/*EUFL": "passif",
"PHAS/*EUFL": "massif",
# "PAS/*EUF": "passive",
# "PHOT/*EUF": "motive",
# "PHOEUF": "motive",
"SPORT/*EUF": "sportive",
})
def test_lesson33_sounds_PBGS_ntion_and_onction_starBGS_ction_PBGSstarB_or_GZ_ntionne_and_nctionne_PBGSR_ntionner_IGZ_itionne(self):
self.assertSame({
"PHAPBGS": "mention",
"TAPBGS": "tension",
"PHAPBGZ": "mentionne",
# "TPOPBGS/*B": "fonctionne",
# "SPWAPBGS": "intention",
# "TKEUS/TEUPBGS": "distinction",
# "TPR*EUBGS": "friction",
# "SATS/TPA*BGS": "satisfaction",
}
)
def test_lesson33_TS_sound_tre_taire_or_ture_starT_sound_ette_and_AstarAIR_ortho_aire_EBS_sound_ener(self):
self.assertSame({
"EBS/SKWREU": "énergie",
# "TPHOTS": "notaire",
"SUTS": "suture",
"KREUTS": "critère",
"TOEUL/*T": "toilette",