OCR Import Custom Dictionary

DEVONthink 4.1 on Tahoe 26.0.1

I have created a text file of around 600 “special” words specific to my 19th-century scanned documents that OCR frequently mis-identifies. I’ve noticed that Settings→OCR caters for a custom dictionary but there is no “import file” function only a “enter each word one by one”.

I found this posting regarding the same but for DT3:

DT3 OCR Dictionary import

How do I import my list of words into a custom dictionary for OCR in DT4?

Thanks

dp

1 Like

Copy your data with Cmd-C and paste it with Cmd-V – doesn’t that work?

Apologies. I should have said that I had already tried this. It only adds the first word from the copied list of words.

The easiest way is to copy the file from DT3. To do this:

  1. In Finder select the menu Go→Go to Folder, copy and past the the line below and press Go.
    ~/Library/Application Support/DEVONthink 3

  2. Copy the file called UserOCRDictionary.plist

  3. Select the menu Go→Go to Folder, copy and past the the line below and press Go.
    ~/Library/Application Support/DEVONthink

  4. If a UserOCRDictionary.plist file already exists in this folder, rename it to UserOCRDictionaryOld.plist, then paste the DT3 file in to this folder.

2 Likes

I appreciate that editing system plists brings an element of risk and is very frequently frowned upon, but I found the following file that with the assistance of my favourite plist/text editor I can add custom words to (with the appropriate prefix and suffix )

~/Library/Application Support/DEVONthink/UserOCRDictionary.plist

After adding a word and saving the file, I open the custom OCR dictionary and see my added word is present:

Here is the OCR custom dictionary GUI after further edits…

(also removing a word from the OCR custom dictionary GUI also removes it from the aforementioned plist.

I know it’s naughty, reckless, irresponsible and it might break somewhere down the line and that someone, somewhere is shaking their head disapprovingly, but in the absence of a fully functioning import facility, it does appear to work….

Edit: clarity

1 Like

My post crossed with yours! But in essence that’s exactly what I have done.