I've been coming across an error in Chinese transliteration whenever I use the ligatures=True feature on tokens containing more than one Chinese character:
Exception has occurred: AttributeError
'map' object has no attribute 'append'
This is due to the fact that the mapping resides within the loop over all tokens and changes the ipa_tokens list to a map object after the first token is processed, before trying to append the ipa for subsequent tokens to that map object.
You can reproduce the error by calling the transliterate function with the ligature feature flag enabled, e.g.
Unless I'm missing something (which is possible because my knowledge of Chinese is very limited), I believe this PR should do the trick to avoid getting the error.
Hi @dmort27,
I've been coming across an error in Chinese transliteration whenever I use the ligatures=True feature on tokens containing more than one Chinese character:
This is due to the fact that the mapping resides within the loop over all tokens and changes the ipa_tokens list to a map object after the first token is processed, before trying to append the ipa for subsequent tokens to that map object.
You can reproduce the error by calling the transliterate function with the ligature feature flag enabled, e.g.
Unless I'm missing something (which is possible because my knowledge of Chinese is very limited), I believe this PR should do the trick to avoid getting the error.