Difference between revisions of "Apertium-tolk"
Line 46: | Line 46: | ||
Unable to guess signature from an empty dict |
Unable to guess signature from an empty dict |
||
</pre> |
</pre> |
||
===Install dbus-x11=== |
|||
===Python encodings=== |
===Python encodings=== |
||
Line 65: | Line 69: | ||
sys.setdefaultencoding('utf-8'); |
sys.setdefaultencoding('utf-8'); |
||
</pre> |
</pre> |
||
===Machine grinds to a halt=== |
|||
This is probably because either you're running apertium-tolk on an old machine, or the machine is heavily loaded, if you look in your process list (<code>$ ps axu</code>) you will probably see many instances of Apertium running. |
|||
You can kill them using: |
|||
<pre> |
|||
$ ps ax | grep modes\/ | cut -f2 -d' ' | xargs kill |
|||
</pre> |
|||
Unfortunately the only ways to stop this are either, decrease load on your current machine, buy a new machine or fix the code. Its a known issue, and we're working on it, but we could always do with some help :) |
|||
==Related software== |
==Related software== |
Revision as of 12:56, 29 February 2008
apertium-tolk[1] is a program which translates as you type.
What you need
- The Apertium D-Bus Service
- A working Apertium 3.0 installation (note: this must be installed)
Getting apertium-view
- Debian
There are debian packages available here. Note: any language pair you want to use will need to be installed from a Debian package as well.
- SVN
Check out the apertium-tolk
from the subversion repository.
Feature requests
- Focus on text entry box, not on exit button
- Tooltip to say "type text in this box to translate".
- Alternatively, just put text in the box that disappears when you click.
Troubleshooting
Restart D-Bus
The solution to both of the problems below is typically to restart D-Bus. You can do this on Debian and Ubuntu by issuing the following command:
$ sudo /etc/init.d/dbus restart
- Method does not exist
org.freedesktop.DBus.Error.UnknownMethod: Method "translate" with signature "a{ss}s" on interface "org.apertium.Mode" doesn't exist
- Unable to guess signature
ERROR:dbus.connection:Unable to set arguments ({}, 'A') according to signature None: exceptions.ValueError: Unable to guess signature from an empty dict Unable to guess signature from an empty dict
Install dbus-x11
Python encodings
If you get the following error, it means that for some reason UTF-8 is not the default encoding on your system:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 1: ordinal not in range(128)
You can fix this by making a sitecustomize.py
file in either /usr/lib/python2.5/site-packages/
or /usr/lib/python2.4/site-packages/
(whichever corresponds to your version of Python) with the following contents:
# sitecustomize.py # this file can be anywhere in your Python path, # but it usually goes in ${pythondir}/lib/site-packages/ import sys; sys.setdefaultencoding('utf-8');
Machine grinds to a halt
This is probably because either you're running apertium-tolk on an old machine, or the machine is heavily loaded, if you look in your process list ($ ps axu
) you will probably see many instances of Apertium running.
You can kill them using:
$ ps ax | grep modes\/ | cut -f2 -d' ' | xargs kill
Unfortunately the only ways to stop this are either, decrease load on your current machine, buy a new machine or fix the code. Its a known issue, and we're working on it, but we could always do with some help :)
Related software
- Apertium-view is a similar, but more complicated GUI tool which shows you every stage of the Apertium pipeline.
Notes
- ↑ No, this isn't a spalling mistake