Scrivener 3 improving the auto-completion feature

I just upgraded and love the auto completion feature, however, in looking at the recommendations, it seems like the text runs of a custom dictionary, rather than learning from my typing (at least at first).
Is that correct? Is there an easy way to improve the auto completion?

For example, if I type the word “Nate,” a lot (a character in my story) will Na(te) start to become the first recommended auto-complete entry for Nate? Then, is there any chance of seeing or getting two (or longer) word / sentence recommendations?
In using a few different tools, I really believe the best writing experience is one that incorporates the easiest to use suggestions, and in this case, the “tab,” key to select the suggestion is great.
A few ideas on how this could be improved / my personal wish list:

  • Training the software on my past novels so it knows how I write ( a plugin could do this, I think?)
  • Getting only a limited number of suggestions based on frequency / likelihood of being the correct ones (say 3-5 suggestions, max)
  • Over time, improving the recommendations from single word to multiple words, to encourage even less keystrokes

Example open source (C++) tool that has the ability to train on past things you’ve written and provides the multi-word recommendations I’m after on Github can be seen here github.com/oormicreations/PredictEd

I’m also open to the idea of helping to sponsor the plugin / feature as I really, really want something like this incorporated into my favorite writing tool. The predictions (especially multi-word ones that learn from my own novels) could save me a lot of typing over time. I’ve written six or so novels so far and plan on writing a lot more during my career :slight_smile:

Unless I have misunderstood (always possible) the autocompletion feature is provided by the system software, not Scrivener. Hence the button in the Preferences that takes you to System Preferences.

My solution to the problem you describe is to use Typinator https://www.ergonis.com/products/typinator/. Others use TextExpander, and there are other alternatives if you look around on MacUpdate, for example.

I use Project Settings/Auto-Complete List for this. This requires manual entries for what you want completed so is not automated like you desire. However, there is some advantage to that as manual entries can be more specific and targeted than any automated process. I find too many of these type of popups to be a distraction.

I write fiction, and for most projects, if a character name is difficult to type or long, I make an Auto-Complete entry for it. Works really well for me. I also use Auto-Complete entries for many technical terms in other writing, and for weird science fiction terms I make up for some of my stories.

I’m using the custom auto-complete now with modifications to the list as the system generated (Mac) recommendations don’t always include the language for a Fantasy / Science Fiction novel.

But that list is manual to create and you can only add entries one at a time - I see there are perhaps 2 categories of people who might use Scrivener. One category of people are those who haven’t written a novel, who are new to writing, etc - then there are those like me, others, who have a few novels, and would appreciate those personalized recommendations.

Being able to click “Import,” and then have the software read through (it’s got text statistics already inside, right?) and index the most common words, two / three word phrases, etc, and then recommend those as part of the typing suggestions would be huge.

I know it’s the system generated stuff, and when Scrivener gives me the recommendations right now, I’m getting the mix of my custom auto-complete list as well as the system generated ones, however, those are never two / three word phrases, which could help a lot in saving time.

Tools I’ve tried recently:

  • Openoffice writer - you can get two word phrases, etc, but the minimum character length to start giving you a suggestion is 5 - if I type 3/4 characters, and they are “unique,” to a given word (like uniq - not many words start with those four, ya?) then the OpenOffice feature isn’t good enough.
  • PredictedEd - open source on Github, can pre-index stuff but there is a limit (5K) of items that can be stored in your custom vocabulary to train their LSTM (long term, short term memory). It’s open source, MIT license, and that indexing feature would be a smashing way to start expanding the “custom auto-complete,” feature
  • Wrise (on mac) accessibility software, gets the type-ahead, learns from what I’m typing, etc, but I have to click the selection, I can’t simply hit tab or another key to accept their recommendations, so typing more quickly with it ends up more a chore than it should be.
  • Lightkey (Windows only) has plugins to use elsewhere, gives you predictions but only one, and includes two / three word phrases after it learns a bit, but, you don’t get nearly as nice recommendations out the box as Scrivener 3 now that i’m using the system generated recommendations
  • Online version of GPT-2 Large, Huggingface Transformer demo - it’s decent at giving you recommendations with tab, but I can’t customize their vocabulary unless I train the network myself, then I can’t easily incorporate my trained model into a workflow, so that’s a bit out (unless there is an easy way to do this, which I doubt) - also doesn’t give the easy option to work offline, which is important as internet isn’t always reliable, etc).

Looked at Typinator, interesting software, but I have to predefine everything there as well it sounds like, in Scrivener 3, I could do the same by manually creating a ton of phrases, etc which still means I’m manually setting up everything, instead of the software being pre-trained by me before I start creating my next draft.

Even without the “pre-index,” feature, if there was a way to import a file to help save time, provide expansions that were based on some bigram & trigram analysis of my text that would be a nice intermediate step.

From the Typinator user guide:

“You can also import snippet files from aText, Textpander, TextExpander and TypeIt4Me, “autocorrection lists” (ACL files) of Microsoft Office, as well as the built-in text substitution rules of macOS”.

So if by a lucky chance you have been using MS Word, you can import lists from that application. Otherwise you are probably stuck.

I think the features you mention are much more likely to appear in a stand-alone utility than in a program like Scrivener, though. Just my impression.

Haven’t used any of those tools, don’t have an auto complete list anywhere myself (I can make one, but then I’d be working extra hard to learn yet another software, instead of continuing to use Scrivener).

You can import the project settings as I understand it for Scrivener’s past auto-complete as well, but again, I don’t have an existing auto-complete file to import from any software or tool. I’d imagine many writers also don’t have such a thing.

But you know what every writer has that has been writing for a while? A few manuscripts, published or unpublished. If a software can learn form those to build the auto complete list (as I mentioned, PredictEd, free & open source, does this but to limited in size for the index to be truly useful).

If I was going to experiment, I’d probably start with figuring out how to get the software to compile on a PC with upgraded limits for the training, then see if that solved the issue.

Again though, without the extra features, I’d be using 2-3+ apps to accomplish the end goal: crafting a higher quality novel faster than before.

Okay, wanted to post a follow up to this as I’ve found a way forward :slight_smile:
First, if you’re on Windows, or a mobile device, this probably won’t work - if however you are on a Mac, I’m on Mojave, though I suppose a slightly older Mac would work as well.

Warning: dangerous, do at your own risk, don’t perform any changes like this while the file is open.
If you want to find your project settings auto-complete list to improve, expand, etc, what’s there in bulk, rather than using the Scrivener GUI to manually add entries one at a time, do the following:
Step 1: Open up the .scriv file with a right click, select, “Show package contents.”
Step 2: Browse down the tree until you get to the .scrivx file
Step 3: Open the file with your favorite text editor (I used TextEdit, the default comes with OS)
Step 4: You’ll see if you scroll down in that file, something like this:

    <AutoCompleteList>
        <Completion Scope="-1">autocompleteme</Completion>
    </AutoCompleteList>   

where in the example above, that XML format is around your autocomplete entries, one per line.

Step 5: List expansion time! Now that you know the format, you can copy & paste a new, line by line, list of your extended auto-complete, which could include all sorts of phrases, verbiage, etc.

This may help you achieve the goal I’m aiming for, which is to use Scrivener to dramatically increase my speed of story generation, so when I’m thinking, I can be creating almost as fast as my mind processes things.

Question about this idea though: is there an upper limit on the size of this file, either for performance reasons, or pactical reasons? Eg, can I add 100,000 lines to the file? What about a million? Etc.

So happy I found out how this file works -> off to experiment and I hope I didn’t reveal anything I shouldn’t about how Scrivener works under the hood, I think it’s important to allow authors to do this kind of thing, as for me, it’s really going to be amazing in helping my productivity.

If you’re going to tell users how to manually modify Scrivener files (which L&L does not recommend, because it is very easy to break them), you should at least make sure to tell them to be sure that the project that they are about to edit is closed and fully synced across all devices it might be on.

No telling what would happen if you make this change to a project that is actually open…

No telling what would happen if you make this change to a project that is actually open…

Gotcha, modified above, added a warning in bold. At that point I think it’s safe to say if somebody does this it’s on them right? Because I’m sure others have searched for this kind of thing & went down the same rabbit hole I did.