Removing Words From a Custom Dictionary

On with the troubleshooting adventure walkthrough…

Microsoft Designer: Image Creator Prompt

Please create an eye-catching image for a blog post about issues with Google Chrome’s spell check functionality. The design should include elements that represent a frustrated user interacting with a computer, alongside visual cues related to spell checking (like a dictionary, misspelled words highlighted in red, and an interface showing browser settings). The color scheme should be modern and tech-oriented, with a clean layout that draws attention to the main theme: the challenges of managing custom dictionaries in web browsers.

How do I remove a misspelled word that I added to the dictionary? I fumbled and added a word to my dictionary that shouldn’t be there.

“Undo” just removes the typed word. What dictionary did it get added to? The Google Chrome browser, Mac operating system, Google profile… where? Just for good measure, I added “lewiebad” as a word in the dictionary as well for an easier custom word to spot.

The settings in my Google Chrome browser don’t offer much in the way of spell checking. It’s a basic spell check.

I’ve tried searching my settings for “words”, “spelling”, “dictionary”, and “custom”.

Let’s see if Mac dictionary has it.

No custom misspellings in Mac dictionary

Let’s check to see if our Google Profile has it.

Google Docs -> open/create a document -> Tools -> Spelling & Grammar -> Personal Dictionary
No custom words in Google Docs Personal Dictionary

So… the custom dictionary is a blackhole. What’s on the file system?

cd ~/Library/Application\ Support/Google/Chrome/Default/
ls
# Custom Dictionary.txt
# Custom Dictionary.txt.backup
nano Custom\ Dictionary.txt

We found it! It looks like everything here is misspelled. I don’t like the looks of the checksum. Is that going to cause problems if I attempt to modify the file? I removed all lines except the checksum. Time to restart chrome.

All misspellings are still accepted. Loading the file again, all of the words have returned. Did the browser write to the file before it closed? Let’s stop the browser first before saving.

Ok, restarting the browser, it thinks “lewiebad” is still acceptable, but the Custom Dictionary.txt has been confirmed to have nothing in it, as well as Custom Dictionary.txt.backup. I went up a folder out of “Default” and checked all profiles 1 through 5. None of them have a custom dictionary. So dictionaries are system-based, not profile-based.

I added a new word. Lets see what that file looks like now.

This is just weird. “Lewiebad” was still acceptable, but it’s not in the file. Is there another file being cached, or associated with the profile?

Digging deeper, I saw that the /Guest Profile/ folder also has a custom dictionary, but it’s empty except for the checksum. Hunting a bit more, I found that no other files exist under the Chrome directory for “Custom Dictionary.txt”.

So somehow, quitting Google Chrome, modifying the files, and starting Chrome up again, it’s preserving the old custom words somewhere – but where? Maybe I need to restart the operating system.

Nope. The custom words are still being preserved somewhere. Cache? Wait… is there also a WordPress dictionary? I’m not seeing anything under the sites settings such as “Writing”. The JetPack plugin configuration doesn’t mention anything about spelling, but I’m seeing references in the generated source code when editing a post. Let’s compare another website known for spell checking.

Gmail
WordPress
Custom Dictionary.txt

Ok… is it thinking that “lewiebad” is related to “leiweibad3”? I purposefully misspelled it to try and get one to highlight red while the new one should be good. Let’s try some of the bad words that were previously in there:

mamel relavent vomet discernable

WordPress highlights none of them, but Gmail does.

GMail
WordPress

Now wait a minute… somethings off with GMail when I change the lines.

Why is mamel no longer underlined? Is spelling context based? Are grammar rules at play?

GMail
WordPress

Perhaps grammar is at play. I don’t get why “discernable” isn’t picked up as being misspelled. Maybe GMail has its own spell checking in place. Let’s try doing it raw.

Well, something is off. It looks like some kind of non-standard spaces were being used when I copied the text from Gmail. After the correction, I’m not seeing any spell checking from the browser. Let’s make it an editable div tag.

Editable html tags with spellcheck
<!doctype html>
<html lang="en">
<body>
  <style>
    div {
      width: 300px;
      white-space: pre-wrap;
      border: 1px solid black
    }
  </style>
  <textarea spellcheck="true" cols="40" rows="8">
Comparing relavant vs relevant.
Comparing lewiebad vs lewie bad.
Comparing lewiebad2 vs lewie bad 2.
Comparing leiweibad3 vs lewie bad 3.
Comparing mamel vs mammal.
Comparing relavent vs relevant.
Comparing vomet vs vomit.
Comparing discernable vs discernible.
  </textarea>
  <div spellcheck="true" contenteditable="true">
    Comparing relavant vs relevant.
    Comparing lewiebad vs lewie bad.
    Comparing lewiebad2 vs lewie bad 2.
    Comparing leiweibad3 vs lewie bad 3.
    Comparing mamel vs mammal.
    Comparing relavent vs relevant.
    Comparing vomet vs vomit.
    Comparing discernable vs discernible.
  </div>
</body>
</html>

I’m not getting anything… Do I need to deploy it to a website running https? No difference. Why isn’t the browser picking up on the spelling errors? Lets see… WordPress seems to have the same issue. It’s not seeing the errors when listed out. Let’s try it with text that WordPress does highlight spelling errors in.

What do you know? We got something working… so Gmail seems to bypass the Google Chrome spell checking somehow, and WordPress seems to use the standard browser spell checking. Good to know.

We still have a problem. Why isn’t the rest of the bad words showing up as errors? I think it all boils down to grammar rules. Let’s use the misspelled words in “normal” sentences.

Original Custom Dictionary words not highlighted: Relavent, Discernable, mamel, vomet, lewiebad, leiweibad3
Control: misspelled “Relavant” was never in the custom dictionary

Maybe it’s not grammar. It’s not picking up on any of the old custom dictionary words that have since been removed. I think I’m at an impasse. I’ve spent too much time trying to work out how to remove words accidentally added to the browsers dictionary. Quitting Google Chrome, clearing out “Custom Dictionary.txt”, and restarting both the browser and the operating system doesn’t have an effect. I’ve dug through the Google Profile dictionary and operating system. I am out of ideas.

Well, here’s something different. Once I have a highlighted word, the Spelling and Grammar dialog is populated. (Edit -> Spelling and Grammar -> Show Spelling and Grammar)

And rite there, for “relavant”, it’s suggesting my old misspelling of “relavent” in addition to the correct “relevant”. Where is it getting the data?

Maybe I need to clear my browser cache. Now that all of my cookies, history, and everything else have gone *poof*, let’s see where we are.

I see a slight difference. My name, “lewie” is now highlighted as being misspelled. “Relavent” is still being suggested by the spelling and grammar dialog.

Restarting Google Chrome isn’t helping. Let’s hone in on localization and change our html tags language attribute to en-US. Maybe we are being a bit too generic.

en-US color vs en-GB colour

The spell checking recognizes that spellings from the United Kingdom (GB = Great Britain) are not valid in the United States with “color” vs “colour”. So it’s not a regional setting.

Perhaps its time to file a bug report.

Send Feedback to Google

Custom Dictionary Changes Not Reflected in Google Chrome Spell Check

Summary: When removing misspelled words from the “Custom Dictionary.txt” file, Google Chrome continues to recognize those words as correct even after clearing the cache and restarting the OS. Additionally, Gmail uses a different spell-check mechanism than standard text inputs in Chrome.

Details:

Issue: Added incorrect words to the browser’s custom dictionary; attempting to remove them from “Custom Dictionary.txt” does not update the spell check.
Troubleshooting Steps Taken:

  • Verified the contents of “Custom Dictionary.txt” in the application support folder in Default, Guest, and all Profiles.
  • Confirmed that the dictionary is not populated in the Google Docs personal dictionary or Mac dictionary.
  • Tested spell-check behavior across different platforms (Gmail, WordPress, localhost, and on a secure domain).
  • Attempted to modify and restart Chrome multiple times without effect.
  • Restarted operating system with no effect
  • Cleared browser cache and cookies, but old misspellings still appear.
    Findings:

Google Chrome appears to cache or store custom words in a location not visible to users, leading to confusion.
Spell check functionality seems inconsistent, with Gmail and WordPress exhibiting different behaviors regarding custom words.
Expected Behavior: When a word is removed from “Custom Dictionary.txt,” it should no longer be recognized by Chrome’s spell check.

Recommendation: Investigate how Google Chrome caches custom dictionary entries and ensure that changes in “Custom Dictionary.txt” are properly reflected in the spell check across all platforms.

Full troubleshooting steps of the issue encountered is on the blog post: https://lewismoten.com/2024/10/21/removing-words-from-a-custom-dictionary/

Discover more from Lewis Moten

Subscribe now to keep reading and get access to the full archive.

Continue reading