Per Project Personal Word list

It’s certainly a creative idea (and very much like the workarounds I have to come up with for various features every day), so I appreciate the thought behind it. Unfortunately, you’ve noted one of the main problems with it. The spell-checker is global to the application (that’s the main problem here - there is no way to associate a different spell-checker with each project), which means that the lists of words for all open projects would be loaded. This would seem like buggy behaviour to many users, so it would open up extra support demands. (I suppose it could try to tell the spell-checker to learn a word when a project is activated and unlearn the word when it is deactivated, come to think of it, but it would be a very fragile approach.)

All the best,
Keith

Instead of using “Ignore” try using “Learn”. Ignore is a session based exclusion, and more useful for things that you know are incorrect in general but happens to be contextually correct, but you don’t want to it to be in your global dictionary.

When you use the “Learn” function, it will do exactly what you are describing in the first part. The word will be written into a simple text file, and this file is used by all applications on the system to dynamically exclude certain words from the spell check engine. Since this is just a normal text file (located in your ~/Library/Spelling folder) that you can edit by hand, that means you could swap these files out when working on a particular project, or even manage them by hand, merging and cutting entries between various files that you keep elsewhere until needed.

The main problem with any kind of management of this from within Scrivener is that Scrivener really has no authority to be doing that since this list is used for everything from your Safari search bar tool to Mail to Scrivener, and as such there aren’t any programming interfaces that we can use to manage it with more precision. It sure would have been nice if they designed it that way from the start, though, as it would resolve the main drawback to the otherwise very nice global spell check capability of the Mac.

Now, as for us doing anything custom on top of that in memory, I don’t think that would be possible either—like a word list in your project meta-data that is applied to the system level dynamically when the project is loaded—I just don’t think that is technically possible, since the extent of the spell check code in Scrivener is essentially just asking the Mac to turn it on or off and pass through all of its management functions to the contextual menus and Edit menu.

I’ve pondered this very problem, and done some haphazard research on it. There are two paths that are hypothetically possible, but I’m too busy/lazy to learn how to create a proof of concept.

The first is to have a setting for each project to either use the system-wide spell-checking language files, or for Scrivener to create a link to the language file currently in use, but name it for the project. Then the custom dictionaries created for that language file would be separate (maybe?) from the original. the tricky part would be to have Scrivener switch languages for you every time the focus left that project’s windows, and then switch back to that custom language when it regained focus.

Sounds like a nightmare of fragile state switches that could expose bugs in the spelling code that would never normally have a chance to surface.

The other way would be to do something with aspell/ispell for mac os. That would generate complaints, as there seem to be a lot of words that are missing from aspell’s lists.

Sounds like a huge headache. I think we’re just going to have to storm Cupertino HQ and occupy the OS X developer offices.

IANACP (I am not a Cocoa programmer) but it seems like it may be possible to differentiate word lists by project:

https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/SpellCheck/Tasks/CheckingTextSpelling.html#//apple_ref/doc/uid/20000721-98120-CJBFIHIG

See the section under “Matching a List of Ignored Words with the Document It Belongs To”. It talks about associating an ignored words list to an arbitrary ID. When the project is closed you can query for the ignored words list specific to this ID and save them. When the project is re-opened you could restore the ignored words list (I would guess you would get a new ID and use that; I doubt you’d save the ID across sessions). So there’s no intermediate state that needs saving by Scrivener, just the start and end.

How this interfaces with Scrivener’s micro-saving every few seconds is a different question. And you’d probably want a global preference to see if the user wants a global ignored-words list or a per-project list. But they don’t seem like overly-difficult things to figure out.

All of the above said with the IANACP caveat.

I have begun writing in both English and French. I can see where I can set the spelling dictionary used for Scrivener globally. But what I was hoping for is either the ability to have a different dictionary defined per project or the ability to have more than one spelling dictionary in use at the same time.

Thanks!

2 Likes

Hi.

I’ve read the posting rules (the terse and the long winded version) and searched for dictionary suggestions.

I’m not sure if it would be useful to many people besides myself, but I was thinking that a user dictionary for each project might be useful.

With such an option, I could allow Scrivener to learn special words in each different story, reducing the chance of error that occurs with one generic user dictionary.

Not sure how much trouble that would be, as you’d have to tinker with the UI and manage each dictionary. Probably a lot.

But anyway, that’s my only suggestion and the only thing that I’ve wanted to improve after using the program for several years now.

All the best,

Edward.

+1
A project-specific ‘dictionary’ would be especially handy if could be compiled as a glossary to be included in the front matter. Or, conversely, if the spellchecker could be flagged to look for such a glossary in addition to the standard dictionary. Extremely handy for sci-fi/paranormal worlds, military/medical jargon and acronyms, and historical/foreign language dialogue!

Yes, definitely want this. Each of my novels will have its own set of words that I don’t want flagged. Character names, special words (especially for Science Fiction and Fantasy).

But each fresh work needs to start from scratch - if I invent a word such as “scubbie” for Novel A, it should still be flagged if I accidentally use it in Novel B.

Also relates to my wish list post Get a list of unknown words where I’d just like to be able to extract a list of words not in the dictionary.

The following thread in the Windows forum gives a possible work-around that may interest you:

literatureandlatte.com/foru … 30&t=33538

As for the main issue here, I’m not anything to do with Lit&Lat, merely someone who’s been using Scrivener for Mac from when it was in pre-release beta in 2006, nor am I a programmer, but my impression is that if it was easy to implement separate user dictionaries it would probably have been done. Mind you, any issues will be different on the Mac, I imagine, and it may be easier to do on Windows. However, LAP and Tiho_D still have a lot to do to bring the Windows version up to parity with the Mac version, so other things may be more of a priority.

Mr X

Useful link!

In which case (speaking as a programmer) most of the logic is in place, and Scrivener simply needs to be modified to store the wordlist.ini file in the xxxx.scriv folder (or a subfolder thereof) instead of at %LOCALAPPDATA%\Scrivener\Scrivener\wordlists.ini

That’s something that needs to be made backward compatible, so you’d need a settings check box to choose the old behaviour (unchecked, default) versus the new behaviour (checked, explicit choice)

So, pretty please L&L …

I think this is a genuinely interesting suggestion.

There may be some technical business to juggling together the Scriv-global and a project-local list, since it is likely one doesn’t want to do away with the global one.

And while that might be possible for Windows, things may well be different on the Mac—the dreaded word ‘sandboxing’ comes to mind—which would perhaps create problems for those who work across platforms. But then I’m no programmer, merely a very long time member of the Scrivenerati.

:slight_smile:

Mr X

I would also like to see multiple user dictionaries but not necessarily project specific (although I like that idea, too). I also write Science Fiction/Fantasy/Speculative Fiction and I’m also a Conlanger (someone who creates constructed languages).

I will often create a language that may have several hundred to several thousand words for a particular group of people in my story. It would be nice if I could create a new dictionary for this constructed language. I could then use it across multiple projects that feature the same people by selecting it in a list of dictionaries I want to use in my project.

I could see it as surfacing an interface that allows you to set up a “named” dictionary file like the ones that appear in the list in the Options dialog and allowing the user to select multiple dictionaries to use. For example, let me put a check box next to English and my constructed language dictionary in the list and the program would use both dictionaries. There might need to be a reasonable limit on the number of dictionaries you’d be allowed to select, though.

That would allow project specific dictionaries (just create a new named dictionary for each project) and language/setting specific dictionaries for multiple projects (but not every one).

What do you think?

Lee

Multiple user dictionaries are possible using Spell Catcher, but this may not be a viable option since it is regrettably no longer being developed (although it does still work in OS 10.9, and this is the main reason that I am sticking with 10.9 for as long as I can).

I was wondering if there had been any progress on finding a workable solution for this issue? I’m a new Scrivener user and I see there’s been a fair amount of chatter on the forums about having project-specific dictionaries, but I don’t see any kind of definitive solution.

1 Like

It seems that the dictionary/spell check is a system wide setting. I write in a couple of languages, but not for every project. If the system setting were used as a default when starting a new project that would be OK, but I’d like a per project dictionary setting. Which actually leads me to the second part of this request. I’d like to have multiple custom dictionaries.

I’m presently writing a D&D campaign setting (think high fantasy fiction in Tolkeinesque English) and a travelogue (in English and German) so I have character and place names that are important for one project but not another.

My custom dictionary has real and fictional town names mixed. I was trying to keep separate lists and manually swap wordlists.ini (which is how I discovered the bug I reported earlier in the beta version) but this is not a good working solution - being able to associate two or more custom dictionaries with a single writing project would be great!

Additionally in my fantasy writing I’d like to have a word blacklist - words that although technically spelled correctly are not allowed (for instance a preference of grey over gray - I’d like gray to be marked as error in one of my fantasy projects).

To boil this down

  1. Spell check preferences move to a per project setting.
  2. Use system spell check preference as default for a new project.
  3. Allow multiple custom dictionaries per project
  4. Allow a blacklist dictionary of words that are always wrong (even when they are “right”)
1 Like

As a story writer one thing that constantly frustrates me about scrivener is that the spellcheck feature really seems to lack a key feature. Personal wordlists are nice but the fact that the list is applied globally kinda kneecaps it, the ability to have the list linked to the project rather than the program.

When i’m writing a sci-fi novella functions pretty well. I can tell it to ignore or learn names, and certain words. But then when I switch to writing and essay or magazine article I don’t want it to ignore the same words and names. What’s a spelling error in one project can be a proper spelling in another, especially when it comes to names.

Having the/a personal word list that is saved as part of the project would make matters much easier and make spell checking.. less frustrating with scriverner.

1 Like

I second this feature request. I also want to expand upon it: I think it would be great if Scrivener allowed us to use these “personal word lists” to generate glossaries or appendices for our projects; it would greatly simplify life for those of us who write sci-fi or fantasy epics, which usually come with these sorts of appendices and/or glossaries in the back matter of the book, and which need to be written along with the book. Maintaining these types of word lists, each within a specific project, would help with the generation of these immensely.

1 Like

I’m afraid this isn’t possible because the spell-checking system is provided by macOS, and there is no way to have it learn or ignore words on a project-by-project basis because the spell-checker is global.

All the best,
Keith

What about windows?