libreofficehunspelllibreoffice-basiclibreoffice-writer

Location of custom dict


I followed all instructions mentioned here:

https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=33297

The file "dict-en_US_private.zip" is working as expected.

But custom dict "en_US_private" does not show up anywhere in spelling options. Is the file hidden or not editable?


Update:

The file is working as expected means - after installing this dictionary, if I type a word “abactinal” it is not underlined. (because it is the part of that custom dict). The locale of this extension is “en-us” and it nicely integrates with current wordlist. The file works in Libre office without any modifications even after 10 years. It is a miracle in itself considering the fast-paced development of modern software. It shows very strong support for backward compatibility and that is very important in my opinion. If you want to try, download the file, rename it to xyz.oxt using windows command prompt and double click to run or unzip to open. The question is - there is no way to remove or add a word to this. For e.g. if I need to remove a single word “abactinal” then the only option is to uninstall, modify the source and reinstall the extension. Right? Why does it not show up when I go to Tools – Spelling – Options? Is there any option to make sure that it does not go into the unknown default location and instead is installed in my custom dict folder (..\AppData\Roaming\LibreOffice\4\user\wordbook) ? And by the way what is that “unknown default location” where I can see this file “en_US_private.dic”?


Update 2:

Is it possible to save the file en_US_private.dic (and .aff) to ..\LibreOffice\4\user\wordbook using an extension but without writing a script? If the answer is No, then where can I get a sample script?


Solution

  • To be clear I am using OpenOffice, not LibreOffice but results are consistent with your description above.

    The custom dictionary 'en_US_private.dic' should be found in the following folder

    '..\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\<random>.tmp_\dict-en_US_private.oxt\'
    

    You may not be aware the error log '..\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\log.txt' shows the following error while installing the dictionary extension. It appears to have issues.

    ###### Progress log entry 2023-01-08 16:08:40 ######
    ERROR: (com.sun.star.lang.IllegalArgumentException) { { Message = "There is no such extension deployed: en_US_private", Context = (com.sun.star.uno.XInterface) @7d51170 }, ArgumentPosition = (short) -1 }
    ERROR: (com.sun.star.lang.IllegalArgumentException) { { Message = "There is no such extension deployed: en_US_private", Context = (com.sun.star.uno.XInterface) @7d51170 }, ArgumentPosition = (short) -1 }
    ERROR: (com.sun.star.lang.IllegalArgumentException) { { Message = "There is no such extension deployed: en_US_private", Context = (com.sun.star.uno.XInterface) @7d51170 }, ArgumentPosition = (short) -1 }
    Copying: dict-en_US_private.oxt
    

    But that doesn't really help you, since only user defined dictionaries can be edited within the program. You are correct that you need a wordlist in ..\LibreOffice\4\user\wordbook

    Are you aware you can just copy a UTF-8 text file with the extension '.dic' in the following format to that directory then restart the program?

    OOoUserDict1 
    lang: <none> 
    type: positive
    --- 
    abactinal
    abambulacral
    abapertural
    

    After restarting go to 'user-defined dictionaries' and check it to enable. This enables you to easily add entries in bulk with a text editor and remove entries via the LibreOffice settings.