preDict’ive Text in Word
I expect that the most used piece of software (with, perhaps, the exception of Outlook) in any engineering firm is Microsoft Word. I’m sure anyone who knows me personally will understand why this is particularly distressing for me.
Although being able to auto-complete words based on usage is helpful, the most useful feature of preDict is it’s ability to guess the next word. After you’ve typed the first two or three words of a document preDict will begin to provide suggestions before you start.
One of my chief criticisms of winword (as it was once known) is that I have to do all the typing.
I know what you’re thinking: “Tom- that’s a little unfair, you can’t expect it to know what you’re thinking.” But it’s not. The likes of LibreOffice, Google, and even my phone can take a fairly reasonable swipe at what my future sentences might hold.
preDict has been a pet of mine for a few months now- slowly improving from a series of cowboy’esq patches to a soothsaying daemon with a “Palais des congrès de Montréal” aesthetic. Last week I finally got the source into a state that wouldn’t embarrass me in public, and released it into the wild. Now you, too, can enjoy reports that almost write themselves with this Word add-in.
Note: preDict might work on versions of Word before 2007, but I can’t guarantee it. If you do get it working, why not shift the code back up on GitHub?
Pride and preDict’ions
It’s always best to start with an example:

preDict attempts to auto-generate some Jane Austin.
Not quite literary genius, but the above predictive text was written solely by typing two words and asking preDict to guess what word comes next until it got itself stuck in a loop. Considering it was all done without any human guidance- I think it turned out all right. Of course, you’re not meant just to blindly follow the predictions; but it’s a fun exercise to see what you talk about the most.
The Basics of Clairvoyance
Once you’ve got preDict loaded (see the end of the post) you’ll have this new and beautiful icon on your main menu bar.

The preDict button
Hit the button to start, and you’ll be welcomed with the main window. Due to some maddening restrictions by Microsoft, providing in-line predictive text within Word is simply impossible. After half a day of trying I was forced to yield to Occam’s razor and simply provide a new place for people to type.

The preDict window: ready and waiting.
To get going type in the white box; once you’ve completed (or auto-completed) a word preDict will ping it across to Word. The two other buttons are self-explanatory, I hope.

As you type preDict provides suggestions
As you start to type a list of suggestions will develop on the right-hand-side. You can use the [UP] and [DOWN] arrow keys to navigate the list, and press [TAB] to use the selected (green) word. Continuing to type will narrow down the predictions, and pressing [SPACE] will send whatever you’ve typed back to Word, regardless of the predictions. This allows you to type normally, and only use the predictive functionality when you need it.

preDict also guesses what word you’ll use next
Although being able to auto-complete words based on usage is helpful, the most useful feature of preDict is it’s ability to guess the next word. After you’ve typed the first two or three words of a document preDict will begin to provide suggestions before you start. These predictions are mixed-in with the auto-complete functionality to help provide more relevant results, even once you’ve started typing.
Learning by Doing
preDict does not come with a pre-installed dictionary; it learns from you.
That means that the first time you start preDict, and every time it is exposed to a new document, it’ll offer to read it. If you want to fast-track your way to reasonable predictions I’d recommend opening a few old documents and letting it parse them.; it won’t take long. The more you use preDict the cleverer it will become.

preDict offers to read every new file it encounters
As a guide, preDict read all 120’000-ish words of Pride and Prejudice in just under three minutes, and created a dictionary that took 30 seconds to load with no slow-down while predicting. I would not, however, recommend simply feeding it classic literature unless you really do write like Jane Austin.
Installation and Tweaks
Unlike the last piece of code I shared, preDict comes with an installation script. Just download preDict and run ‘setup.bat’. For the security conscious: all it does is copy the add-in file into your Word start-up directory. You might find that Word asks you to enable macros when you start, which can become a tad frustrating after the sixth time. You can lower your macro security settings- although in doing so you’ll have to promise Microsoft you won’t open any attachments from Nigerian millionaires who are (at the moment) down on their luck.

preDict comes with a variety of options
In addition to the setup, preDict also comes with it’s very own confusing dialog box. You could probably go the whole of your life without changing the majority of these options, however I would recommend you consider if words need to pass the spell check, which will reduce the potential for mistakes, but will also hinder the development of specialist vocabularies. You should also periodically hit the ‘guess’ button, which helps tune how much more important a matched phrase is compared to a frequently used word.
So if you feel like reducing the number of key-strokes you make in a day:
Comments
-
Hi, I use a different method. I’m using the autocorrect option in a way it wasn’t intended. A simple example : ds will change to Dear Sirs and you can create whole sentenses with short and logic abreviations.
-
I think if you want a learning program you should go to speach technologie. It really works but you have to train it. I used it some years ago but it didn’t work for me. While speaking I couldn’t think, whily typing (with autocorrect) I can (being a bad/slow typist it gives me time to think.
-
Hi! Great addon. Would be perfect if it worked inline, but since you say it’s not possible, no worries. However, I have been unable to make it work in another language. It works OK with English, but I need it more for Russian. By not working I mean that it doesn’t make any suggestions after parsing a 2-page file. Is there any way to make it work in Russian (or any other language for that matter)? I could help translating the interface if needed. Thanks
-
I would also like to see language support added (in Hungarian inflection is hard, I don’t know if that matters here, simply recognizing some extra characters would probably help). Being able to switch between languages (and have separate profiles/dictionaries for them) would be important, so it would not try to suggest one language guesses while typing in another one. (This is the part that Samsung’s keyboard on my phone is not great at but otherwise it’s like it’s reading my mind.:)
I noticed that there are some “built in” words for suggestion (ones I have not used in the parsed document) (also not in preDict_*.dic), I’m not sure where these words are coming from (guessing MS Word dictionary – spell check results), but they only contain English words (no matter what language the spell check is set on). It would be great to be able to switch between languages here also and maybe import other dictionaries (like the ones Chrome, Firefox use).
Also when I write pea for example there is nothing in the yellow suggestion list (guessing spell check does not want to correct it), but I would like to see some, like: peak, peal, peace, peach… (peace also won’t suggest peacemaker…)
With a simple imported/built in dictionary (without word probability numbers) as a fallback this would be doable. (I could open a dictionary and parse it with predict, but that would skew my “writing style”)While we are asking for features 🙂 would be great to see this plugin for Libre Office too (AutoCorrect Options – Word Completion is just not enough)
Even notepad++ and Far Manager (with plugin) has autocomplete that works like a dumb intelli-sense and provides a list of choices for the currently typed word (using only the words in the current text file).This plugin is very good, I hope you will have time to further improve it.
-
Hello, I use Microsoft Word 2013 and keep getting a “The macro cannot be found …” error. I have tried everything (reproduced below) suggested by the “Show Help” button that accompanies this error message but to no avail.
What the “Show Help” button tells me to do:
This message can appear if:
⦁ The macro was deleted from the template.
⦁ The template was not loaded or referenced in the Templates and Add-ins command.
⦁ The macro was turned off by the macro security settings of your system.
If the macro security settings are not allowing the macro to run, you should confirm the origin of the macro to be sure that it can be trusted (contact the developer or the source for the macro). You can then temporarily enable all macros by using the following procedure.
1. Click the File tab, click Options, click Trust Center, and then click Trust Center settings.
2. Click Macro Settings.
3. Under Macro Settings, click Enable all macros.
NOTE: Be sure to change this option back to its original setting after you have run the macro.
If the macro is not accessible because the template is not loaded, click the File tab, click Options, and then click Add-Ins. At the bottom of the Add-Ins pane, select Templates from the Manage drop down list, and then click Go. In the Templates and Add-ins dialog box, click either Attach or Add. If the macro is not in the template, you may need to copy the macro from one template to another. Click the Organizer button at the bottom of the Templates and Add-ins dialog box to start the Organizer utility. -
would love to see this working in outlook.
I’ve grabbed a copy of your source and am having a go at refactoring a couple of the routines in a hope to reduce the amount of time I sink into in outlook each day. -
Great work, Thomas. For those (doubting Thomases) out there who are keen to try this, you can do so with confidence.
Con: A bit kludgy as one cannot type in the normal windows document, but rather in a separate interface window – however it does to interact quite nicely. I suspect that after a few hours of working this will no longer be an issue. (also I do not think this is Thomas’ first choice, but rather the limitations of the MS architecture)
Pros: I was up and running within seconds, with very little “training”. After about 20 minutes I can already see the system is learning – so much so that it predicted words without me even typing any letters for the next word. Big upvote.!!!
I suspect that this is a little gem. I am happy!
-
Hi, is this language specific, ie only english or will it work with any text regardless of language??
Thanks! -
Really love your work. Thank you very much. Please update me for your new post.
-
Hi. I’m trying to leverage the power of this wonderful add-in in my work and I am wondering if the following can be implemented. Some words typically would be followed by particular other words or particular word forms, for example a single noun by a verb ending in -s, e.g. “he says”, but preDict is apparently agnostic of any language structures (it only uses parsed documents, not the whole underlying grammar structure or thesaurus) and thus offers “say” before “says” (this is an example I made up but I have faced very similar issues). Another example is common phrases, such as “on the other hand” – as soon as I type “on the o..” it would be reasonable to expect “other hand” as an option. Is it possible to build in such tools that would take into account grammar? I realise this may be too difficult (or impossible) or that you don’t have time for this, but it’s worth asking 🙂
-
Hi. I’m not sure if my post got through and you haven’t had the opportunity to approve it or if I forgot to actually post it on Friday, so here it is again.
I have been tinkering with the add-in and made certain improvements, in my opinion:
1. “Mini” mode that reduces the dialog box to just the txtLook textbox with the lstLook listbox and buttons underneath it.
2. The mini-mode box moves “inline” (positioned at the caret and moved as words are inserted into the document. The mini-mode is controlled with a check-box, unchecking it moves the box back to its original position and fully restores its look (the checkbox remains as the only visible modification of your original design).
3. The txtStack textbox is populated with current paragraph text (if there is such text, otherwise it is emptied) – limited to the BUFFER_LEN
4. Ctrl+S saves the document
5. Support for Word’s built-in Autocorrect upon space press (not Tab though)How can I share the modified add-in with you? If you want, I can provide the VBA code only, although there are quite a few minor bits all over the VBA for frmMain controls.
-
Does anyone know if this works with the Mac version of word eg 2011
-
Hello! Does this plugin work with Greek language?
-
Hi great tool is there a way to activate preDict with a key shortcut I can’t figure out how to do it in word 2010 having to click the button makes it a lot less useful to me.
-
Thomas, thank you for the great tool!
Can you please provide any hint on how to support Cyrillic and German letters and words?Thank you in advance!
-
Simply put, all any program needs to do to be totally accepted and successful (as a predictive text add-in) is to replicate the success of the apps used in 99% of today’s smart phones. Any time you type, no matter the app, the predictive text is there doing its thing. Using the app’s settings, you can even tame or scale the way it works. So no matter what it takes one would need to do what smartphones have been doing; only make it work for the PC & Mac. As well as MS word and across the board. Is that possible?
-
The download links aren’t working 25 11 16 18.54GMT I’ve tried three different browsers
-
Im looking forward to use this great addon, but I cant see the icon in Word2010. Ive tried with Alt +F11 and F5 but there´s nothing there.. Any way of solving it? Thanks!
-
Does it work with Open Office ods format files?
Trackbacks
-
[…] is a predictive text plugin for MS Word to fill this feature hole. preDict It’s a good start, but it’s not complete, and Word should support this […]

Submit a Comment