PhonologicalCorpusTools / CorpusTools

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

[BUG] Informativity GUI does not correctly select digraphs #807

Closed zl-zhou closed 1 year ago

zl-zhou commented 1 year ago

Describe the bug When using the windows that comes up with "Select one or more segments" on the informativity window, selection of any segment represented by more than one letter causes only the first letter to be entered into the list of segments

Sample corpus file Behavior can be seen in iphon_with_homographs

To Reproduce Steps to reproduce the behavior:

  1. Go to "Analysis"
  2. Click on "Calculate informativity..."
  3. Click on "Select one or more segments from the inventory"
  4. Select "NG, SH, AE"
  5. Click "Add"
  6. Only "A", "N", and "S" are added to the list

Operating system and PCT version

Additional context To make this work, I've been adding all segments to the inventory and then individually removing segments.

stannam commented 1 year ago

Hi @zl-zhou. Thanks for letting us know about this issue.

It seems like there is an error in the existing function for adding a segment. For some reason, it mistakenly forces all sounds to be in a single symbol. This error was in the GUI for the Informativity analysis, meaning that other functions, including the informativity analysis itself, are not affected.

The problem is that ARPABET, the transcription system that IPHOD uses, has NG, SH, AE for ŋ ʃ æ. So, for example, NG, SH, AE are forced to be N, S, A. And N, S, A, not the original segments, are delivered to the analysis function!

Therefore, I have simply removed the code snippet that forces it. I confirmed that Informativity works correctly now in the latest codes.

So.. I temporarily created the link below for downloading an executable. This version should be free of this issue :) https://www.dropbox.com/s/8jq83tl0fft3xt4/Phonological%20CorpusTools_dev.exe?dl=1

zl-zhou commented 1 year ago

That's great! Thanks for your work; I very much appreciate your making the link for me :)