Cookworm: The BookWorm Deluxe wordlist and popdefs editor
This program edits the wordlist and popup definitions for the game BookWorm Deluxe by PopCap Games released in 2006. I created this program after augmenting the wordlist more manually using this free list of English words by dwyl, but then discovering that it contained some errors, along with real words that I felt deserved a popdef.
Installation
Windows portable EXE
Download EXE (Windows only). It is one file, needs no installation, and works offline: the WordNet dictionary and the word frequency list are inside it. Older versions are on the releases page. Because it is a windowed app, the command line options technically still work with it, but print nothing to the terminal.
Linux portable executable
Download for Linux (x86_64 only). Like the Windows EXE, it is one file, needs no installation, and works offline: the WordNet dictionary and the word frequency list are inside it. Unlike the Windows EXE and the Python package, the Linux executable exclusively cannot update its own WordNet dictionary for auto-defining: it never tries to download one, and always uses the copy inside it. You may first have to mark it as executable (chmod +x cookworm-linux-x86_64). It was built on Ubuntu 22.04, so it needs a system with a C library at least as new as that one (Ubuntu 22.04 or newer, Debian 12 or newer, a current Fedora or Arch, and so on). It also needs the libxcb library and at least one font, which any desktop system already has. Links in the Help menu open in your normal browser. Unlike the Windows EXE, it prints command line output to the terminal normally. If you are on something older, or on ARM, use the Python package below instead.
Any OS: Python package
This app requires that Python and Pip are installed. It is officially written in Python 3.14, and is known to not work with anything older than 3.10. Once you have that, open a command line (Windows Terminal or PowerShell counts), and run pip install cookworm. If it fails with an error about the "environment is externally managed", you will have to create a Python virtual environment and activate it, then try again. The script command to run, and the Python library name to import, are both cookworm. I'm not sure how to make a Windows shortcut for a command though...
Running from source (for nerds)
This program relies on the following non-native Python libraries, which can be installed using Pip:
In the src directory, either run python -m cookworm or python cookworm_gui_wrapper.py to launch the app.
Usage
GUI
NOTE: (Does not apply to the Windows EXE or the Linux executable, which carry the dictionary) For the auto-define button to work, the program requires an internet connection to download the NLTK wordnet package when it starts up for the first time. If it doesn't have one, it will still function mostly-normally, but the button will just show an error message. It will try to download wordnet again on the next startup.
When the program opens, it will default to opening the BookWorm Deluxe folder in the expected system location per your platform, or the last location that it was successfully opened to, whichever seems better. The memory for that last opened location is stored in ~/.cookworm/config.yaml. You can safely delete this file to reset the configuration to the defaults. If on Linux or MacOS, the program will assume the default Wine prefix in your user directory. If it does not find the wordlist.txt and popdefs.txt files in this default location, or the default location doesn't exist, it will ask you to choose the BookWorm Deluxe folder manually.
Once the program loads the files, you should see a list of words in the left pane. The bottom of the window shows the current number of words and popdefs in memory when idle, and status information on any currently running threaded operations.
- Click on a word to see its usage rarity according to wordfreq (8.00 / 8 for no wordfreq entry), and its current popdef (blank for no popdef). The usage rarity meter has a color changing function as well: If the usage frequency is below an arbitrary value where I think it might need a popdef, the meter will be sapphire blue. Otherwise, it will be paper brown. While a word is selected, you can:
- Edit the popdef and save it. Note that if you select a different word before saving the definition, it will reset.
- Reset the popdef to what it was the last time you saved it.
- Auto-create a popdef using the NLTK wordnet English dictionary.
- Delete the word from the wordlist.
- Use the search box to find a particular word, using the X button to clear the search query.
- Click the "Add word" button to add a new word to the wordlist. Once added, it will become selected.
- The File menu provides the following operations:
- Open (Ctrl + O): Open a different word list and popdefs file pair.
- Reload (Ctrl + R): Reload the current word list and popdefs file pair, reversing all your changes.
- Save (Ctrl + S): Save your changes. Automatically asks if you would like to do a backup if the original files are older than my program.
- Backup existing (Ctrl + B): Copy the existing files to a backup named version in the same directory.
- The Edit menu provides the following operations:
- Add several words: Select a text file of new words and add them all.
- Auto-define undefined rare words: Find all words below my arbitrary usage threshold and attempt to auto-define them.
- Delete several words: Select a text file of words and delete them all.
- Delete words of invalid length: Removes words that BookWorm Deluxe will not allow as moves because of their length.
- Delete duplicate word listings: Make sure that none of the entries in the word list are redundant.
- Delete orphaned definitions: Removes definitions from the popdefs that do not have a word in the wordlist.
- Delete unencodable definitions: Removes definitions that cannot be encoded to ISO 8859-15 (what the original files use).
CLI
The Cookworm app has a fully CLI mode, activated by passing any of the CLI flags not labeled as also affecting the GUI. Here is the help printout for all of them:
usage: cookworm [-h] [-a [ADD ...]] [-A ADD_FILE [ADD_FILE ...]] [-x [DELETE ...]] [-X DELETE_FILE [DELETE_FILE ...]] [-d [DEFINE ...]] [-D [AUTO_DEFINE ...]] [-k REMOVE_DEF] [-o] [-l]
[-e] [-P GAME_PATH] [-b] [-p [PARSER]] [-u [UNPARSER]]
[outfile]
The BookWorm Deluxe wordlist and popdefs editor. Version 5.0.0, licensed under Apache License version 2.0. Project homepage: https://github.com/thelabcat/cookworm
positional arguments:
outfile (CLI) Output file for raw (un)parser mode. Defaults to stdout
options:
-h, --help show this help message and exit
-a, --add [ADD ...] (CLI) Add the given words to the list
-A, --add-file ADD_FILE [ADD_FILE ...]
(CLI) Add the given file(s) of words to the list, '-' for stdin
-x, --delete [DELETE ...]
(CLI) Remove the given words from the list
-X, --delete-file DELETE_FILE [DELETE_FILE ...]
(CLI) Remove the given file(s) of words from the list, '-' for stdin
-d, --define [DEFINE ...]
(CLI) Define a word. Pass no arguments to print the existing definition
-D, --auto-define [AUTO_DEFINE ...]
(CLI) Automatically define specified words. Pass no arguments to define all rare ones
-k, --remove-def REMOVE_DEF
(CLI) Remove the popup definition for the given word, because it is widely known
-o, --orphan-fix (CLI) Find and delete all orphaned definitions
-l, --length-limit (CLI) Find and delete all words of invalid length
-e, --encoding-check (CLI) Find and delete all unencodable definitions
-P, --game-path GAME_PATH
Manually specify game program folder location
-b, --backup (CLI) Create backup of game files, defaults to yes if they are older than the program
-p, --parser [PARSER]
(CLI) Work directly from a wordlist file, and parse it to an output. No argument to read stdin
-u, --unparser [UNPARSER]
(CLI) Work directly from a plain words file, and unparse it to a wordlist output. No argument to read stdin
NOTE: CLI options are run in documented order, not provided order. S.D.G.
This is more for nerds trying to automate stuff, as in even bigger nerds than the average user of this app, so IDK what else to document here. I will say that parser and unparser basically make this function as minimally as possible. You pass them a file, they (un)parse it and spit it out. Useful for extremely manual editing. I call this mode "raw parser mode" everywhere else.
Information on antivirus false positives for PyInstaller executables:
Various antivirus services occasionally flag any and all Windows executables packaged with PyInstaller. This is a false positive: While malware could certainly be written in Python and subsequently packaged with PyInstaller into an exe, the exe would be malicious because of the packaged Python code, not because of PyInstaller. I've reported the problem to the antivirus services that I found false positive reporting forms for, but often only the specific app version was whitelisted, if anything at all. It turns out that this is a known issue with, or rather limitation of, PyInstaller, and therefore there isn't anything its devs can permanently do about it. Long story short, a PyInstaller executable works by extracting from itself the Python interpreter, supporting libraries, and the script to run. What's more, it's doing this all in temporary storage. That looks rather suspicious to some antimalware heuristics, and understandably so. Since then, Malwarebytes in particular has tried to remedy the issue on their end, assumably by whitelisting the PyInstaller bootloader hash, but a new bootloader update for PyInstaller could change that. I'd like to thank Malwarebytes for their effort, in any case. They in particular were very quick to fix the false positive for my apps individually, even before the PyInstaller master fix. I don't use them personally, but that is good service.
Bundling yourself:
The Windows EXE and the Linux executable are built by the Release GitHub workflow (.github/workflows/release.yml) whenever a release is published. To build one yourself, on the system it is for, from the repository root: install the app and PyInstaller (pip install . pyinstaller), download the dictionary to bundle (python -m nltk.downloader --no-extract wordnet), then run python .github/scripts/build_exe.py cookworm-win-x86_64 (or cookworm-linux-x86_64). The result appears in dist-exe. python .github/scripts/smoke_test_exe.py dist-exe/cookworm-win-x86_64.exe checks that it works offline (on Linux, run it under xvfb-run, with xdotool installed, if you have no display). A Linux build only runs on systems with a C library at least as new as the one it was built on, so for other people to use it, build it on an old system, like the release workflow does with Ubuntu 22.04.
Hope this helps!
Legal:
This file's license
Copyright 2025 Wilbur Jaywright d.b.a. Marswide BGL.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Third-party data in the Windows EXE and Linux executable
The Windows EXE and the Linux executable include, unmodified:
- The WordNet 3.0 English dictionary, as distributed by NLTK, under the following license.
- The English word frequency lists of wordfreq (code under Apache-2.0, data under CC BY-SA 4.0, derived in part from Google Books Ngrams: http://books.google.com/ngrams).
WordNet Release 3.0
This software and database is being provided to you, the LICENSEE, by
Princeton University under the following license. By obtaining, using
and/or copying this software and database, you agree that you have
read, understood, and will comply with these terms and conditions.:
Permission to use, copy, modify and distribute this software and
database and its documentation for any purpose and without fee or
royalty is hereby granted, provided that you agree to comply with
the following copyright notice and statements, including the disclaimer,
and that the same appear on ALL copies of the software, database and
documentation, including modifications that you make for internal
use or for distribution.
WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved.
THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT-
ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE
OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT
INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR
OTHER RIGHTS.
The name of Princeton University or Princeton may not be used in
advertising or publicity pertaining to distribution of the software
and/or database. Title to copyright in this software, database and
any associated documentation shall at all times remain with
Princeton University and LICENSEE agrees to preserve same.
S.D.G.
Metadata
Release files for cookworm 5.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cookworm-5.2.0.tar.gz | 80.0 kB | With provenance | Details for cookworm-5.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cookworm-5.2.0-py3-none-any.whl | Python 3 | none | any | Details for cookworm-5.2.0-py3-none-any.whl |
Total release size: 135.3 kB
Release files / cookworm-5.2.0.tar.gz
| Download URL | cookworm-5.2.0.tar.gz |
|---|---|
| Size | 80.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df473f83d5a0d7462aa8fec8e7fcdaea4a966c65bfb4ce9bb9955810ea409e85
|
|
BLAKE2b-256 checksum How to use checksums |
83dc73db705b15f8985fb17e7e88930a824ea54d37863e95243ed8e62b227a01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logRelease files / cookworm-5.2.0-py3-none-any.whl
| Download URL | cookworm-5.2.0-py3-none-any.whl |
|---|---|
| Size | 55.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e0da32f06fa80525321802b8e7f9619470a9a3e224aaa2a80ec77f4e0458ce9
|
|
BLAKE2b-256 checksum How to use checksums |
021e5f00ddc8b0076017d1c7817e45849af57a282ae5582cb7c0816944c34220
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logSecurity for cookworm 5.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for cookworm-5.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.