I have very little to show for what I got done today, but I think it is made up for by what I learnt as a result! I started the day by trying to figure out the problem from yesterday — as far as I could understand, I was using the same dictionary in two places, but getting different words in the two spots. I tried using different dictionaries, changing how I stored the data, and how I wrote my function, but I was no closer to understanding what the problem was. I concluded that it was probably some little thing that I wasn’t picking up because I wasn’t familiar enough with the existing codebase. When Adam sent me this file, I basically learnt enough of what was happening (and how) to be able to add in what I needed, but I didn’t entirely follow the details of what all the structures were for, and how they were being created. As such, to familiarize myself with the program, I started writing the program over in a different file, cleaning up things and optimizing for my data labelling wherever I could. This was probably a good idea anyway — the way I added onto the code is far from ideal, and I put strange functions in strange places. An overhaul is hopefully going to make it cleaner.
Unfortunately, this led to the problem that I struggled with for hours. I named the new program “copy.py” and started coding. Compiling caused a snag I hadn’t seen before; matplotlib couldn’t load, because it couldn’t import pyparsing, a module it needs to run. This confused me because I had definitely run the program mere hours ago, and so must have had pyparsing. I therefore spent ages searching for pyparsing, installing pyparsing, moving files around, etc. When none of this worked, I asked Prof Medero for help, and the problem turned out to have nothing to do with pyparsing. By naming my file “copy.py”, I had confused Python into thinking this was the copy module it needed to import into pyparsing, whicih was what caused the whole problem. After fixing this I went back to the same process, and so far I think it’s been helpful. I have a much better grasp of where all the data is coming from, how it’s being treated and where it’s being stored. Hopefully the program will be done tomorrow, with all the functionality I want!