If you are doing any kind of work with text in Blender it’s probable that you wish you had a built in spell checker.
I started working on a simple text checker, to check if a word was a real word or an error before I readthis excellent blog by Peter Norvig, and then I abandoned my efforts and picked up his script and decided to work with that.
It’s pretty simple, I’ll be working on it more as part of my project, hopefully making something that is more friendly to use.
For starters here’s my basic rewrite of Peter’s script to work in Blender:
text_checker_01.blend (400 KB)
You need to download the the “big.txt” file he links in his blog, or any large text file, your top 5 favorite books combined would be a good one, since it’s more likely to use words which you know and use regularly (in your own dialect). The text file needs to be in the same folder as your Blend.
Just run the file, and start typing. There may be a slight delay while it builds the dictionary object in the first tic, and then it takes a few milliseconds to look up a word, so typing is a little slow, but it works great.
Some lines had to be changed since we don’t want to run the trainer every time we write a new word, just once on initiations. I wanted to save the created dictionary to disk, but it uses a function that makes it impossible (ASAIK) to pickle it.
I’d like to see if anyone else can find a use for it, you can use it to suggest a single word, or break up a string and check each word in turn. It really needs some kind of UI to allow you to choose when to replace a word or not. That’s something I’m going to be working on as part of my current project.
Feel free to modify it to your own use, or clean up my own mess to get it to look nicer if you have the time.
All acknowledgments to Peter Norvig for his excellent script.