Difference between revisions of "Apertium-view"

From Apertium
Jump to navigation Jump to search
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  +
{{Github-unmigrated-tool}}
 
{{TOCD}}
 
{{TOCD}}
 
Apertium-view is a little program which can be used to view and edit the output of the various stages of an apertium translation.
 
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.
   
 
[[Image:Apertium-view-screenshot-1.png|thumb|300px|right|My hovercraft is full of eels.<br/>''Daar is palings in my skeertuig'']]
 
[[Image:Apertium-view-screenshot-1.png|thumb|300px|right|My hovercraft is full of eels.<br/>''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.
 
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 ==
  +
  +
* The [[D-Bus_service_for_Apertium|Apertium D-Bus Service]]
  +
* A working Apertium 3.0 installation (note: this must be installed)
  +
* The python bindings for the GTK SourceView V 2.0 module if you want syntax highlighting
   
 
== Getting apertium-view ==
 
== Getting apertium-view ==
  +
  +
'''Note:''' After Apertium's migration to GitHub, this tool is '''read-only''' on the SourceForge repository and does not exist on GitHub. If you are interested in migrating this tool to GitHub, see [[Migrating tools to GitHub]].
   
 
Check out the <code>apertium-tools/apertium-view</code> from the subversion repository.
 
Check out the <code>apertium-tools/apertium-view</code> from the subversion repository.
Line 12: Line 23:
 
== Running apertium-view ==
 
== Running apertium-view ==
   
  +
If you installed the D-Bus service for Apertium correctly, Apertium-view should just work (you should only have to run <code>python apertium-view.py</code>). If it fails to start up, then there might be a problem with your D-Bus setup. Have a look at the [[D-Bus_service_for_Apertium|D-Bus page]] for possible solutions, or come and ask for help in #apertium on irc.freenode.net.
=== Configuring apertium-view ===
 
  +
  +
=== Testing unreleased language pairs from source ===
  +
  +
You need to install your language pair it in /usr: <code>./configure --prefix=/usr; make; make install</code> (the last as root).
  +
If <code>make install</code> fails with <code>stat() './en-eo.mode': No such file or directory</code>, then try first <code>ln -s modes/* .</code>
  +
  +
==Feature requests==
  +
  +
* <s>Removing scrollbars when not wanted.</s>
  +
* <s>Allow users to set 'mark unknown words' or not.</s>
  +
* Automatically resizing panes to fill the screen (when others are minimised)
  +
* Syntax highlighting
  +
::tags are #aaaaaa, ^ and $ are #009900 { } are #999900 @ * # are #990000 and [] are #aaaaff
  +
* 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.
  +
* <s>Ability to detach windows (particularly input and output windows).</s>
  +
* Scroll panes down when they fill with more information.
  +
* Remember settings when closed.
   
  +
==Related software==
Edit the contents of <code>config.py</code> to reflect you installation setup.
 
<code>apertium_bin_path</code> is the path of the directory containing the Apertium executables. <code>apertium_dict_path</code> is the path to directory on your computer containing all of the compiled language pairs. On my computer it's <code>/usr/local/share/apertium</code>. This directory contains <code>apertium-en-af</code>, <code>apertium-en-ca</code>, etc.
 
   
=== Executing the program ===
 
   
  +
* [[Apertium-viewer]] is an improved version, which does not require dbus and which is written in Java
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.
 
   
  +
* [[Apertium-tolk]] is similar to, but much simpler than Apertium-view. It only has an input window and an output window. Where Apertium-view is aimed at developers, Apertium-tolk is intended to be as user friendly as possible.
The format is
 
<pre>
 
$ apertium-view-py <language code> <modes file path> [<mode code>]
 
</pre>
 
   
  +
[[Category:Tools]]
The language code is something like <code>en-af</code> or <code>en-ca</code>. 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.
 
  +
[[Category:User interfaces]]

Revision as of 02:17, 9 March 2018

Note: After Apertium's migration to GitHub, this tool is read-only on the SourceForge repository and does not exist on GitHub. If you are interested in migrating this tool to GitHub, see Migrating tools to GitHub.

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

  • The Apertium D-Bus Service
  • A working Apertium 3.0 installation (note: this must be installed)
  • The python bindings for the GTK SourceView V 2.0 module if you want syntax highlighting

Getting apertium-view

Note: After Apertium's migration to GitHub, this tool is read-only on the SourceForge repository and does not exist on GitHub. If you are interested in migrating this tool to GitHub, see Migrating tools to GitHub.

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

Running apertium-view

If you installed the D-Bus service for Apertium correctly, Apertium-view should just work (you should only have to run python apertium-view.py). If it fails to start up, then there might be a problem with your D-Bus setup. Have a look at the D-Bus page for possible solutions, or come and ask for help in #apertium on irc.freenode.net.

Testing unreleased language pairs from source

You need to install your language pair it in /usr: ./configure --prefix=/usr; make; make install (the last as root). If make install fails with stat() './en-eo.mode': No such file or directory, then try first ln -s modes/* .

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
tags are #aaaaaa, ^ and $ are #009900 { } are #999900 @ * # are #990000 and [] are #aaaaff
  • 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).
  • Scroll panes down when they fill with more information.
  • Remember settings when closed.

Related software

  • Apertium-viewer is an improved version, which does not require dbus and which is written in Java
  • Apertium-tolk is similar to, but much simpler than Apertium-view. It only has an input window and an output window. Where Apertium-view is aimed at developers, Apertium-tolk is intended to be as user friendly as possible.