Best way to spellcheck inform 6 game?

I’m not native English but trying to make a game in English, so I’m sure to be making tons of spelling errors.
Does anyone know of any spell-checker (it’s fine if it’s a shell tool like ispell, aspell, codespell, etc) that will ignore programming language constructs and keywords, and only look at the strings?

1 Like

Have you tried the -r option of the compiler which allows you to record all the text to “gametext.txt” file?


Thank you, I hadn’t heard of that one! It works, the resulting file does have quite a bit of jargon and internal names (I think from library error messages). But it absolutely works better than the raw inf.

Transcript of the text of "xenomusa.inf"
[From Inform 6.37 for Unix (in development)]

^An interactive sci-fi story by Mara Huldra^

Inform Release Notes:

The setting $TRANSCRIPT_FORMAT controls the output format of the -r option. The default is still the same format as before, (and can be explicitly selected with $TRANSCRIPT_FORMAT=0), but $TRANSCRIPT_FORMAT=1 enables the new, more informative and machine-readable format.

You can also save your game file with UTF-8 encoding. Just put the %!-Cu option in the header of your game file (on the 1st line).

!% -Cu
1 Like

Thanks, that significantly narrows down the number of extra words. With that I managed to construct a shellpipe abomination to run the check automatically

echo "[Misspelled or unknown words]"
grep "^G:" gametext.txt | cut -c 4- | aspell list -l en_US -p ./xenomusa-dict.pws | sort | uniq

Where *-dict.pws is a list of valid words specific to the game:

personal_ws-1.1 en 82 
1 Like

Great, this will be very useful to me.
For the French language, we have the free Grammalecte extension for LibreOffice which is really useful for grammatical, spelling and typographic corrections. I don’t know if there is an English equivalent.

Oh good idea! I looked around and the closest equivalent for English grammar checking seems to be LanguageTool. There’s a plugin for LibreOffice and it can also be used from the command line or Python. I haven’t tried it yet though.