Difference between revisions of "Voikkospell"

From Apertium
Jump to navigation Jump to search
Line 43: Line 43:
 
====Unanalysed Word====
 
====Unanalysed Word====
 
<pre>
 
<pre>
$ echo '^Voikko/*Voikko$' | voikkospell --apertium-stream
+
$ echo '^a/*a$'
C: Voikko
+
W: a
 
</pre>
 
</pre>
   
====Analysed Word====
+
====Analysed Words====
 
<pre>
 
<pre>
  +
# one tag
$ echo '^data/data<n>$' | voikkospell --apertium-stream
+
$ echo '^c/c<e>$ | voikkospell --apertium-stream
C: data
 
  +
W: c
  +
# more than one tag
  +
$ echo '^d/d<f><g>$' | voikkospell --apertium-stream
  +
W: d
 
</pre>
 
</pre>
  +
  +
====Ambiguous Words
   
 
[[Category:Spellchecking]]
 
[[Category:Spellchecking]]

Revision as of 11:43, 15 December 2015

Installation

m5w/corevoikko, a fork of corevoikko, supports apertium stream format.

To clone it, execute the following command:

git clone https://github.com/m5w/corevoikko.git corevoikko

First, install libvoikko's dependencies. Next, execute the following commands:

cd corevoikko/libvoikko
./configure
make
sudo make install

If you do not have root privileges or would like to specify where to install libvoikko, execute the following instead: (Otherwise, you are finished with installation.)

cd corevoikko/libvoikko
PREFIX="$HOME/install/corevoikko" # e.g.
./configure --prefix="$PREFIX"
make
make install

Finally, add your "$PREFIX" to your "$PATH" by appending the following lines to your .profile:

PREFIX="$HOME/install/corevoikko" # e.g.
if [ -d "$PREFIX" ]; then
        export PATH="$PREFIX/bin:$PATH"
fi

Using voikkospell with apertium Stream Format

Invoke voikkospell with --apertium-stream.

Unlike in normal voikkospell usage, each word does not need to be on its own line.

Examples

Unanalysed Word

$ echo '^a/*a$'
W: a

Analysed Words

# one tag
$ echo '^c/c<e>$ | voikkospell --apertium-stream
W: c
# more than one tag
$ echo '^d/d<f><g>$' | voikkospell --apertium-stream
W: d

====Ambiguous Words