Apertium-view

From Apertium
Jump to navigation Jump to search

Apertium-view is a little program which can be used to view and edit the output of the various stages of an apertium translation.

The various stages update while you type, and a change made in any one pane updates the subsequent stages.

My hovercraft is full of eels.
Daar is palings in my skeertuig

Currently, the program is in its early stages and it will take some time before it becomes fully usable. But if you are a developer with some knowledge of Python and PyGTK, you can already dive in.

What you need

  • Python ElementTree (in Debian and Ubuntu this package is called python-celementtree
  • A working Apertium installation (note: this must be installed)

Getting apertium-view

Check out the apertium-tools/apertium-view from the subversion repository.

Running apertium-view

Configuring apertium-view

Edit the contents of config.py to reflect you installation setup. apertium_bin_path is the path of the directory containing the Apertium executables. apertium_dict_path is the path to directory on your computer containing all of the compiled language pairs. On my computer it's /usr/local/share/apertium. This directory contains apertium-en-af, apertium-en-ca, etc.

Executing the program

Apertium-view is very user-hostile at the moment and it won't even properly tell you what you did wrong if you pass it the wrong flags.

The format is

$ python apertium-view.py <language code> <modes file path> [<mode code>]

The language code is something like en-af or en-ca. The modes path is the path to your modes XML file. The mode code is optional and refers to the name of a mode in the modes file; if you omit it, the first mode is used.

Feature requests

  • Removing scrollbars when not wanted.
  • Allow users to set 'mark unknown words' or not.
  • Automatically resizing panes to fill the screen (when others are minimised)
  • Syntax highlighting
  • Moving chunks as units rather than text.
  • Configuration / choosing language pair in the GUI.
  • Option to be able to click on an analysis to remove it. (basically, when you click in between / /, it removes the part in between. Would need CTRL+Z to be able to restore analyses (see below).
  • Some kind of undo on a per text-pane/stage basis.
  • Ability to detach windows (particularly input and output windows).