dmort27 / panphon

Python package and data files for manipulating phonological segments (phones, phonemes) in terms of universal phonological features.
MIT License
213 stars 46 forks source link

Fixing encoding errors on windows #56

Open quadrismegistus opened 1 month ago

quadrismegistus commented 1 month ago

PR to address https://github.com/dmort27/panphon/issues/55.

This mainly adds the encoding='utf-8' where appropriate so files open safely on Windows.

I also ran into a recursion error on test_featuretable.py. The issue appears to be a recursion problem in the SegmentSorter class. The segments property is calling sort_segments(), which in turn is accessing segments, creating an infinite loop. There, the changes made in featuretable.py are:

All tests pass locally for me, on Mac and Windows.