Difference between revisions of "Using Apertium spellers with LibreOffice-Voikko on Debian/Manual compilation"

From Apertium
Jump to navigation Jump to search
(Created page with "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 b...")
 
Line 53: Line 53:
 
cp kaz.zhfst ~/voikko/3/kk.zhfst
 
cp kaz.zhfst ~/voikko/3/kk.zhfst
   
=== Test The spelling module ===
+
=== Test the speller from the command line ===
  +
 
echo "қазақша билмеймін" | tr ' ' '\n' | voikkospell -d kk -s
 
echo "қазақша билмеймін" | tr ' ' '\n' | voikkospell -d kk -s
   
Line 82: Line 83:
 
=== Enable your language and speller ===
 
=== Enable your language and speller ===
   
*Goto Tools>Options
+
* Goto Tools>Options
*Open Language Settings>Writing Aids
+
* Open Language Settings>Writing Aids
*Click on Edit at the right side of Available modules section
+
* Click on Edit at the right side of Available modules section
*Change Language to Kazakh
+
* Change Language to Kazakh
Note: You may want to make sure no other spellers for the language are activated, such as hunspell.
+
** Note: You may want to make sure no other spellers for the language are activated, such as hunspell.
*Click Ok.
+
* Click Ok.
*Close the Options dialog box.
+
* Close the Options dialog box.
   
 
[[Image:Configuring Extension.png|600px]]
 
[[Image:Configuring Extension.png|600px]]
Line 94: Line 95:
 
==Test your installation==
 
==Test your installation==
   
*Click on the fourth tab in status bar to change language
+
* Click on the fourth tab in status bar to change language
*Click More.. and Select Kazakh
+
* Click More… and Select Kazakh
   
 
[[File:Language-LibreOffice.png]]
 
[[File:Language-LibreOffice.png]]
Line 102: Line 103:
 
* Choose Kazakh
 
* Choose Kazakh
 
* Click Ok
 
* Click Ok
* Type қазақша билмеймін
+
* Type "қазақша билмеймін"
* A red wavy line will appear on билмеймін,meaning it's misspelled
+
* 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.
+
* To get correct suggestions, right-click on the mistaken word and suggestions will appear in context menu.
 
[[File:Libre-Office-Voikko.png]]
 
[[File:Libre-Office-Voikko.png]]
   

Revision as of 15:01, 3 February 2016

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

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

Install hfst-ospell

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

Install libvoikko

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 --prefix=$HOME/.voikko --with-dictionary-path=$HOME/.voikko --enable-hfst
make -j4
sudo make install

Install voikko-fi

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

This is based on Minimal installation from SVN:

  • To install Kazakh language module, first get it
svn co https://svn.code.sf.net/p/apertium/svn/languages/apertium-kaz/
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

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

The output should be:

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

Install LibreOffice-Voikko

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

  • 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

  • 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

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