Exemplo n.º 1
0
def test_stdhungarian():
    language = vh_dataset[30]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Standard Hungarian palatal harmony of alternating suffixes'

    input_list = ['',
                    f"b u + n - {Long_B_H_R_T} d i - y - {B_M_R_NT}",
                    f"n i n u - y {F_M_U_NT} - o",
                    f"n i - u y - {Long_C_L_U_NT}",
                    f"n y - u y - {Long_B_M_R_T}",
                    f"u i d e - u y",
                    f"u d e - u y",
                    f"y i i n {F_M_U_NT} e - u y",
                    
                    
                 ]
    output_list = ['',
                    f"b u + n - {Long_F_H_R_T} d i - y - {F_M_U_NT}",
                    f"n i n u - u {B_M_R_NT} - o",
                    f"n i - y y - {Long_F_M_U_T}",
                    f"n y - y y - {Long_F_M_R_T}",
                    f"u i d e - y y",
                    f"u d e - u u",
                    f"y i i n {F_M_U_NT} e - y y",
                    
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 2
0
def test_lena():
    language = vh_dataset[25]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Asturian Lena (Romance) height harmony with inflectional suffixes'

    input_list = ['',
                    f"d a ' b e ' - g i",
                    f"d a ' b e ' - g u",
                    f"d a ' b e ' - g u '",
                    f"d a ' b e - g u b",
                    f"b o ' - d a d h - g u",
                    f"d a ' b ' e - g u",
                    
                 ]
    output_list = ['',
                    "d a ' b e ' - g i",
                    "d a ' b i ' - g u",
                    "d a ' b i ' - g u '",
                    "d e ' b e - g u b",
                    "b u ' - d a d h - g u",
                    "d e ' b ' e - g u",
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 3
0
def test_pasiego():
    language = vh_dataset[26]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Pasiego vowel harmony (metaphony, raising, and centralization)'

    input_list = ['',
                    f"e j + o d e ' - u",
                    f"e + j o d u e + '",
                    f"e j o ' - d u - e '",
                    f"e d o ' d u e '",
                    
                    
                 ]
    output_list = ['',
                    f"e j + {Cent_B_H_R_T} d {Cent_F_H_U_T} ' - {Cent_B_H_R_T}",
                    f"e + j u d u e + '",
                    f"i j u ' - d u - e '",
                    f"i d u ' d u e '",
                    
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 4
0
def test_claro():
    language = vh_dataset[35]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Claro complete harmony on unstressed final /a/'

    input_list = ['',
                    f"l ' i m b l a",
                    f"l ' i m i l a",
                    f"l ' i m ' a",
                    f"g ' i m a",
                    f"d ' e r o",
                    
                    
                 ]
    output_list = ['',
                    f"l ' i m b l i",
                    f"l ' i m i l a",
                    f"l ' i m ' a",
                    f"g ' i m i",
                    f"d ' e r o",
                   
                    ]
    run_test_on_strings(input_list, output_list, object)    
Exemplo n.º 5
0
def test_diolafogny():
    language = vh_dataset[23]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Diola-Fogny ("Jola-Fonyi") ATR harmony'

    input_list = ['',
                    f'I b {F_M_U_NT} d a g {B_M_R_NT} d {B_H_R_NT}',
                    f'i b e d {schwa} g o d u',
                    f'I b e d a g {B_M_R_NT} d {B_H_R_NT}',
                    f'I b {F_M_U_NT} d a g {B_M_R_NT} d u',
                    f'I b + {F_M_U_NT} d a g {B_M_R_NT} - d u',
                 ]
    output_list = ['',
                    'Ib'+F_M_U_NT+'dag'+B_M_R_NT+'d'+B_H_R_NT,
                    'ibed'+schwa+'godu',
                    'ibed'+schwa+'godu',
                    'ibed'+schwa+'godu',
                    'ib+ed'+schwa+'go-du',
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 6
0
def test_maasai():
    language = vh_dataset[28]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Maasai (Eastern Nilotic) ATR harmony'

    input_list = ['',
                    f"i I + u I o - b {B_L_U_NT} - g {F_M_U_NT} {B_M_R_NT} e",
                    f"i I + u I {B_L_U_NT} - b o - g {F_M_U_NT}",
                    f"u I {B_L_U_NT} - b I - b o - g {F_M_U_NT}",
                    
                    
                    
                 ]
    output_list = ['',
                    f"i i + u i o - b o - g e o e",
                    f"i i + u I {B_L_U_NT} - b o - g {F_M_U_NT}",
                    f"u I {B_L_U_NT} - b i - b o - g {F_M_U_NT}",
                    
                    
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 7
0
def test_pulaar():
    language = vh_dataset[27]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Pulaar dialect of Fula (Niger-Congo) ATR harmony'

    input_list = ['',
                    f"{B_M_R_NT} {F_M_U_NT} i d + {F_M_U_NT} o d e - {B_M_R_NT}",
                    f"{B_M_R_NT} {F_M_U_NT} + a + i d {F_M_U_NT} o - d e {B_M_R_NT}",
                    f"{B_M_R_NT} a {B_M_R_NT} d e",
                    
                    
                    
                 ]
    output_list = ['',
                    f"o e i d + {F_M_U_NT} {B_M_R_NT} d {F_M_U_NT} - {B_M_R_NT}",
                    f"{B_M_R_NT} {F_M_U_NT} + a + i d {F_M_U_NT} {B_M_R_NT} - d {F_M_U_NT} {B_M_R_NT}",
                    f"{B_M_R_NT} a o d e",
                    
                    
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 8
0
def test_nawuri():
    language = vh_dataset[31]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Nawuri (North Guang) ATR harmony'

    input_list = ['',
                    f"I {B_L_U_NT} i + I i b {F_M_U_NT} - l {F_M_U_NT} - d {B_M_R_NT} {B_L_U_NT} {B_M_R_NT} - o b",
                    f"i I + u {B_H_R_NT} v {B_L_U_NT} {B_H_R_NT} u - l {B_H_R_NT} u - d {B_L_U_NT} - l {B_H_R_NT} u",
                    f"{B_H_R_NT} I + u {B_L_U_NT} - {B_H_R_NT} u - i l I",
                    
                    
                    
                 ]
    output_list = ['',
                    f"i {B_L_U_NT} i + i i b e - l e - d o {B_L_U_NT} {B_M_R_NT} - o b",
                    f"i i + u u v {B_L_U_NT} u u - l u u - d {B_L_U_NT} - l {B_H_R_NT} u",
                    f"u I + u {B_L_U_NT} - {B_H_R_NT} u - i l I",
                    
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 9
0
def test_kashaya():
    language = vh_dataset[29]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Kashaya (Pomoan) translaryngeal harmony'

    input_list = ['',
                    f"m - i d i {G_P_VL} {Long_C_L_U_NT} q o",
                    f"m a + h e {G_P_VL} {Long_F_H_U_T} {G_P_VL} u h o e",
                    f"q u q {Long_F_H_U_T} q e q o q a d i h {Long_B_M_R_T}",
                    
                    
                    
                 ]
    output_list = ['',
                    f"m - a d u {G_P_VL} {Long_B_H_R_T} q a",
                    f"m a + h a {G_P_VL} {Long_C_L_U_NT} {G_P_VL} a h a a",
                    f"q a q {Long_C_L_U_NT} q a q a q a d u h u",
                    
                    
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 10
0
def test_kinendeule():
    language = vh_dataset[32]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Kinendeule (Rufiji) height harmony for verbal extensions'

    input_list = ['',
                    f"o r + a j i - i e {F_M_U_NT} u o - d {B_M_R_NT} a",  
                    f"o r a g e - i e {F_M_U_NT} u o {B_M_R_NT} a",
                    f"o d a b {F_M_U_NT} - i e {F_M_U_NT} u o {B_M_R_NT} a",
                    f"o + k a g u - i e {F_M_U_NT} u o {B_M_R_NT} a",
                    f"o j a o - i e {F_M_U_NT} u o {B_M_R_NT} a",
                    f"i d {B_M_R_NT} - i e {F_M_U_NT} u o {B_M_R_NT} a",
                    f"a - i e {F_M_U_NT} u o {B_M_R_NT} a",
                    
                    
                 ]
    output_list = ['',
                    f"o r + a j i - i i i u u - d u a",
                    f"o r a g e - e e e u u u a",
                    f"o d a b {F_M_U_NT} - {F_M_U_NT} {F_M_U_NT} {F_M_U_NT} u u u a",
                    f"o + k a g u - i i i u u u a",
                    f"o j a o - e e e o o o a",
                    f"i d {B_M_R_NT} - {F_M_U_NT} {F_M_U_NT} {F_M_U_NT} {B_M_R_NT} {B_M_R_NT} {B_M_R_NT} a",
                    f"a - i i i u u u a",
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 11
0
def test_chingoni():
    language = vh_dataset[33]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Chingoni (Rufiji) height harmony for verbal extensions'

    input_list = ['',
                    f"a y + u d i - i u {F_M_U_NT} {B_M_R_NT} - a",
                    f"g o b {F_M_U_NT} - i u {F_M_U_NT} - {B_M_R_NT} a",
                    f"g u b u - i u - {F_M_U_NT} {B_M_R_NT} a",
                    f"{B_M_R_NT} d - i - u {F_M_U_NT} {B_M_R_NT} a",
                    f"b a b - i u {F_M_U_NT} {B_M_R_NT} a",
                    
                    
                 ]
    output_list = ['',
                    f"a y + u d i - i u i u - a",
                    f"g o b {F_M_U_NT} - {F_M_U_NT} u {F_M_U_NT} - u a",
                    f"g u b u - i u - i u a",
                    f"{B_M_R_NT} d - {F_M_U_NT} - {B_M_R_NT} {F_M_U_NT} {B_M_R_NT} a",
                    f"b a b - i u i u a",
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 12
0
def test_jingulu_non_neuter():
    language = vh_dataset[9]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == "Jingulu nominal root with non-neuter gender suffix"

    input_list = ["",
                    "w a r k u -rny",
                    "a n k i l a -r n y",
                    "a n k i l a -r a",
                    "b a - a l i ",
                    "b u a - d i u",
                    "b a u a - i",
                    "b a d a - u i",
                    ]
    output_list = ["",
                    "warku-rny",
                    "ankila-rny",
                    "ankila-ra",
                    "bi-ali",
                    "bui-diu",
                    "baui-i",
                    "bidi-ui"
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 13
0
def test_kisa_applicative():
    kisa_app = vh_dataset[1]
    object = FST(kisa_app)
    assert object.states == kisa_app['states']
    assert object.alphabet == kisa_app['alphabet']
    assert object.transitions == kisa_app['transitions']
    assert object.name == "Kisa applicative suffix Vlɑ"

    input_list = ["t s o m i l a", "r e k e l a", "b i s i l a", "", "b o b i s i l a"]
    output_list = ["tsomelɑ", "rekelɑ", "bisilɑ", "", "bobisilɑ"]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 14
0
def test_uyghur_back():
    language = vh_dataset[5]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == "Uyghur backness harmony"

    input_list = ["", "y d i", "u y d i", "u d i y"]
    output_list = ["", "ydy", "uudu", "udii"]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 15
0
def test_kisa_reversative():
    kisa_rev = vh_dataset[2]
    object = FST(kisa_rev)
    assert object.states == kisa_rev['states']
    assert object.alphabet == kisa_rev['alphabet']
    assert object.transitions == kisa_rev['transitions']
    assert object.preprocess_req == kisa_rev['preprocess_req']
    assert object.postprocess_req == kisa_rev['postprocess_req']
    assert object.left_subseq == kisa_rev['left_subseq']
    assert object.name == "Kisa reversative suffix Vlɑ"

    input_list = ["", "t s o m u l o", "o f u n g u l a", "r e k u l a"]
    output_list = ["", "tsomolɑ", "ofungulɑ", "rekulɑ"]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 16
0
def test_sibe_vowel_rounding():
    sibe = vh_dataset[3]
    object = FST(sibe)
    assert object.states == sibe['states']
    assert object.alphabet == sibe['alphabet']
    assert object.transitions == sibe['transitions']
    assert object.preprocess_req == sibe['preprocess_req']
    assert object.postprocess_req == sibe['postprocess_req']
    assert object.left_subseq == sibe['left_subseq']
    assert object.name == "Sibe vowel rounding harmony"

    input_list = ["", C_H_U_T+" l d u k i n", "m u x u l i"]
    output_list = ["", "ɨldɨkin", "muxuly"]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 17
0
def test_uyghur_plural():
    language = vh_dataset[6]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == "Uyghur plural suffix -lVr"

    input_list = ["", "e d y g g g"]
    output_list = ["", "edil"+B_L_U_NT+"r"]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 18
0
def test_hahl():
    language = vh_dataset[8]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == "Halh (Mongolic) rounding harmony"

    input_list = ["", "o g b a", "o g u b a", "a t u t i"]
    output_list = ["", "ogbo", "ogube", "at"+B_H_R_NT+"ti"]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 19
0
def test_tuvan():
    language = vh_dataset[4]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == "Tuvan backness harmony"

    input_list = ["", "i v u e", "a d e g l", "i r u d o a"]
    output_list = ["", "ivye", "adagl", "iryd"+F_M_R_T+"e"]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 20
0
def test_uyghur_dative():
    language = vh_dataset[7]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Uyghur dative suffix -'+U_F_V+'V'

    input_list = ["", "y t a v v", "y t o v v", "u d i v v", "i g o t i l u r"]
    output_list = ["", "ytaga", "yt"+F_M_R_T+"ga", "udi"+U_F_V+B_L_U_NT,
        "igotil"+U_F_V+B_L_U_NT]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 21
0
def test_yawelmani():
    language = vh_dataset[34]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Yawelmani palatal and labial suffixal harmony'

    input_list = ['',
                    f"u b d f",
                    f"{Long_C_L_U_NT} g -",
                    f"{Long_C_L_U_NT} g - d",
                    f"a b + d",
                    f"{Long_B_H_R_T} {Long_F_H_U_T}",
                    f"b d f g h",
                    f"a + b i d - u i - {Long_B_H_R_T} o - u",
                    f"{Long_B_H_R_T} - u d i a i",
                    f"e - a b e o - i g a",
                    f"{Long_B_M_R_T} - a e o b d f - e",
                    f"a - g e o - i o",
                    f"p a + g e",
                    
                    
                 ]
    output_list = ['',
                    f"u b i d f",
                    f"{Long_C_L_U_NT} g",
                    f"a g d",
                    f"a b d",
                    f"o e",
                    f"b i d i f i g h",
                    f"a b i d i i {Long_F_H_U_T} o u",
                    f"{Long_B_M_R_T} u d u a i",
                    f"e e b e e i g a",
                    f"{Long_B_M_R_T} o o o b i d f e",
                    f"a g a a i o",
                    f"p a g e",
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 22
0
def test_turkish():
    language = vh_dataset[14]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Turkish palatal and rounding vowel harmony'

    input_list = ['',
                    't i m e y - i o',
                    f'o d {B_H_U_T} e n + b {B_L_U_NT}',
                 ]
    output_list = ['',
                    'timei-iø',
                    'oduɑn+bɑ',
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 23
0
def test_finnish():
    language = vh_dataset[15]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Finnish palatal (front/back) vowel harmony'

    input_list = ['',
                    f'd u d i n u o ɑ b y ø æ',
                    f'd i + n y i ɑ m - o g ɑ',
                 ]
    output_list = ['',
                    'dudinuoɑbuoɑ',
                    'di+nyiæm-øgæ',
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 24
0
def test_mongolian():
    language = vh_dataset[16]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Classical Mongolian palatal vowel harmony'

    input_list = ['',
                    f't i + d e ø y d u o a',
                    f't u b o a k y ø e - d a',
                 ]
    output_list = ['',
                    'ti+deøydyøe',
                    'tuboakuoa-da'
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 25
0
def test_dagur():
    language = vh_dataset[19]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Dagur Mongolian harmony'

    input_list = ['',
                    f'b i ɔ d a - ə u ɔ',
                    f'b u d ə a ɔ'
                 ]
    output_list = ['',
                    'biɔdɔ-ɔɔɔ',
                    'budəəu'
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 26
0
def test_tunica():
    language = vh_dataset[20]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Tunica harmony'

    input_list = ['',
                    f'b i ʔ o ɑ d u h ɛ',
                    f'b o h i ʔ e h ɛ d ɔ - i h ɛ',
                    'b o h i h',
                 ]
    output_list = ['',
                    'biʔɛduhɔ',
                    'bohuʔohɔduhɔ',
                    'bohuh',
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 27
0
def test_yoruba():
    language = vh_dataset[21]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Yoruba ATR harmony'

    input_list = ['',
                    f'p ɛ a l i o + b o d i ɛ',
                    f'p ɛ a l i o + b o d ɛ',
                    f'p e o + a d ɔ ɛ - e',
                 ]
    output_list = ['',
                    'pealio+bodiɛ',
                    'pɛaliɔ+bɔdɛ',
                    'pɛɔ+adoe-e',
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 28
0
def test_igbo():
    language = vh_dataset[22]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Igbo ATR harmony'

    input_list = ['',
                    f'p I i {B_H_R_NT} u e a {B_M_R_NT} o + e - {B_M_R_NT} o e a {B_H_R_NT} u I i',
                    f'p I + i {B_H_R_NT} u e a {B_M_R_NT} o + e v a - {B_M_R_NT} e u I i + o {B_H_R_NT}',
                    f'p i - I + a v e - + i v I p',
                 ]
    output_list = ['',
                    'piiuueeoo+e-ooeeuuii',
                    'pi+iuueeoo+eva-'+B_M_R_NT+'a'+B_H_R_NT+'II'+B_M_R_NT+B_H_R_NT',
                    'pII+ave-ivip',
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 29
0
def test_kalenjin():
    language = vh_dataset[24]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Kalenjin ATR harmony'

    input_list = ['',
                    f'g I + b {F_M_U_NT} + m e d i b {Long_C_L_U_T} - k a - d i - b I - {Long_F_M_U_T} - g u',
                    f'g I + b {F_M_U_NT} + u n - k a - d I - k a j - {F_M_U_NT}',
                    f'g I + m a + m {F_M_U_NT} + u g + - k e',
                    
                 ]
    output_list = ['',
                    'gI+b'+F_M_U_NT+'+m'+F_M_U_NT+'+dIb'+Long_C_L_U_NT+'-ka-dI-bI-'+Long_F_M_U_NT+'-g'+B_H_R_NT,
                    'gi+be+un-k'+C_L_U_T+'-di-kaj-'+F_M_U_NT,
                    'gI+ma+me+ug+-ke',
                    
                    ]
    run_test_on_strings(input_list, output_list, object)
Exemplo n.º 30
0
def test_khalka():
    language = vh_dataset[18]
    object = FST(language)
    assert object.states == language['states']
    assert object.alphabet == language['alphabet']
    assert object.transitions == language['transitions']
    assert object.preprocess_req == language['preprocess_req']
    assert object.postprocess_req == language['postprocess_req']
    assert object.left_subseq == language['left_subseq']
    assert object.name == 'Khalkha Mongolian harmony'

    input_list = ['',
                    # f't i + d e ø y d u o a',
                    # f't u b o a k y ø e - d a',
                    f'g i + ɔ b - i d ɔ a e d o ʊ e',
                    'g u b i d ʊ u b e g o a ɔ',
                 ]
    output_list = ['',
                    # 'ti+deøydyøe',
                    # 'tuboakuoa-da'
                    f'gi+ɔb-idɔɔɔdɔʊa',
                    'gubiduubegeee',
                    ]
    run_test_on_strings(input_list, output_list, object)