Ask Your Question

How to take a word list of a new language and make it a spell dictionary [closed]

asked 2018-08-30 10:42:35 +0200

Robert H gravatar image

updated 2020-08-02 21:04:13 +0200

Alex Kemp gravatar image

I want to make a spell dictionary for a language that is not available in LibO to spell check documents in that language. I can get an empty .dic file to appear in Libreoffice/4/user/wordbook, but I cannot simply replace the empty file with the same file populated with all the words in it. It always replaces it with an empty one. Do I need to put the file some other place? Thanks, Robert

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2020-08-02 21:05:42.280789

1 Answer

Sort by » oldest newest most voted

answered 2018-08-30 13:46:55 +0200

gabix gravatar image

You have to create an extension. Such an extension is a ZIP archive and includes a dictionary file, an affix file in the Hunspell format (the latter may be empty but must be present anyway), as well as some auxiliary files. I know no guidance about creating such extensions and can only recommend to study existing extensions.

edit flag offensive delete link more


So is there any guidance as to how to build a dictionary extension?

Robert H gravatar imageRobert H ( 2018-08-30 15:16:25 +0200 )edit

Consult the hunspell documentation - Google is your friend.

floris v gravatar imagefloris v ( 2018-08-30 15:58:09 +0200 )edit

I doubt that the Hunspell documentation contains information on packaging LibreOffice extensions.

gabix gravatar imagegabix ( 2018-08-30 19:10:29 +0200 )edit

I doubt it as well. But it does contain information about making the required dictionary files. Fascinating read.

floris v gravatar imagefloris v ( 2018-08-30 21:12:09 +0200 )edit

The asker has already made a dictionary, as I understand, but doesn't know how to enable it in LibreOffice. So, the Hunspell documentation will be a waste of time for him for the moment, while may be very useful for prospective.

gabix gravatar imagegabix ( 2018-08-31 08:35:13 +0200 )edit

The question is, how to do it so that LibO does not replace the 9000 word .dic file in /wordbook with an empty .dic file.

Robert H gravatar imageRobert H ( 2018-08-31 09:47:04 +0200 )edit

That is a wrong question. Yes, you can add a 9000 word list to a custom dictionary provided that you include a relevant header such as:

lang: <none>
type: positive

The matter is that the custom dictionary will be useless without a main dictionary because LibreOffice won't check spelling for a language without a main dictionary.

gabix gravatar imagegabix ( 2018-08-31 10:09:23 +0200 )edit

The header is at the top of the 9000 words. The thing is I can create a spell dictionary one word at a time, by having the word list in an .odt file and running the spell checker. So why can't I just replace that dictionary with my fuller dictionary.

Robert H gravatar imageRobert H ( 2018-08-31 10:32:58 +0200 )edit

You can replace. If there is a problem, there must be something wrong with your file.

Also read this discussion:

gabix gravatar imagegabix ( 2018-08-31 10:43:17 +0200 )edit

The file is in UTF-8 and looks like this: OOoUserDict1 lang: <none> type: positive a A á Á à À ǎ aa Aa áa Áa àa Àa âa aamɛɛn ǎan aayi Aayi Afàʼ Affo Áfílíkà Afómtè Afùɔ afùu Afùu afÿɛ agáʼ agí Agí ... You link refers to somebody wanting to merge four dictionaries of the same language into. What I want to do is have a custom dictionary for this African language.

Robert H gravatar imageRobert H ( 2018-08-31 11:48:47 +0200 )edit

Question Tools

1 follower


Asked: 2018-08-30 10:42:35 +0200

Seen: 162 times

Last updated: Aug 30 '18