Character names recognised by spell checker

User avatar
phil
Posts: 18
Joined: Wed Jun 27, 2012 10:44 am
Platform: Windows
Location: England

Fri Jul 06, 2012 1:36 pm Post

Ok, I understand that character sketches are just ordinary documents within Scrivener, so I don't know how feasible this is, but if you can see a way to do it (perhaps by adding an attribute to character sketch docs?) I'm sure it would really help.

When I type the name of a character into a scene, it gets highlight by the spell checker. Could the spell checker automatically understand that this is a character name without me having to manually add it to the spell checker or telling scriv to ignore the spelling?
--
Very funny Scotty, now beam down my clothes!

User avatar
AmberV
Posts: 24411
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Sat Jul 07, 2012 12:03 am Post

If we ever did anything along these lines, it would more likely be tied to something like the Project Auto-Complete list. Even if you didn't use the list for actual auto-completion, given the nature of that list, it would make sense to use that as a source for any custom words in the spell checker. It would require an extra step to get the word in the list, but not much of one. It is already very easy to add a word or phrase to the list. Just select it, right-click, and select the option to add it to the list. This would be much better than trying to come up with a system for guessing or marking words in the entire project's text material.

But just to be clear, this is a pretty big 'if'. There are technical issues with doing something like this that must be figured out before implementation details can be thought over. It's the technical issues that hold something like this back, because it is otherwise one of those things that just makes sense to do.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
phil
Posts: 18
Joined: Wed Jun 27, 2012 10:44 am
Platform: Windows
Location: England

Sun Jul 08, 2012 7:53 am Post

I understand the big 'if'. I missed something when I wrote the originial wish - character sketch docs already have a unique attribute, the 'Character Notes' label, so perhaps that might help. So now you have two avenues to consider, plus instead of using the document name, you could use the associated synopsis title of character notes docs.

If you don't implement this feature, it is certainly not a show stopper for me. I won't be begging for it, this is just a nice-to-have feature. It is by far much more sensible than my other wish list idea, for Scrivener to recognise a usb device you attach to your finger (or other appendage) that gives you an electric shock if you have been staring at a blank document for more than two days, in the hope that it will remove writers block. Actually, the more I think about that idea, the more marketable it seems...
--
Very funny Scotty, now beam down my clothes!

User avatar
AmberV
Posts: 24411
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Sun Jul 08, 2012 9:17 pm Post

Well, the thing is many people don't use those project templates (they either start with blank or roll their own using our examples as starting ground), much less stick with the colour labels or the example sheets provided within them, and there are a lot of people in non-fiction and academia who wouldn't be using anything analogous. There are just too many ways to use the program, I think, to tie it down to something like this.

The USB electroshock therapy on the other hand---I can definitely see a lot of people getting behind that one.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
Dain
Posts: 34
Joined: Sat Mar 24, 2012 10:12 pm
Platform: Mac
Location: Somewhere on the highways of North America
Contact:

Sun Apr 14, 2013 11:08 pm Post

I was going to ask for something similar.... Being into Fantasy and Science Fiction, there are way too many characters, artifacts, concepts, locations, etc al that don't appear in the dictionary. There are also times when I don't want to just 'learn' a new dictionary with every new project either.

If doing it on the fly is an issue, perhaps you could script up a means to build a project-specific custom dictionary with all of the "proper nouns" from a selection of containers off the reference tree. Just run (or re-run) the routine whenever you update the contents of Characters, Locations, or other more customized containers.
Anyone can start a story. Most everyone can finish a story. It takes a writer to complete the middle.

User avatar
AmberV
Posts: 24411
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Mon Apr 15, 2013 4:15 am Post

But again, the problem on the Mac at least is that there is no real control over the spell checking engine. There is so little code of Scrivener's going on, that the menu you activate is Apple's and everything from there on out is Apple's, too. It's a tool we can turn on, much like you can turn on a feature in a program, just one level deeper. To make changes to it requires circumventing how it is designed to work, and that isn't the best way to go about making a program in most cases. I believe the situation is similar on Windows as well. They are providing their own spelling engine, but it's a third party thing you flip on with a switch and let it do its thing. To really get in there and make a custom spell check system, you have to write your own, and I'm afraid that's a bit over bar for what one developer can accomplish.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

br
brdv
Posts: 6
Joined: Wed Feb 20, 2013 3:39 am
Platform: Mac

Sat Apr 20, 2013 10:00 pm Post

For the technical issues, maybe you could extend or inherit the NSSpellChecker class? Probably need to patch-in per-Scrivener-project dictionary words, as you probably wouldn't want to add the Character Names/etc to the global=system-wide dictionary. Might be easiest to add them in as ignored-words at project-load, and then query for ignored-words and then special-case them if needed.

( I haven't done much cocoa-programming, and none with NSSpellChecker, so I'm probably underestimating the difficulty. But I decided to do a little research/thinking on this anyways, as this is similar to a part of something more ambitious I suggested a while ago.)

User avatar
Magycmyste
Posts: 34
Joined: Wed Nov 02, 2011 3:33 am
Platform: Windows

Sun Mar 09, 2014 8:02 am Post

Interesting. I know this has been discussed, but I wanted to throw my support behind this idea, because it's exactly what I was looking for. Basically, I was hoping there was a way for the dictionary to be able to read the titles of the character and location sheets and recognize them as proper nouns. Although, as Amber said earlier, if people don't use the template sheets in that manner, it would be harder to implement something that would work across the board, and would take away from the flexibility of the program.

I didn't realize that the dictionaries are built into the OS (I guess that's something I got used to in the many years of using Word to do my writing. I remember being able to make a document-specific dictionary, where my character names were added to the main dictionary. It made spellchecking SO much easier and faster, and I didn't accidentally ignore a real spelling error because I'd been hitting "ignore" so many times before). I'm on the Windows version, so I wasn't sure if the spellchecker was handled the same way there.

I do remember there being a browse option in the spellchecker (or in Word options?) where I did need to go in manually to change the dictionary file to the one I wanted to use for that document. It would default to the main one, usually, if I had opened another document in between, but stayed put if I closed the document, and reopened it again later. It would definitely be nice to be able to have something like that that Scrivener could use for custom words, that I could switch out for different projects. I don't usually want names and words I made up for one world to be counted as correctly spelled in another project, dealing with another world entirely. :)

Anyway, like I said, I know this idea had been discussed already, but just in case technology has changed enough to make something like this feasible, I wanted to bring the subject back up.

Tr
Trey_Bondar
Posts: 3
Joined: Thu Apr 03, 2014 5:34 pm
Platform: Mac + Windows

Thu Apr 03, 2014 5:55 pm Post

I really want to throw my support behind some kind of feature like this. I would be happy to just type all my proper names into a single document, maybe with a special name like "SpellingExceptions" or something. This would eliminate any need to tie into a template. I write science fiction and fantasy, so I have a lot of made up words. To me, the advantage of not tying it to the templates is that by putting everything in one document, it doesn't have to be a character, or a place. I have made up words for things that are neither places nor characters. Also, I would hate to have to create a character document just for the purpose of getting rid of a spelling error.

The idea of subclassing NSSpellChecker sounds promising, though I admit I have never looked at that class (I'm an iOS guy, and it's not in the iOS SDK). I am wondering if the list of words I propose, can be put into an array and passed via setIgnoredWords:inSpellDocumentWithTag:.

The other nice thing about it being a document, is if you write a series of books using the same universe/characters, you could just copy that one file to the new scriv project and you are good to go.

Tr
Trey_Bondar
Posts: 3
Joined: Thu Apr 03, 2014 5:34 pm
Platform: Mac + Windows

Thu Apr 03, 2014 6:42 pm Post

In researching this more, it looks pretty easy to control this aspect of the operating system.
https://developer.apple.com/library/mac ... lCheck.pdf

You just have to crank out a spell check service.
http://etutorials.org/Programming/Cocoa ... ellServer/

Actually, it is so simple, I may write this myself.

User avatar
AmberV
Posts: 24411
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Apr 03, 2014 7:07 pm Post

Is a service going to be able to drop in as substitute for on-the-fly underscoring, contextual menu integration and provide grammar checking as well? Services are on-demand extensions, so I can see how one could effectively create their own step by step spell checker with modifications made to the core system, but we'd definitely need to be able to provide the same level of support that currently exists in the software, rather than a utility you have to run. Personally, I prefer the latter as I find it less distracting to separate editing and writing, but most people cannot abide having their misspelled words go without immediate underlining. :)
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Tr
Trey_Bondar
Posts: 3
Joined: Thu Apr 03, 2014 5:34 pm
Platform: Mac + Windows

Thu Apr 03, 2014 7:24 pm Post

At this point, I am thinking of a utility that runs separate. Not ideal for some folks, but better than nothing.

User avatar
robertdguthrie
Posts: 3075
Joined: Mon Nov 09, 2009 10:06 pm
Platform: Mac
Location: St. Louis, MO, USA
Contact:

Thu Apr 03, 2014 7:37 pm Post

I'd certainly settle for an alternative spell checker that I run after I'm done writing. That's how I prefer to do things anyway, as I'm a terrible typist. If I can ignore my typos while I'm composing, but catch them afterward, it speeds up my writing tremendously. Of course the key feature I'm looking for is to isolate my personal word list to one project. Also, being able to add a words list en masse would be very nice, especially if you could just point it at a document and have it slurp up all of the words that the spell checking engine flagged as misspelled.
Often wrong, rarely in doubt.
Time for a change... I'm now rdale; same dog-avatar, same dog... channel?

User avatar
Mad Girl Disease
Posts: 367
Joined: Sat Jan 11, 2014 11:33 pm
Platform: Windows

Fri Apr 04, 2014 4:33 am Post

AmberV wrote:...but most people cannot abide having their misspelled words go without immediate underlining. :)


I find there are tradeoffs all around.

If I don't show spelling errors while I'm writing, I might not notice them, possibly until some time much later.

If I do show spelling errors and don't fix them as they happen, I find the red underlining distracting -- even though stopping to fix them at the time is a distraction of another kind.

The big downside to having spelling go unchecked is that spelling errors and typos reduce document and project searchability.

I don't know how things work on the Mac, but it seems that many Windows users don't use the extra "context" or "menu" key, on the right, between the Alt and Ctrl keys. This key completely eliminates the need to right click on spelling errors to correct them: as long as you are at or inside a misspelled word (and Show Errors is enabled) that key brings up the context-appropriate right-click menu, where in most cases the correct word is the first one in the list, and can be selected with just a quick Down and Enter sequence, or added to the dictionary with a single key press. This eliminates the need to move one hand to the mouse or trackpad, and is often faster than retyping the word. It's not ideal, but I find it makes fixing as I go less distracting and disruptive.

I do find it odd, and haven't seem any mention of this elsewhere, the way the Scrivener's red underlining disappears when the cursor is at or inside a misspelled word. That is itself kind of distracting, and more so than I might have guessed it would be. Is it just me?
Lead me not into user error.