panphon
panphon copied to clipboard
Error when using segement_to_vector function of the FeatureTable class with Python 3.12
I am trying to use panphon in my project in a Conda virtual environment which has Python 3.12. When I try to get the phonetic feature representation from in IPA transcription using the FeatureTable class like this:
features = [self.ft.segment_to_vector(seg) for seg in ipa_representation]
I get the following error:
return self.fts(seg, normalize).strings() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'dict' object has no attribute 'strings'
I looked in the source code of the FeatureTable, the error occurs at the following line:
return self.fts(seg, normalize).strings()
This seems odd. Since the fts function return a dict object, why is the .strings()
function being called?
Is there a workaround for this, or is it related to version incompatibility?