Difference between revisions of "Using Apertium spellers with LibreOffice-Voikko on Debian"
m |
|||
(35 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
How to install libreoffice-voikko on Ubuntu/Debian |
How to install libreoffice-voikko on Ubuntu/Debian |
||
+ | See also [[/Manual compilation]]. |
||
− | ==Install Requirements== |
||
− | Install requirements from apt |
||
− | 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 |
||
− | Here any version of Python 3 can be used. |
||
− | == |
+ | ==Install prerequisites== |
+ | First add the repository by following [[Prerequisites for Debian]]. |
||
− | === Setup for Projectjj repo users === |
||
+ | Then install speller-prerequisites: |
||
− | If you are a [http://wiki.apertium.org/wiki/Prerequisites_for_Debian Projectjj repo] user then some of depedencies can be installed this way. |
||
− | Otherwise if things don't work for you, you can head over to next section. |
||
+ | sudo apt-get install libreoffice python3 git make sed findutils zip unzip pkg-config gettext \ |
||
− | Install using apt-get from the projectjj repo |
||
+ | libxml++2.6-dev libarchive-dev zlib1g-dev unzip automake autoconf libtool flex bison g++ libreadline-dev hfst \ |
||
− | sudo apt-get install hfst-ospell hfst-ospell-dev libvoikko-dev libvoikko1v5 voikko-fi |
||
+ | hfst-ospell hfst-ospell-dev libvoikko-dev |
||
+ | ==Install language module== |
||
− | === If not using Projectjj then Compile === |
||
+ | A language module supporting spelling may be installed, either from our repository, or by compiling it manually. Here we show how to install apertium-kaz package (Kazakh): |
||
− | 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 |
||
− | sudo make install |
||
− | Install |
+ | * Install the Kazakh package: |
− | 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=~/.voikko --with-dictionary-path=~/.voikko --enable-hfst; make |
||
− | 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== |
||
− | A language module supporting spelling may be installed, either from the projectjj repository, or by compiling it manually. Examples of both are provided that use the apertium-kaz module (Kazakh). |
||
− | |||
− | === From Projectjj repo === |
||
− | *Install the Kazakh module using apt-get from Projectjj repo. |
||
sudo apt-get install apertium-kaz |
sudo apt-get install apertium-kaz |
||
− | Copy the language module to directory |
||
− | cp /usr/share/apertium/apertium-kaz/kaz.zhfst ~/.voikko/kk.zhfst |
||
+ | Copy the speller data into your voikko data directory: |
||
− | === Or compile it === |
||
+ | cp /usr/share/apertium/apertium-kaz/kaz.zhfst ~/.voikko/3/kk.zhfst |
||
− | * Install Prerequisites |
||
− | Please go to [[Minimal installation from SVN]] to install a language pair. |
||
+ | If your language module does not have an apt-package, or you want to hack on the data yourself, see [[/Manual compilation#Install language module]]. |
||
− | *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 |
||
+ | === Test the speller from the command line === |
||
− | Copy the language module to directory |
||
− | cp kaz.zhfst ~/.voikko/kk.zhfst |
||
− | === Test The Spelling Module === |
||
echo "қазақша билмеймін" | tr ' ' '\n' | voikkospell -d kk -s |
echo "қазақша билмеймін" | tr ' ' '\n' | voikkospell -d kk -s |
||
− | The output |
+ | The output should be: |
C: қазақша |
C: қазақша |
||
W: билмеймін |
W: билмеймін |
||
Line 74: | Line 38: | ||
S: бөлмеймін |
S: бөлмеймін |
||
S: билемейміз |
S: билемейміз |
||
+ | |||
+ | |||
+ | ''Note'': If you get |
||
+ | <pre> |
||
+ | E: Initialižation of Voikko failed: No valid dictionaries were found |
||
+ | </pre> |
||
+ | then you might have to do |
||
+ | <pre>sudo apt-get remove libvoikko-dev |
||
+ | sudo apt-get autoremove</pre> |
||
+ | and install libvoikko from git as shown in [[/Manual_compilation#Libvoikko]] to get it to notice your dictionaries. Or wait until the newest libvoikko reaches the package repositories. |
||
==Install LibreOffice-Voikko== |
==Install LibreOffice-Voikko== |
||
− | === Install from Debian repo === |
||
− | Install using apt-get |
||
sudo apt-get install libreoffice-voikko |
sudo apt-get install libreoffice-voikko |
||
− | === |
+ | === Enable your language and speller === |
− | Get it |
||
− | git clone https://github.com/voikko/libreoffice-voikko |
||
+ | * Goto Tools>Options |
||
− | Change Directory and Compile |
||
+ | * Open Language Settings>Writing Aids |
||
− | cd libreoffice-voikko/ |
||
+ | * Click on Edit at the right side of Available modules section |
||
− | make oxt |
||
+ | * 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. |
||
+ | [[Image:Configuring Extension.png|600px]] |
||
− | Add the extension: |
||
− | *Open LibreOffice |
||
− | *Goto Tools>Extension Manager |
||
− | *Click on the Add button |
||
− | *Browse to libreoffice-voikko>build |
||
− | *Open voikko.oxt |
||
− | |||
− | [[File:Extension_Manager.png]] |
||
− | |||
− | *Goto Tools>Options |
||
− | *Open Language Settings>Writing Aids |
||
− | *Click on Edit at the right side of Available modules section |
||
− | *Change Language to Kazakh |
||
− | *Click Ok. |
||
− | *Close the Options dialog box. |
||
− | |||
− | [[File:Configuring Extension.png]] |
||
==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 |
+ | * Click More… and Select Kazakh |
− | [[ |
+ | [[Image:Language-LibreOffice.png|500px]] |
* Goto Tools>Options>Language |
* Goto Tools>Options>Language |
||
* 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. |
||
− | |||
− | [[File:Libre-Office-Voikko.png]] |
||
+ | [[Image:Libre-Office-Voikko.png|500px]] |
||
+ | == Problems == |
||
− | To get correct suggestions, Right click on the mistaken word and suggestions will appear in context menu. |
||
− | If there is any other problem, you can contact [http://wiki.apertium.org/wiki/Special:EmailUser/Jatinluthra14 me] or [http://wiki.apertium.org/wiki/Contact Apertium |
+ | If there is any other problem, you can contact [http://wiki.apertium.org/wiki/Special:EmailUser/Jatinluthra14 me] or [http://wiki.apertium.org/wiki/Contact Apertium community members]. |
[[Category:Documentation]] |
[[Category:Documentation]] |
||
+ | [[Category:Documentation in English]] |
||
[[Category:Spell checking]] |
[[Category:Spell checking]] |
Latest revision as of 12:21, 26 September 2016
How to install libreoffice-voikko on Ubuntu/Debian
See also /Manual compilation.
Contents
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 \ hfst-ospell hfst-ospell-dev libvoikko-dev
Install language module[edit]
A language module supporting spelling may be installed, either from our repository, or by compiling it manually. Here we show how to install apertium-kaz package (Kazakh):
- Install the Kazakh package:
sudo apt-get install apertium-kaz
Copy the speller data into your voikko data directory:
cp /usr/share/apertium/apertium-kaz/kaz.zhfst ~/.voikko/3/kk.zhfst
If your language module does not have an apt-package, or you want to hack on the data yourself, see /Manual compilation#Install language module.
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: билемейміз
Note: If you get
E: Initialižation of Voikko failed: No valid dictionaries were found
then you might have to do
sudo apt-get remove libvoikko-dev sudo apt-get autoremove
and install libvoikko from git as shown in /Manual_compilation#Libvoikko to get it to notice your dictionaries. Or wait until the newest libvoikko reaches the package repositories.
Install LibreOffice-Voikko[edit]
sudo apt-get install libreoffice-voikko
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.
Test your installation[edit]
- Click on the fourth tab in status bar to change language
- Click More… and Select Kazakh
- 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.
Problems[edit]
If there is any other problem, you can contact me or Apertium community members.