PhonologicalCorpusTools / CorpusTools

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

[BUG] Interlinear Corpus Won't Load; PCT Crashes #768

Closed blru2021 closed 3 years ago

blru2021 commented 3 years ago

Describe the bug I have created a tab delimited interlinear corpus but when I try to load it PCT shows an error.

Sample corpus file Sample corpus fort Github.txt

To Reproduce Steps to reproduce the behavior: Maybe the problem is with the corpus so below are the steps on how I created it on PCT

  1. Go to 'File>Load Corpora>Create corpus from file'
  2. Click on 'Choose file' and load file (transcription system already in use from existing ones)
  3. Click on 'Interlinear Corpus'
  4. I see 'Number of lines per gloss (auto-detected) = 4 (but my corpus has two lines - i.e., columns - only, spelling and transcription)
  5. Go to 'Parsing Preview' and edit Line names and properties
  6. Line 1: name 'Spelling'; Annotation type (Orthography default); I select 'Associate this with the lexical item'
  7. Line 2: name 'Transcription'; Annotation type (Transcription default) select 'Allow this property to vary within lexical items'
  8. Line 3: name 'Line 3'; Annotation type (Notes - ignored)
  9. Line 4: name 'Line 4'; Annotation type (Notes - ignored)
  10. I see the following error:

    Traceback (most recent call last): File "corpustools\gui\iogui.py", line 91, in run File "corpustools\corpus\io\text_ilg.py", line 246, in load_discourse_ilg File "corpustools\corpus\io\text_ilg.py", line 192, in ilg_to_data AttributeError: 'str' object has no attribute 'begin'

Expected behavior I would like the corpus to load so I can perform various analyses.

Screenshots

Screenshot PCT problem 2021-07-06 105634

Operating system and PCT version

Additional context Update: I created a new corpus in Notepad++ with the canonical and alternative transcriptions in two different lines. The corpus is created (and the number of lines correctly identified) but when I try to load the corpus PCT crashes.

stannam commented 3 years ago

Hi @blru2021 , thanks for pointing this out.

It seems to me that the txt file you linked is in the column-delimited format.

The file can be loaded on my machine as a column-delimited corpus, using the default settings. Could you try to load it as column-delimited?

image (... and many other words)

FYI, this is a sample interlinear (space delimited) file. I think you can refer to it if you want to have your file loaded as an interlinear corpus.

I hope this helps. Please let me know if anything is not clear!

blru2021 commented 3 years ago

Hi,

Thanks so much for your response!

I was able indeed to open the file as a column-delimited corpus but I am not sure whether I can do the same analyses as I would be able to do with an interlinear corpus. For example, when I try to measure functional load, I can only see the transcription tier with the corpus loaded as is. Also, when I open the file on my computer, I see that frequencies are only indicated as 1 for the first instance and then the rest is indicated as 0. I am not sure how to interpret this. Might it be that I should use spelling instead of default transcription? (see attachment)

In addition, when I upload a new corpus where the tiers are transcription (default) and transcription (alternative), I get the error message that the string has no stress pattern – I was not aware that if you upload alternative transcription stress has to be marked.

At any rate, I had already a file with different lines of spelling/transcription (i.e., not column-delimited) which did not work as well, – but now I think the problem is that the lines were too long. It seems that if I reduce the length of the lines it might work to upload the corpus as a interlinear text. If I have more problems I hope can reach out again.

Thanks again and all the best,

Borana

From: stannam @.> Sent: maandag 12 juli 2021 04:27 To: PhonologicalCorpusTools/CorpusTools @.> Cc: Lushaj, B. (Borana) @.>; Mention @.> Subject: Re: [PhonologicalCorpusTools/CorpusTools] [BUG] Interlinear Corpus Won't Load; PCT Crashes (#768)

Hi @blru2021 https://urldefense.com/v3/__https:/github.com/blru2021__;!!HJOPV4FYYWzcc1jazlU!tpW1_iLTedms-FrAh5qbfIAxNMIJ4f4HdOV6Wy22g_J9-CWv5tjfJMlDez_e8Pa3Eg$ , thanks for pointing this out.

It seems to me that the txt file you linked is in the column-delimited format.

The file can be loaded on my machine as a column-delimited corpus, using the default settings. Could you try to load it as column-delimited?

https://urldefense.com/v3/__https:/user-images.githubusercontent.com/43150234/125221731-8c71f500-e27d-11eb-96c2-9790d2a13a3e.png__;!!HJOPV4FYYWzcc1jazlU!tpW1_iLTedms-FrAh5qbfIAxNMIJ4f4HdOV6Wy22g_J9-CWv5tjfJMlDez-ei-WsPw$ (... and many other words)

FYI, this https://urldefense.com/v3/__https:/www.dropbox.com/s/d0znc5it9p3wu0h/pron_var_from_spelling.txt?dl=1__;!!HJOPV4FYYWzcc1jazlU!tpW1_iLTedms-FrAh5qbfIAxNMIJ4f4HdOV6Wy22g_J9-CWv5tjfJMlDez8EwSNpJw$ is a sample interlinear (space delimited) file. I think you refer to it if you want to have your file loaded as an interlinear corpus.

I hope this helps. Please let me know if anything is not clear!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https:/github.com/PhonologicalCorpusTools/CorpusTools/issues/768*issuecomment-877923229__;Iw!!HJOPV4FYYWzcc1jazlU!tpW1_iLTedms-FrAh5qbfIAxNMIJ4f4HdOV6Wy22g_J9-CWv5tjfJMlDez9I5h6OjA$ , or unsubscribe https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AUX2IWFF3KVA2R2XH5B7XMLTXJHJBANCNFSM474QIZBQ__;!!HJOPV4FYYWzcc1jazlU!tpW1_iLTedms-FrAh5qbfIAxNMIJ4f4HdOV6Wy22g_J9-CWv5tjfJMlDez97RdvvxQ$ . https://github.com/notifications/beacon/AUX2IWAFL6LZ3AOPMHIAXJLTXJHJBA5CNFSM474QIZB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGRKAXHI.gif

blru2021 commented 3 years ago

Update:

Here’s a sample of the final interlinear corpus file I am using. The entire file has 4830 lines. The corpus is successfully created on PLC with the first line titled Transcription and Annotation Type = transcription and the second line titled Alternative and Annotation Type = transcription alternative. When I try to load it, it crashes. I tried also with the attached sample, which is smaller in size, it still crashes.

Does the attached file open on your machine?

Thanks again for your help,

Borana

From: stannam @.> Sent: maandag 12 juli 2021 04:27 To: PhonologicalCorpusTools/CorpusTools @.> Cc: Lushaj, B. (Borana) @.>; Mention @.> Subject: Re: [PhonologicalCorpusTools/CorpusTools] [BUG] Interlinear Corpus Won't Load; PCT Crashes (#768)

Hi @blru2021 https://urldefense.com/v3/__https:/github.com/blru2021__;!!HJOPV4FYYWzcc1jazlU!tpW1_iLTedms-FrAh5qbfIAxNMIJ4f4HdOV6Wy22g_J9-CWv5tjfJMlDez_e8Pa3Eg$ , thanks for pointing this out.

It seems to me that the txt file you linked is in the column-delimited format.

The file can be loaded on my machine as a column-delimited corpus, using the default settings. Could you try to load it as column-delimited?

https://urldefense.com/v3/__https:/user-images.githubusercontent.com/43150234/125221731-8c71f500-e27d-11eb-96c2-9790d2a13a3e.png__;!!HJOPV4FYYWzcc1jazlU!tpW1_iLTedms-FrAh5qbfIAxNMIJ4f4HdOV6Wy22g_J9-CWv5tjfJMlDez-ei-WsPw$ (... and many other words)

FYI, this https://urldefense.com/v3/__https:/www.dropbox.com/s/d0znc5it9p3wu0h/pron_var_from_spelling.txt?dl=1__;!!HJOPV4FYYWzcc1jazlU!tpW1_iLTedms-FrAh5qbfIAxNMIJ4f4HdOV6Wy22g_J9-CWv5tjfJMlDez8EwSNpJw$ is a sample interlinear (space delimited) file. I think you refer to it if you want to have your file loaded as an interlinear corpus.

I hope this helps. Please let me know if anything is not clear!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https:/github.com/PhonologicalCorpusTools/CorpusTools/issues/768*issuecomment-877923229__;Iw!!HJOPV4FYYWzcc1jazlU!tpW1_iLTedms-FrAh5qbfIAxNMIJ4f4HdOV6Wy22g_J9-CWv5tjfJMlDez9I5h6OjA$ , or unsubscribe https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AUX2IWFF3KVA2R2XH5B7XMLTXJHJBANCNFSM474QIZBQ__;!!HJOPV4FYYWzcc1jazlU!tpW1_iLTedms-FrAh5qbfIAxNMIJ4f4HdOV6Wy22g_J9-CWv5tjfJMlDez97RdvvxQ$ . https://github.com/notifications/beacon/AUX2IWAFL6LZ3AOPMHIAXJLTXJHJBA5CNFSM474QIZB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGRKAXHI.gif

e ʃpiɾtit ʃenəjtə ai aɾtə pəɾənbi tü e pəɾhere bujtətə me tü kətü ü ənbaɾuo bagmi e taʃ zanə ənfiʟ tə vumitə e kunoɾəsə paci i tinə zot kloftə ənbi kətə stan e atyne ci ənbɾenda jesənə e zɟieðmə əndə e ʃkɾuomit ʃeɲətə tə e ʃpiɾtit ʃenəjtə ai aɾtə pəɾənbī tǖ e pəɾhere bujtətə me tǖ kətü ü ənbaɾuo bagmi e taʃ zanə ənfiʟ tə vumitə e kunoɾəsə paci i tinə zot kloftə ənbī kətə stan e atyne ci ənbɾenda jesənə e zɟieðmə əndə e ʃkɾuomit ʃeɲətə tə a mə do miɾə e i θa ati ʃtü zot e ti e di se ü tü tə duo e i θa ati kuʟot θa tə tɾetənə herə simoni i jonəsə a mə do miɾə e i θa zot ti ɲe ɟiθə kafʃətə e ti di se ü tü tə duo e i θa ati jezü kuʟot ðentə e mi tə vəɾtetə pəɾ tə a mə do miɾə e i θa atī ʃtü zot e ti e di se ü tǖ tə duo e i θa atī kuʟot θa tə tɾetənə herə simoni i jonəsə a mə do miɾə e i θa zot ti ɲe ɟiθə kafʃətə e ti di se ü tǖ tə duo e i θa atī jezü kuʟot ðentə e mī tə vəɾtetə pəɾ tə a nukə mundə besoni jü se ən kəsi guɾi na tü ənd͡zieɾmə üjə e əngɾiti mojzeü doɾənə e vet e ɾa guɾit me poɾtekət tə vet dü herə e duoʟə ʃumə üjəna e pinə tə ənbəlieðunitə e bagətia e tyne e θa zotynə mojzeut e aɾonit pəɾse jü a nukə mundə besoni jü se ən kəsi guɾi na tü ənd͡zieɾmə üjə e əngɾiti mojzeü doɾənə e vet e ɾā guɾit me poɾtekət tə vet dǖ herə e duoʟə ʃumə üjəna e pinə tə ənbəlieðunitə e bagətia e tyne e θa zotynə mojzeut e Āɾonit pəɾse jü a ənfali dyveʃsiʟi ən kəsiʃ sə düʃ θuojmə ka me e daʃunə ma foɾt e tue i ü pəɾɟeɟunə simoni i θa ü kujtoɲ se ati ci ma ənfali e jezü i θa pəɾ tə dəɾejtə θae e ü kθye pɾej gɾuojet e θa simonit a e ʃeh kəte gɾuo ü eɾðʃə əndə ʃtəpi a ənfali dyveʃsiʟi ən kəsiʃ sə düʃ θuojmə kā me e daʃunə mā foɾt e tue i ü pəɾɟeɟunə simoni i θa ü kujtoɲ se atī ci mā ənfali e jezü i θa pəɾ tə dəɾejtə θae e ü kθye pɾej gɾuojet e θa simonit a e ʃeh kəte gɾuo ü eɾðʃə əndə ʃtəpī acə tə mað lavd tə facesə ti e ü ba əndə e ʃpɾazətə e si ma foɾt ʃeɾbətuɾa e ʃpiɾtit tə jetə əndə lavd tə mað e pɾaʃtü n anʃtə ʃeɾbətuɾa e t dənuomit e maðe ʃumə ma foɾt ʃumonetə ʃeɾbətuɾa e sə dəɾejtəsə əndə lavd tə mað tə acə tə mað lavd tə facesə tī e ü bā əndə e ʃpɾazətə e si mā foɾt ʃeɾbətuɾa e ʃpiɾtit tə jetə əndə lavd tə mað e pɾaʃtü n anʃtə ʃeɾbətuɾa e t dənuomit e maðe ʃumə mā foɾt ʃumonetə ʃeɾbətuɾa e sə dəɾejtəsə əndə lavd tə mað tə adnə e t amənə e tə afəɾonetə gɾuosə ti e tə jenə dü əndə ɲə miʃ e pɾ aʃtü ma nukə janə dü poɾ ɲə miʃ e ta ciʃ zotynə bani paɾ baʃkə nieɾi mos i daə zɟieð libɾinə e ɾeɟəɲet əndato dit dəɾgoi zotynə moɾtajənə əndə izɾaelt adnə e t amənə e tə afəɾonetə gɾuosə tī e tə jenə dü əndə ɲə miʃ e pɾ aʃtü mā nukə janə dü poɾ ɲə miʃ e ta ciʃ zotynə bani pāɾ baʃkə nieɾī mos i daə zɟieð libɾinə e ɾeɟəɲet əndato dit dəɾgoi zotynə moɾtajənə əndə izɾaelt afərə e bijate e tu ɲənə pɾ anə tande tə jenə uʃcyem e atəherə tə ʃofʃ e tə jeʃ ʒdɾitunə e tə t͡ʃuditeʃ e tə pəɾtəɾihete zeməɾa jote kuɾ tə jenə kθyem əm tü ʃumit͡sa e detit e tə mujtunitə e ɟindsə tə ɲəne tek ti e ʃumit͡sa e afərə e bijate e tū ɲənə pɾ anə tande tə jenə uʃcyem e atəherə tə ʃofʃ e tə jēʃ ʒdɾitunə e tə t͡ʃuditeʃ e tə pəɾtəɾihete zeməɾa jote kuɾ tə jenə kθyem əm tǖ ʃumit͡sa e detit e tə mujtunitə e ɟindsə tə ɲəne tek ti e ʃumit͡sa e afəɾuom jezü jeɾuzalemit e tue pam cytetnə klaü pəɾənbi te tue θaʃunə ti nə kiʃɲe ɲohunə pəɾ tə vəɾtetə ən kəso dite sote ti tə ɲihɲe ato kafʃə ci pacit tit pəɾkisnə e taʃ janə ənfʃehunə ən syʃit se tuʃ pəɾse əndə tü kanə me afəɾuom jezü jeɾuzalemit e tue pām cytetnə klaü pəɾənbī te tue θaʃunə ti nə kiʃɲē ɲohunə pəɾ tə vəɾtetə ən kəso dite sote ti tə ɲihɲe ato kafʃə ci pacit tit pəɾkisnə e taʃ janə ənfʃehunə ən syʃit se tūʃ pəɾse əndə tǖ kanə me afəɾuom pəɾ tenə zonə jezü kɾiʃtnə biɾə tand neve ep tü tə lusmə zot na me əndiekunə pəɾherə əndə voʟundet tande əndə e ʃeɾbyem pəɾse əndə ditt tonə ən sə ɲehuni e ən meɾiti popuʟi ci tü ʃeɾben me klenə pəɾuom zot santifiko kəte afəɾuom pəɾ tenə zonə jezü kɾiʃtnə biɾə tand neve ep tǖ tə lusmə zot na me əndiekunə pəɾherə əndə voʟundet tande əndə e ʃeɾbyem pəɾse əndə ditt tonə ən sə ɲehuni e ən meɾiti popuʟi ci tǖ ʃeɾben me klenə pəɾuom zot santifiko kəte afəɾuom vepəɾavet miɾave əndimet sote ata tə meɾitoɲənə me klenə pəɾherə pəɾuom pəɾ tenə zonə jezü kɾisθnə ostja jote tü tə lusmə zot ajo tü me tə klenə əndə e pəlcyem e ənɟənimetə ci na pəɾ tə puɾguom bajmə ən hiɾit sit ato na afəɾuom vepəɾavet miɾave əndimet sote ata tə meɾitoɲənə me klenə pəɾherə pəɾuom pəɾ tenə zonə jezü kɾisθnə ostja jote tǖ tə lusmə zot ajo tǖ me tə klenə əndə e pəlcyem e ənɟənimetə ci na pəɾ tə puɾguom bajmə ən hiɾit sit ato na afəɾuomitə e pəɾ liɟ tand ü tü ənbajta ʃpiɾti em ü ənbajtə ənbə fjalə tande ʃpiɾti em pat ʃpənesə ənbe tenə zonə ən sə ɾuojtunit sə əndənatesə dieɾje ənbɾamanet ki ʃpənesə o izɾael əm tenə zonə pəɾse üdaj tenə zonə anʃtə afəɾuomitə e pəɾ liɟ tand ü tǖ ənbajta ʃpiɾti em ü ənbajtə ənbə fjalə tande ʃpiɾti em pat ʃpənesə ənbe tenə zonə ən sə ɾuojtunit sə əndənatēsə dieɾje ənbɾamanet kī ʃpənesə o izɾael əm tenə zonə pəɾse üdaj tenə zonə anʃtə afəɾə anʃtə atyne ci ate dɾuonə pəɾse tə maðtə e ti tə cendɾoɲə əndə ðet tanə miʃəɾieɾja e dəɾejta ü əndəɾejnə əm te ɟycitə e paci ü pəɾvunə e dəɾejta ən ðeut leü e ɟycitə ən cieʟit pat cyɾə e pəɾ tə vəɾtetə zotynə tapə hiɾə e tə afəɾə anʃtə atyne ci ate dɾuonə pəɾse tə maðtə e tī tə cendɾoɲə əndə ðēt tanə miʃəɾieɾja e dəɾejta ü əndəɾejnə əm te ɟycitə e paci ü pəɾvunə e dəɾejta ən ðeut leü e ɟycitə ən cieʟit pat cyɾə e pəɾ tə vəɾtetə zotynə tapə hiɾə e tə afəɾə e le tə lanə bakeci uðənə e ti e ɟiθəkuʃ tə kujtuomitə e kec tə zeməɾəsə ti e tə kθenetə əm tenə zonə e ai t i ketə miʃəɾieɾ pəɾse ai anʃtə foɾt i pəɾmiʃəɾieɾʃim me əndijyem poɾsi ai θotə tə kujtuometə e mi nukə janə tə afəɾə e le tə lanə bākeci uðənə e tī e ɟiθəkuʃ tə kujtuomitə e kec tə zeməɾəsə tī e tə kθenetə əm tenə zonə e ai t i ketə miʃəɾieɾ pəɾse ai anʃtə foɾt i pəɾmiʃəɾieɾʃim me əndijyem poɾsi ai θotə tə kujtuometə e mī nukə janə tə afəɾə veti venə oɾatətə e mi e pəɾ tə maðet miʃəɾieɾ tande e pəɾ tə kənduomit ci ü tü kəndoɲ kəta psalma sod ü i padeɲi tue tü lutunə ü tü tə lus muo ʃeɾbətoɾit tit ənbə kətə jetə ti tə deɲoneʃ muo me mə ðanə ʃəndet ən mendjet e afəɾə vetī venə oɾatətə e mī e pəɾ tə maðet miʃəɾieɾ tande e pəɾ tə kənduomit ci ü tǖ kəndoɲ kəta psalma sod ü i pādeɲi tue tü lutunə ü tǖ tə lus muo ʃeɾbətoɾit tit ənbə kətə jetə ti tə deɲoneʃ muo me mə ðanə ʃəndet ən mendjet e ai ci di ɟiθə kafʃətə e ənfʃehuna e ti ci di ɟiθə kafʃə paɾə se banetə ti di zot se ata ɾeʃim deʃmuonə kondɾa muo hiɲe se ü vdes tue mos klenə əndə əndoɲə kəso fajəʃ ci kəta me diekəcia tə tyne kanə ɾutuʟuom kondɾa muo e zotynə ai ci di ɟiθə kafʃətə e ənfʃehuna e ti ci di ɟiθə kafʃə paɾə se banetə ti di zot se ata ɾēʃim deʃmuonə kondɾa muo hiɲe se ü vdes tue mos klenə əndə əndoɲə kəso fajəʃ ci kəta me diekəcia tə tyne kanə ɾutuʟuom kondɾa muo e zotynə ai ci tə ʃpəɾblij izɾaelnə e pəɾənbi ɟiθə kəto sod anʃtə e tɾeta ditə se kəto kafʃə janə batə poɾ eðe pəɾ tə vəɾtetə ʒdo ən gɾaʃit sonəʃ na banə me ü t͡ʃuditunə ci əndə e zbaɾðunit tə dɾitəsə klenə ənbə voɾt e tue mos ɟetunə ai ci tə ʃpəɾblij izɾaelnə e pəɾənbī ɟiθə kəto sod anʃtə e tɾeta ditə se kəto kafʃə janə bātə poɾ eðe pəɾ tə vəɾtetə ʒdo ən gɾaʃit sonəʃ na banə me ü t͡ʃuditunə ci əndə e zbaɾðunit tə dɾitəsə klenə ənbə voɾt e tue mos ɟetunə ai ci ve me e əndukunə s mundə ənbuʃɲə doɾənə e ti as ai ci ban duoɾzətə s mujti me əmbuʃunə pɾehənitə e ti e ata ci ʃkoɲinə nukə θanə tə bekuomitə e tinə zot kloftə pəɾənbi ju na kemi bekuom juve pɾemənə tə tinə zot lavdi kloftə ai ci ve me e əndukunə s mundə ənbuʃɲə doɾənə e tī as ai ci bān duoɾzətə s mujti me əmbuʃunə pɾehənitə e tī e ata ci ʃkoɲinə nukə θanə tə bekuomitə e tinə zot kloftə pəɾənbī jū na kemi bekuom juve pɾemənə tə tinə zot lavdi kloftə ai ci ɾij e po lypən e tə tjeɾə θoʃnə jo poɾ ati glet e ai θo ü jam ai e ata i θoʃnə e poɾsi tü ənt͡ʃilnə sütə e ai pəɾɟeɟ tue θaʃunə ɲə nieɾi ci gɾəʃitetə jezü bani baltə e leü sütə e mi e mə θa et͡sə əndə bəɾakət tə siloe e ü ai ci ɾij e po lypən e tə tjeɾə θoʃnə jo poɾ atī glet e ai θo ü jam ai e ata i θoʃnə e poɾsi tü ənt͡ʃilnə sǖtə e ai pəɾɟeɟ tue θaʃunə ɲə nieɾī ci gɾəʃitetə jezü bani baltə e leü sǖtə e mī e mə θa et͡sə əndə bəɾakət tə siloe e ü ai ci ɾuon tə dəɾejtənə ənbə ʃekuʟit e ai ci ban ɟycitə atyne ci pəsoɲənə pa faj e ai ci uʃcen tə vobegunə zotynə ənd͡zieɾ ən buɾgut ate ci anʃtə ənliðunə pəɾ kanbəʃ zotynə ep syytə d veɾbənet zotynə əndəɾecən tə ʃtɾenbənitə e tə ai ci ɾuon tə dəɾejtənə ənbə ʃekuʟit e ai ci ban ɟycitə atyne ci pəsoɲənə pā faj e ai ci uʃcen tə vobegunə zotynə ənd͡zieɾ ən buɾgut ate ci anʃtə ənliðunə pəɾ kanbəʃ zotynə ep syytə d veɾbənet zotynə əndəɾecən tə ʃtɾenbənitə e tə ai flit ən atit e ü θa atyne jezü kuɾ jü tə kini əngɾitunə tə biɾə e nieɾiut aʃtü atəherə jü tə mə ɲihəni ü kuʃ jam e se ü ɟa nukə baɲ ən vetəvetəhenə poɾsi mə ənpsoi ati kəto kafʃə foli e ai ci mə deɾgoi anʃtə me muo ati nukə mə ai flit ən atit e ü θa atyne jezü kuɾ jü tə kini əngɾitunə tə biɾə e nieɾiut aʃtü atəherə jü tə mə ɲihəni ü kuʃ jam e se ü ɟā nukə baɲ ən vetəvetəhenə poɾsi mə ənpsoi ati kəto kafʃə foli e ai ci mə deɾgoi anʃtə me muo ati nukə mə

stannam commented 3 years ago

Hi Borana @blru2021 ,

Yes, PCT does crash, and that is because it cannot handle the interlinear format without an orthography line. That is actually a problem and it needs to be fixed.

In the meantime, I created a corpus from the file by adding a dummy orthography line. The dummy line is the same as the 'transcription.'

Can you download this file and test loading it? You first need to save the file in “C:\Users[USER NAME]\Documents\PCT\CorpusTools\CORPUS”, and then it will appear as one of the 'available corpora' in Load corpora (Ctrl + O on the main screen of PCT).

Please see here regarding the path for CORPUS.

blru2021 commented 3 years ago

Hi,

Sorry to bother again – I would really appreciate your help.

So I created an interlinear corpus (sample attached: three rows, spelling, transcription, variants) and it loads on PCT finally, which is great. But now when I try to do any analysis taking into account the variants, (please see screenshot for the specific settings) I get the following error:

Traceback (most recent call last):

File "corpustools\gui\flgui.py", line 42, in run

File "corpustools\funcload\functional_load.py", line 155, in deltah_fl_vectorized

AttributeError: 'Word' object has no attribute 'Transcription'

I thought it might be because on some lines the spelling row is below the transcription and variants row, so I am combing through the lines but it still does not work with the corrected sample corpus that I am attaching here.

I hope there’s something to be done.

Thanks,

Borana

From: stannam @.> Sent: dinsdag 13 juli 2021 10:47 To: PhonologicalCorpusTools/CorpusTools @.> Cc: blru2021 @.>; Mention @.> Subject: Re: [PhonologicalCorpusTools/CorpusTools] [BUG] Interlinear Corpus Won't Load; PCT Crashes (#768)

Hi Borana @blru2021 https://urldefense.com/v3/__https:/github.com/blru2021__;!!HJOPV4FYYWzcc1jazlU!p61GECTVkepIc5lMauokcJnz4zAZr0CQvENI5tVkaVH8oxXkPue8QEisLoX2DSVvRA$ ,

Yes, PCT does crash, and that is because it cannot handle the interlinear format without an orthography line. That is actually a problem and it needs to be fixed.

In the meantime, I created a corpus from the file by adding a dummy orthography line. The dummy line is the same as the 'transcription.'

Can you download this file https://urldefense.com/v3/__https:/www.dropbox.com/s/xhmyqj9afjh45sh/new_interlinear.corpus?dl=1__;!!HJOPV4FYYWzcc1jazlU!p61GECTVkepIc5lMauokcJnz4zAZr0CQvENI5tVkaVH8oxXkPue8QEisLoUlyTEdoA$ and test loading it? You first need to save the file in “C:\Users[USER NAME]\Documents\PCT\CorpusTools\CORPUS”, and then it will appear as one of the 'available corpora' in Load corpora (Ctrl + O on the main screen of PCT).

Please see here https://urldefense.com/v3/__https:/corpustools.readthedocs.io/en/master/downloading_and_installing.html*local-storage__;Iw!!HJOPV4FYYWzcc1jazlU!p61GECTVkepIc5lMauokcJnz4zAZr0CQvENI5tVkaVH8oxXkPue8QEisLoUd3spxdQ$ regarding the path for CORPUS.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https:/github.com/PhonologicalCorpusTools/CorpusTools/issues/768*issuecomment-878899236__;Iw!!HJOPV4FYYWzcc1jazlU!p61GECTVkepIc5lMauokcJnz4zAZr0CQvENI5tVkaVH8oxXkPue8QEisLoUH_dv_tQ$ , or unsubscribe https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AUX2IWHUPI5DQGIE4Q7NUZDTXP4PXANCNFSM474QIZBQ__;!!HJOPV4FYYWzcc1jazlU!p61GECTVkepIc5lMauokcJnz4zAZr0CQvENI5tVkaVH8oxXkPue8QEisLoUkOXe8NA$ . https://github.com/notifications/beacon/AUX2IWEAINFCURRA35XQJJTTXP4PXA5CNFSM474QIZB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGRRPAJA.gif

stannam commented 3 years ago

Hi Borana @blru2021 ,

Unfortunately, I cannot see the attachment nor screenshots. You might need to post them on the original issue page on Github https://github.com/PhonologicalCorpusTools/CorpusTools/issues/768 .

From the error message, though, it seems like you tried to calculate functional load by entropy change. Since I don't replicate this issue without the corpus file, I want to see if the error only happens with the function you were trying. Does this issue persist when you do other analyses, such as 'predictability of distribution' or 'mutual information'?

blru2021 commented 3 years ago

Hi,

Yes, indeed, the issue is only if I calculate functional load by entropy change, and it persists when I do ‘predictability of distribution’. However, it did work when I tried to measure functional load by minimal pairs (trouble is I know there are very few minimal pairs in my corpus so that is a bit useless).

I will upload the files on the github page.

Thank you so much for all your help!

Borana

From: stannam @.> Sent: maandag 26 juli 2021 09:06 To: PhonologicalCorpusTools/CorpusTools @.> Cc: blru2021 @.>; Mention @.> Subject: Re: [PhonologicalCorpusTools/CorpusTools] [BUG] Interlinear Corpus Won't Load; PCT Crashes (#768)

Hi Borana @blru2021 https://urldefense.com/v3/__https:/github.com/blru2021__;!!HJOPV4FYYWzcc1jazlU!tn-Nc7F5AdzXdzJJaEmCRchT0Ob35G4-tHhQDrvkKWOyEOV5f56Yo_HaiixdT18Piw$ ,

Unfortunately, I cannot see the attachment nor screenshots. You might need to post them on the original issue page on Github #768 https://urldefense.com/v3/__https:/github.com/PhonologicalCorpusTools/CorpusTools/issues/768__;!!HJOPV4FYYWzcc1jazlU!tn-Nc7F5AdzXdzJJaEmCRchT0Ob35G4-tHhQDrvkKWOyEOV5f56Yo_Haiiy6Y0etSQ$ .

From the error message, though, it seems like you tried to calculate functional load by entropy change. Since I don't replicate this issue without the corpus file, I want to see if the error only happens with the function you were trying. Does this issue persist when you do other analyses, such as 'predictability of distribution' or 'mutual information'?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https:/github.com/PhonologicalCorpusTools/CorpusTools/issues/768*issuecomment-886434882__;Iw!!HJOPV4FYYWzcc1jazlU!tn-Nc7F5AdzXdzJJaEmCRchT0Ob35G4-tHhQDrvkKWOyEOV5f56Yo_HaiiziWtJ69w$ , or unsubscribe https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AUX2IWHJPXO4ZXL6R7EMVOTTZUCNDANCNFSM474QIZBQ__;!!HJOPV4FYYWzcc1jazlU!tn-Nc7F5AdzXdzJJaEmCRchT0Ob35G4-tHhQDrvkKWOyEOV5f56Yo_HaiixxgLsncg$ . https://github.com/notifications/beacon/AUX2IWBAH3CTBT5GBWVRKRTTZUCNDA5CNFSM474QIZB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGTK6YQQ.gif

blru2021 commented 3 years ago

Files Screenshot of example PCT analysis I want to do for multiple segment pairs

screenshot pct functional load

Sample corpus test interlinear.txt

stannam commented 3 years ago

Hi @blru2021 ,

Thanks for the sample file and screenshot. I could replicate the error, and the problem comes from the option for pronunciation variants. PCT didn't crash when I selected 'Pronunciation variants' option 'use canonical forms only' and 'use most frequent forms only.'

The error is unintended, and it actually is a bug that needs to be fixed. I'm sorry but there is no solution at this moment. I think I need to sit down and look into the codes to figure out how to solve it. I'll get back to you as soon as possible. Sorry about that!

blru2021 commented 3 years ago

Hi,

Thanks very much for your help and prompt responses. At the risk of being a bit impolite, do you think the bug could be fixed by the end of august? I have a presentation then and I wanted to include the PCT analyses results as well.

Best,

Borana

From: stannam @.> Sent: dinsdag 27 juli 2021 03:30 To: PhonologicalCorpusTools/CorpusTools @.> Cc: blru2021 @.>; Mention @.> Subject: Re: [PhonologicalCorpusTools/CorpusTools] [BUG] Interlinear Corpus Won't Load; PCT Crashes (#768)

Hi @blru2021 https://urldefense.com/v3/__https:/github.com/blru2021__;!!HJOPV4FYYWzcc1jazlU!v9VFHzATaKk097YtNBUu3vmquR071dGG3ZLVWbjLoUKSlFwPWsBcvrtzakPDqqJSKA$ ,

Thanks for the sample file and screenshot. I could replicate the error, and the problem comes from the option for pronunciation variants. PCT didn't crash when I selected 'Pronunciation variants' option 'use canonical forms only' and 'use most frequent forms only.'

The error is unintended, and it actually is a bug that needs to be fixed. I'm sorry but there is no solution at this moment. I think I need to sit down and look into the codes to figure out how to solve it. I'll get back to you as soon as possible. Sorry about that!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https:/github.com/PhonologicalCorpusTools/CorpusTools/issues/768*issuecomment-887139277__;Iw!!HJOPV4FYYWzcc1jazlU!v9VFHzATaKk097YtNBUu3vmquR071dGG3ZLVWbjLoUKSlFwPWsBcvrtzakNLBf6lvg$ , or unsubscribe https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AUX2IWEUHUGI5HZ4BPPCZQDTZYDZ3ANCNFSM474QIZBQ__;!!HJOPV4FYYWzcc1jazlU!v9VFHzATaKk097YtNBUu3vmquR071dGG3ZLVWbjLoUKSlFwPWsBcvrtzakNetb6SJw$ . https://github.com/notifications/beacon/AUX2IWGVVJIP2AXARCSKJO3TZYDZ3A5CNFSM474QIZB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGTQKXTI.gif

stannam commented 3 years ago

Hi Borana @blru2021

Sorry I have kept you waiting. I have just fixed the issue. If you can run PCT from the codes please update to the latest version. (I've also created a temporary Windows executable here if you prefer this way.)

Please let me know if PCT still crashes after this update.

//

It is very difficult to know whether a result from PCT is correct or not, when there are many words in the corpus. So I have created a tiny corpus for sanity check. I hand calculated functional load on this corpus and compared my result to that from PCT. In short, PCT correctly calculates the functional load with different pronunciation variant options.

Here is the tiny corpus file on which I checked PCT works as intended. It can be copied to the CORPUS folder on your machine.

The 'tiny_sample' corpus has only two word types: 'taka' and 'gaka'.

There are 5 tokens for 'taka': 3 'taka', 2 'taga' image

There are 2 tokens for 'gaka': 1 'gaka', 1 'gaga' image

Let's say we want to calculate functional load of [t, g] by entropy change.

image

Since we know that we are going to set the variant option to 'weight each word type...' I hand calculated the 'temporary' corpus that is to be used in the functional load algorithm. (The column 'Weighted variants' in the above picture) 3 'taka' tokens out of 5 variants of the 'taka' type..... 3/5 = 0.6 2 'taga' tokens out of 5 variants of the 'taka' type..... 2/5 = 0.4 and so on.

On the right hand side, an imaginary corpus where t and g are merged. (marked as X)

If the pronunciation variant option is set to canonical, and calculating by the token frequency... image

We can hand calculate the functional load as 0.863120569 - 0 = 0.863120569 .

And this is what PCT returns as well. image

If the pronunciation variant option is set to 'weight each word type...' and calculating by the token frequency... image

The hand calculation will be 0.9927 image

to which PCT agrees.. image

blru2021 commented 3 years ago

Hi,

It is indeed fixed and PCT does not crash when I perform analyses.

Thank you!

Borana

From: stannam @.> Sent: dinsdag 3 augustus 2021 04:10 To: PhonologicalCorpusTools/CorpusTools @.> Cc: blru2021 @.>; Mention @.> Subject: Re: [PhonologicalCorpusTools/CorpusTools] [BUG] Interlinear Corpus Won't Load; PCT Crashes (#768)

Hi Borana @blru2021 https://urldefense.com/v3/__https:/github.com/blru2021__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xFirsv4Yg$

Sorry I have kept you waiting. I have just fixed the issue. If you can run PCT from the codes please update to the latest version. (I've also created a temporary Windows executable here https://urldefense.com/v3/__https:/www.dropbox.com/s/ndktw5fqcudyo41/PCT.exe?dl=1__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xGYrfpN3w$ if you prefer this way.)

Please let me know if PCT still crashes with this update.

//

I have created a tiny corpus for sanity check. If you want to follow the explanation below, please add this corpus file https://urldefense.com/v3/__https:/www.dropbox.com/s/rnqytm7yib679l1/tiny_sample.corpus?dl=1__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xHGPfxnzQ$ to the local storage.

The 'tiny_sample' corpus has only two word types: 'taka' and 'gaka'.

There are 5 tokens for 'taka': 3 'taka', 2 'taga' https://urldefense.com/v3/__https:/user-images.githubusercontent.com/43150234/127945129-3fbf8a5d-d78e-4dff-a2a7-da239c669f2f.png__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xE_zUFs6g$

There are 2 tokens for 'gaka': 1 'gaka', 1 'gaga' https://urldefense.com/v3/__https:/user-images.githubusercontent.com/43150234/127945142-7c036f32-fe96-4bfe-b5fd-5dd621cc3d00.png__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xFXkS7kag$

Let's say we want to calculate functional load of [t, g] by entropy change.

https://urldefense.com/v3/__https:/user-images.githubusercontent.com/43150234/127945446-e7740ac5-ba23-43ea-bff6-8329eb97db60.png__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xFeKTvrOA$

Since we know that we are going to set the variant option to 'weight each word type...' I hand calculated the 'temporary' corpus that is used in the functional load algorithm. (The column Weighted variants in the above picture) 3 'taka' tokens out of 5 variants of the 'taka' type..... 3/5 = 0.6 2 'taga' tokens out of 5 variants of the 'taka' type..... 2/5 = 0.4 and so on.

On the right hand side, an imaginary corpus where t and g are merged. (marked as X)

If the pronunciation variant option is set to canonical, and calculating by the token frequency... https://urldefense.com/v3/__https:/user-images.githubusercontent.com/43150234/127945854-a42aaeac-89f7-4d38-a90e-584de803bbf9.png__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xFB25Snmg$

We can hand calculate the functional load as 0.863120569.

And this is what PCT calculates as well. https://urldefense.com/v3/__https:/user-images.githubusercontent.com/43150234/127945951-00e5b1bb-7021-4a08-bded-dd2ff90ba827.png__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xGjEXDKlA$

If the pronunciation variant option is set to 'weight each word type...' and calculating by the token frequency... https://urldefense.com/v3/__https:/user-images.githubusercontent.com/43150234/127946022-c3c620b8-1012-48e9-a2b8-7be58d812e77.png__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xEkLXcoVA$

The hand calculation will be 0.9927 https://urldefense.com/v3/__https:/user-images.githubusercontent.com/43150234/127946057-9b63a2bb-af9f-4df3-8ca6-547b33b58381.png__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xEBTwdoNQ$

to which PCT agrees.. https://urldefense.com/v3/__https:/user-images.githubusercontent.com/43150234/127946160-302b46d7-58d7-424d-b875-9eb93ffdf6fd.png__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xFeJUY3Hw$

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https:/github.com/PhonologicalCorpusTools/CorpusTools/issues/768*issuecomment-891455839__;Iw!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xFrCFbx5Q$ , or unsubscribe https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AUX2IWDLFLWFA5NBI3BE2DTT25FXNANCNFSM474QIZBQ__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xGizqAxrw$ . Triage notifications on the go with GitHub Mobile for iOS https://urldefense.com/v3/__https:/apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xEUtfHIGQ$ or Android https://urldefense.com/v3/__https:/play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email__;!!HJOPV4FYYWzcc1jazlU!og-rLVCjrqqbPC7hpMuPNemTBxzOxK26TgJoyDnGnBahC9mbCIuX1G3U4xFhFt6V9Q$ . https://github.com/notifications/beacon/AUX2IWA4OTSXYZ6EVVQJ2YTT25FXNA5CNFSM474QIZB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGURISXY.gif