Python GUI 028 – Wordlist Updater, cons_parser_update_wordlists.py

And, here’s the new file for updating the wordlists, treated as a utility module. This file contains the following functions: get_languages(records)get_words_for_language(lang, records, current_list)get_wordlist(fn)save_wordlist(fn, wordlist)get_ngrams(wl, ngram_cnt_max, ngram_no_max, language, substitute)get_character_lists(language)sort_first(val)sort_second(val)sort_third(val) #################################### cons_parser_update_wordlists.py #################################### “””importsBring in the CON record structure and field enums.Bring in the standard file handing from Path.””” from cons_gui_utils import ClassConRecords, ConTitleFieldsfrom pathlib import PathContinue reading “Python GUI 028 – Wordlist Updater, cons_parser_update_wordlists.py”

Python GUI 027 – Wordlist Updater, button_utils.py changes

As shown in part 26, there are two new entry boxes from button_utils.py: WordListBox and YesNoNGrams. (Word selector box) “””The idea here is that we start out with a long list of words from the CON solutions, then weed out the ones already in the existing wordlist file. The remaining words will be composed ofContinue reading “Python GUI 027 – Wordlist Updater, button_utils.py changes”

Python GUI 025 – N-grams, Part 1

Ok, what are n-grams, and why do we care?A bigram (or digram) is a pair of letters that appear together. A quick glance at the previous sentence shows that “er” shows up twice, as does “gr.” A trigram is a group of three of adjacent letters, like “the” or “ear.” Labeling can continue up fromContinue reading “Python GUI 025 – N-grams, Part 1”

Python GUI 024 – Wordlists, Part 2

I finally got back to working on the Python TKinter project and got the n-grams generator section implemented. Along the way I encountered a few issues that I need to discuss here first, before showing the code. Most of what follows will be the basis of philosophical decisions that are going to affect later designContinue reading “Python GUI 024 – Wordlists, Part 2”

Python GUI 023 – button_utils.py

The button_utils.py module currently contains the following functions. As of right now, YesNoBox() and YesNoCancelBox() are just for reference and are not used anywhere in any of the solver projects. YesNoBox()YesNoCancelBox() (DisplaySettingsBox example) DisplaySettingsBox()Used for toggling the flags for showing CONs: to be processed, that are Done, and that are to be Skipped. (HillclimbSettingsBox example)Continue reading “Python GUI 023 – button_utils.py”

Python GUI 021 – Digression 2 – Word Lists

Real life is really starting to get in the way of what I want to do. There’s nothing really good or really bad going on, but the constant interruptions are preventing me from getting stuff done. At the top of the list, my ASUS tablet died. At least part of the problem might be aContinue reading “Python GUI 021 – Digression 2 – Word Lists”

Python GUI 020 – Transpo Solver, part 2 – Preparation

I wanted to clean up the GUI interface system, and take out all of the functions that are pretty much common across all of the CON solvers. This includes the file open and save functions, etc. I managed to move some of them into cons_gui_utils.py, but a few others turned out to be problematic. ThisContinue reading “Python GUI 020 – Transpo Solver, part 2 – Preparation”

Python GUI 017 – Cons Parser Solutions Exporter

Back when I wrote about the CONS Parser project, I said that I wanted to add a function for exporting the solutions to the CONs so I could submit them for credit to the ACA (not a sponsor), but that I wasn’t going to do that right away. Actually, I’ve been waffling over exactly howContinue reading “Python GUI 017 – Cons Parser Solutions Exporter”

Python GUI 016 – Cryptarithm Solver, part 7, Normal Solver

Well, we’ve gone through the madness of preparing the digital cryptarithm CONs for solving and it’s finally time to get to solving them. Right now, the GUI only attempts to solve the CONs one at a time, rather than everything in the _processed.txt file one after the other automatically, in part because I’m still inContinue reading “Python GUI 016 – Cryptarithm Solver, part 7, Normal Solver”

Design a site like this with WordPress.com
Get started