Using Apertium spellers with LibreOffice-Voikko on Debian/Manual compilation

From Apertium
Jump to navigation Jump to search

How to install libreoffice-voikko on Ubuntu/Debian by compiling lots of it manually

This guide shows how to do things by manually compiling most of it manually.

You should be able to do make do with just packages from apt-get, so try that first: Using apertium spellers with libreoffice-voikko on Debian. But if one of the packages isn't working, (parts of) this guide may be helpful.

Install prerequisites[edit]

First add the repository by following Prerequisites for Debian.

Then install speller-prerequisites:

sudo apt-get install libreoffice python3 git make sed findutils zip unzip pkg-config gettext \
  libxml++2.6-dev libarchive-dev zlib1g-dev unzip automake autoconf libtool flex bison g++ libreadline-dev hfst

Manually compile other prerequisites[edit]

hfst-ospell[edit]

wget http://downloads.sourceforge.net/project/hfst/hfst/source/hfstospell-0.4.0.tar.gz
tar xvf hfstospell-0.4.0.tar.gz
cd hfstospell-0.4.0
./configure --enable-zhfst
make -j4
sudo make install

Libvoikko[edit]

sudo apt-get install hfst-ospell-dev

wget http://www.puimula.org/voikko-sources/libvoikko/libvoikko-4.0.tar.gz
tar xvf libvoikko-4.0.tar.gz
cd libvoikko-4.0
./autogen.sh
./configure --with-dictionary-path=$HOME/.voikko --enable-hfst
make -j4
sudo make install

You may also have to put

export LD_LIBRARY_PATH=/usr/local/lib

in your ~/.bashrc

voikko-fi[edit]

wget http://www.puimula.org/voikko-sources/voikko-fi/voikko-fi-2.0.tar.gz
tar xvf voikko-fi-2.0.tar.gz
cd voikko-fi-2.0
PATH=/usr/local/voikko/bin:$PATH make vvfst
sudo make vvfst-install DESTDIR=/usr/local/voikkodict

Install language module[edit]

This is based on Installation:

  • To install Kazakh language module, first get it
git clone https://github.com/apertium/apertium-kaz.git
cd apertium-kaz
./autogen.sh --enable-ospell
make -j4

Copy the speller data into your voikko data directory:

cp kaz.zhfst ~/.voikko/3/kk.zhfst

Test the speller from the command line[edit]

echo "қазақша билмеймін" | tr ' ' '\n' | voikkospell -d kk -s

The output should be:

C: қазақша
W: билмеймін
S: билеймін
S: білмеймін
S: билемеймін
S: бөлмеймін
S: билемейміз

Install LibreOffice-Voikko[edit]

git clone https://github.com/voikko/libreoffice-voikko
cd libreoffice-voikko/
make oxt

Add the extension:

  • Open LibreOffice
  • Goto Tools>Extension Manager
  • Click on the Add button
  • Browse to libreoffice-voikko>build
  • Open voikko.oxt

Extension Manager.png

Enable your language and speller[edit]

  • Goto Tools>Options
  • Open Language Settings>Writing Aids
  • Click on Edit at the right side of Available modules section
  • Change Language to Kazakh
    • Note: You may want to make sure no other spellers for the language are activated, such as hunspell.
  • Click Ok.
  • Close the Options dialog box.

Configuring Extension.png

Test your installation[edit]

  • Click on the fourth tab in status bar to change language
  • Click More… and Select Kazakh

Language-LibreOffice.png

  • Goto Tools>Options>Language
  • Choose Kazakh
  • Click Ok
  • Type "қазақша билмеймін"
  • A red wavy line will appear on билмеймін, meaning it's misspelled
  • To get correct suggestions, right-click on the mistaken word and suggestions will appear in context menu.

Libre-Office-Voikko.png


Problems[edit]

If there is any other problem, you can contact me or Apertium community members.