You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ipapy by default shares the representation of the characters which leads to strange behaviours:
s = IPAString(unicode_string=r"pæk")
s[0].voicing = 'voiced'
print(s[0].voicing) # voiced
print(s[0].canonical_representation) # bilabial consonant plosive voiceless
print(str(s)) # p
s[2].descriptors = list(map(lambda d: 'voiced' if d in DG_C_VOICING else d, s[2].descriptors))
print(s[2].voicing) # voiced
print(s[2].canonical_representation) # consonant plosive velar voiced
print(str(s)) # k
s = IPAString(unicode_string=r"pæk")
print(s[0].voicing) # voiced
It can be workaround by copying and double-lookup of characters:
s = IPAString(unicode_string=r"pæk")
s[0] = UNICODE_TO_IPA[IPA_TO_UNICODE[IPAChar(descriptors=list(map(lambda d: 'voiced' if d in DG_C_VOICING else d, s[0].descriptors))).canonical_representation]]
print(str(s)) # bæk
But this is very verbose operation for changing a single letter.
The text was updated successfully, but these errors were encountered:
Ipapy by default shares the representation of the characters which leads to strange behaviours:
It can be workaround by copying and double-lookup of characters:
But this is very verbose operation for changing a single letter.
The text was updated successfully, but these errors were encountered: