Difference between revisions of "Voikkospell"

From Apertium
Jump to navigation Jump to search
Line 43: Line 43:
====Unanalysed Word====
====Unanalysed Word====
<pre>
<pre>
$ echo '^a/*a$' | voikkospell --apertium-stream
$ echo -n '^a/*a$' | voikkospell --apertium-stream
W: a
W: a
</pre>
</pre>
Line 50: Line 50:
=====One Tag=====
=====One Tag=====
<pre>
<pre>
$ echo '^b/b<A>$' | voikkospell --apertium-stream
$ echo -n '^b/b<A>$' | voikkospell --apertium-stream
W: b
W: b
</pre>
</pre>
Line 56: Line 56:
=====More Than One Tag=====
=====More Than One Tag=====
<pre>
<pre>
$ echo '^c/c<B><C>$' | voikkospell --apertium-stream
$ echo -n '^c/c<B><C>$' | voikkospell --apertium-stream
W: c
W: c
</pre>
</pre>
Line 62: Line 62:
====Ambiguous Word====
====Ambiguous Word====
<pre>
<pre>
$ echo '^d/d<D>/d<E><F>$' | voikkospell --apertium-stream
$ echo -n '^d/d<D>/d<E><F>$' | voikkospell --apertium-stream
W: d
W: d
</pre>
</pre>
Line 69: Line 69:
=====One Word with Inner Inflection=====
=====One Word with Inner Inflection=====
<pre>
<pre>
$ echo '^e f/e<G># f/e<H><I># f$' | voikkospell --apertium-stream
$ echo -n '^e f/e<G># f/e<H><I># f$' | voikkospell --apertium-stream
W: e f
W: e f
</pre>
</pre>
Line 76: Line 76:
======Without Inner Inflection======
======Without Inner Inflection======
<pre>
<pre>
$ echo 'gh/g<J>+h<K><L>/g<M>+h<N>$' | voikkospell --apertium-stream
$ echo -n 'gh/g<J>+h<K><L>/g<M>+h<N>$' | voikkospell --apertium-stream
W: gh
W: gh
</pre>
</pre>
Line 82: Line 82:
======With Inner Inflection======
======With Inner Inflection======
<pre>
<pre>
$ echo '^i jk/i<O># j+k<P><Q>/i<R># j+k<S>$ ^lm n/l<T>+m<U># n/l<V>+m<W># n$' | \
$ echo -n '^i jk/i<O># j+k<P><Q>/i<R># j+k<S>$ ^lm n/l<T>+m<U># n/l<V>+m<W># n$' | \
voikkospell --apertium-stream
voikkospell --apertium-stream
W: i jk
W: i jk

Revision as of 12:14, 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 -n '^a/*a$' | voikkospell --apertium-stream
W: a

Analysed Words

One Tag
$ echo -n '^b/b<A>$' | voikkospell --apertium-stream
W: b
More Than One Tag
$ echo -n '^c/c<B><C>$' | voikkospell --apertium-stream
W: c

Ambiguous Word

$ echo -n '^d/d<D>/d<E><F>$' | voikkospell --apertium-stream
W: d

Multiwords

One Word with Inner Inflection
$ echo -n '^e f/e<G># f/e<H><I># f$' | voikkospell --apertium-stream
W: e f
More Than One Word
Without Inner Inflection
$ echo -n 'gh/g<J>+h<K><L>/g<M>+h<N>$' | voikkospell --apertium-stream
W: gh
With Inner Inflection
$ echo -n '^i jk/i<O># j+k<P><Q>/i<R># j+k<S>$ ^lm n/l<T>+m<U># n/l<V>+m<W># n$' | \
voikkospell --apertium-stream
W: i jk
W: lm n