Use strange names for the columns
In the following example I used S for spelling, C for category and F for frequency.
Load corpus and run FL
PCT crashes
Expected behavior
Functional load should work.
Screenshots
This is the error message.
Traceback (most recent call last):
File "D:\PycharmProjects\CorpusTools\corpustools\gui\flgui.py", line 39, in run
self.results = FL.minpair_fl_speed(c, pairs, **kwargs)
File "D:\PycharmProjects\CorpusTools\corpustools\funcload\functional_load.py", line 295, in minpair_fl_speed
word = (w.Spelling, getattr(w, corpus_context.sequence_type), w.Frequency)
AttributeError: 'Word' object has no attribute 'Spelling'
Describe the bug If a corpus has non-canonical column names, functional load crashes.
Sample corpus file copy-paste the following as a txt file and load it on PCT
col1,col2,col3,col4 abc,ətʃəɹ,A,1 ac,ɪsstʃəɹ,B,10 ab,təʃə,A,100 bc,sətʃəɹ,B,10000
To Reproduce
Import the text file.
Use strange names for the columns In the following example I used S for spelling, C for category and F for frequency.![image](https://user-images.githubusercontent.com/43150234/144152603-c521e804-b1b4-452f-81b4-8f9bc8f5be05.png)
Load corpus and run FL
PCT crashes
Expected behavior Functional load should work.
Screenshots This is the error message.
Traceback (most recent call last): File "D:\PycharmProjects\CorpusTools\corpustools\gui\flgui.py", line 39, in run self.results = FL.minpair_fl_speed(c, pairs, **kwargs) File "D:\PycharmProjects\CorpusTools\corpustools\funcload\functional_load.py", line 295, in minpair_fl_speed word = (w.Spelling, getattr(w, corpus_context.sequence_type), w.Frequency) AttributeError: 'Word' object has no attribute 'Spelling'
Operating system and PCT version
Additional context