PhonologicalCorpusTools / CorpusTools

Phonological CorpusTools
http://phonologicalcorpustools.github.io/CorpusTools/
GNU General Public License v3.0
111 stars 16 forks source link

Pronunciation variants #751

Open stannam opened 3 years ago

stannam commented 3 years ago

An example csv file (csv_pron_var.txt) is in 'csv_sample'.

Traceback (most recent call last): File "D:\PycharmProjects\CorpusTools\corpustools\gui\migui.py", line 44, in run call_back = kwargs['call_back']) File "D:\PycharmProjects\CorpusTools\corpustools\mutualinfo\mutual_information.py", line 197, in pointwise_mi probability=True, need_wb=need_wd) File "D:\PycharmProjects\CorpusTools\corpustools\contextmanagers.py", line 98, in get_frequency_base tier = getattr(word, self.sequence_type) AttributeError: 'Word' object has no attribute 'Transcription'

YuHsiangLo commented 3 years ago

Hmmm I think this is caused by the mixing of attribute _transcription, Transcription, _transcription_name, and the transcription getter and setter... This issue is related to #756, and we'll need to do some fundamental refactoring of the Word class to solve this type of problems once and for all.

stannam commented 3 years ago

cf. we have a separate branch for this: 'pronunciation_variants'

stannam commented 3 years ago

The recent commit, the one that forces the column name (92113c5b02b884e74b6f78a131bcd50cf35553b2) gets rid of the 'Unwanted transcription column' issue (i.e., no 'canonical' column to start with). However, for an independent reason, "List pronunciation variants" is acting out again 😳. I have added an example file csv_pron_var.txt to the 'csv_sample' folder.