def test_is_the_ui_sound(self): """ TestPhoneticSegment.test_is_the_ui_sound """ phoseg = PhoneticSegment() phoseg.init_by_name("close back rounded to close front unrounded diphthong") self.assertTrue(phoseg.is_the_ui_sound())
def test_is_a_monophthong_sound(self): """ TestPhoneticSegment.test_is_a_monophthong_sound """ # a phoseg = PhoneticSegment() phoseg.init_by_name("low front unrounded vowel") self.assertTrue(phoseg.is_a_monophthong_sound(height=6, backness=0, lips_unrounded=True)) # a phoseg = PhoneticSegment() phoseg.init_by_name("low front unrounded vowel") self.assertFalse(phoseg.is_a_monophthong_sound(height=6, backness=0, lips_unrounded=False)) # aː phoseg = PhoneticSegment() phoseg.init_by_name("extralong low front unrounded vowel") self.assertFalse(phoseg.is_a_monophthong_sound(height=6, backness=0, lips_unrounded=False)) # ˈa phoseg = PhoneticSegment() phoseg.init_by_name("primary_stress low front unrounded vowel") self.assertTrue(phoseg.is_a_monophthong_sound(height=6, backness=0, lips_unrounded=True)) # ˈa˧˥ phoseg = PhoneticSegment() phoseg.init_by_name("primary_stress low front unrounded vowel 35") self.assertTrue(phoseg.is_a_monophthong_sound(height=6, backness=0, lips_unrounded=True))
from phoseg.phonetic.phoneticsegment import PhoneticSegment from phoseg import PhoSegObject p = PhoneticSegment().init_by_name("labialized voiceless velar plosive") print(str(p)) p = PhoSegObject(ipa="kʷ") print(p.get_ipa_representation()) p = PhoSegObject(ipa="ʷr") print(p.get_ipa_representation()) p = PhoSegObject(ipa="lˠ") print(p.get_ipa_representation()) p = PhoSegObject(ipa="l") print(p.get_ipa_representation()) p = PhoSegObject(ipa="ˠl") print(p.get_ipa_representation()) p = PhoSegObject(ipa="ɫ") print(p.get_ipa_representation()) p = PhoSegObject(ipa="ŋ") print(p.get_ipa_representation())
def test_is_a_diphthong_sound(self): """ TestPhoneticSegment.test_is_a_diphthong_sound """ # ai̯ phoseg = PhoneticSegment() phoseg.init_by_name("low front unrounded to close front unrounded diphthong") self.assertTrue( phoseg.is_a_diphthong_sound( height0=6, backness0=0, lips_unrounded0=True, height1=0, backness1=0, lips_unrounded1=True ) ) # aːi̯ phoseg = PhoneticSegment() phoseg.init_by_name("extralong low front unrounded to close front unrounded diphthong") self.assertTrue( phoseg.is_a_diphthong_sound( height0=6, backness0=0, lips_unrounded0=True, height1=0, backness1=0, lips_unrounded1=True ) ) # ˈai̯ phoseg = PhoneticSegment() phoseg.init_by_name("primary_stress low front unrounded to close front unrounded diphthong") self.assertTrue( phoseg.is_a_diphthong_sound( height0=6, backness0=0, lips_unrounded0=True, height1=0, backness1=0, lips_unrounded1=True ) ) # ˈai̯˧˥ phoseg = PhoneticSegment() phoseg.init_by_name("primary_stress low front unrounded " "to close front unrounded diphthong 35") self.assertTrue( phoseg.is_a_diphthong_sound( height0=6, backness0=0, lips_unrounded0=True, height1=0, backness1=0, lips_unrounded1=True ) )
"yː" : "extralong close front rounded vowel", "ɔ" : "open mid back rounded vowel", "ɔː" : "extralong open mid back rounded vowel", "ai̯" : "low front unrounded to close front unrounded diphthong", "au̯" : "low front unrounded to close back rounded diphthong", "eu̯" : "close mid front unrounded to close back rounded diphthong", "ɛu̯" : "open mid front unrounded to close back rounded diphthong", "ɛːu̯" : "extralong open mid front unrounded to close back rounded diphthong", "oi̯" : "close mid back rounded to close front unrounded diphthong", "ei̯" : "close mid front unrounded to close front unrounded diphthong", "ui̯" : "close back rounded to close front unrounded diphthong", "ou̯" : "close mid back rounded to close back rounded diphthong", } a_sound = PhoneticSegment() a_sound.init_by_name( IPA2NAME["a"] ) e_sound = PhoneticSegment() e_sound.init_by_name( IPA2NAME["e"] ) o_sound = PhoneticSegment() o_sound.init_by_name( IPA2NAME["o"] ) u_sound = PhoneticSegment() u_sound.init_by_name( IPA2NAME["u"] ) j_sound = PhoneticSegment() j_sound.init_by_name( IPA2NAME["j"] )