Difference between revisions of "Apertium-viewer"

From Apertium
Jump to navigation Jump to search
Line 1: Line 1:
 
{{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-viewer 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.
 
The various stages update ''while you type'', and a change made in any one pane updates the subsequent stages.
Line 12: Line 12:
 
* Java JDK 1.6
 
* Java JDK 1.6
   
== Getting apertium-view ==
+
== Getting and running apertium-viewer ==
   
Executable JAR: http://javabog.dk/filer/ApertiumView.jar
+
Executable JAR (old): http://javabog.dk/filer/ApertiumView.jar
 
ZIP file (newer): http://javabog.dk/filer/apertium-viewer.zip
   
Source code (Netbeans project): http://javabog.dk/filer/ApertiumView.zip
 
   
 
== Running apertium-viewer ==
<!-- Check out the <code>apertium-tools/apertium-view</code> from the subversion repository. -->
 
   
 
Running the binary: Just double-click on apertium-viewer.jar
== Running apertium-view ==
 
 
Just double-click on ApertiumView.jar
 
   
 
It this don't work, type
 
It this don't work, type
Line 29: Line 27:
 
</pre>
 
</pre>
 
from the command line
 
from the command line
  +
  +
cd apertium-viewer
  +
ant
  +
  +
== Getting and compiling apertium-viewer from source ==
  +
  +
Check out the source code (Netbeans project) from the subversion repository ( <code>apertium-tools/apertium-viewer</code>)
  +
  +
<pre>
  +
svn co https://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium-viewer
  +
cd apertium-viewer
  +
ant
  +
ant run
  +
</pre>
   
 
=== Testing unreleased language pairs from subversion ===
 
=== Testing unreleased language pairs from subversion ===
  +
   
 
You don't need to install your language pair anywhere to use it. Just choose File | Load mode and select the mode file from the language pair.
 
You don't need to install your language pair anywhere to use it. Just choose File | Load mode and select the mode file from the language pair.
Line 66: Line 79:
   
 
* [[Apertium-view]] is a somewhat simpler version of the same program and coded in Python instead of Java and dequires dbus.
 
* [[Apertium-view]] is a somewhat simpler version of the same program and coded in Python instead of Java and dequires dbus.
* [[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.
+
* [[Apertium-tolk]] is similar to, but much simpler than Apertium-viewer. It only has an input window and an output window. Where Apertium-viewer is aimed at developers, Apertium-tolk is intended to be as user friendly as possible.
   
 
[[Category:Tools]]
 
[[Category:Tools]]

Revision as of 12:45, 3 October 2008

Apertium-viewer 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.

A screen shot. Some stages are hidden (split panes have been moved togehter)

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 Java, you can already dive in.

What you need

  • Java JDK 1.6

Getting and running apertium-viewer

Executable JAR (old): http://javabog.dk/filer/ApertiumView.jar ZIP file (newer): http://javabog.dk/filer/apertium-viewer.zip


Running apertium-viewer

Running the binary: Just double-click on apertium-viewer.jar

It this don't work, type

java -jar ApertiumView.jar

from the command line

cd apertium-viewer ant

Getting and compiling apertium-viewer from source

Check out the source code (Netbeans project) from the subversion repository ( apertium-tools/apertium-viewer)

svn co https://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium-viewer
cd apertium-viewer
ant
ant run

Testing unreleased language pairs from subversion

You don't need to install your language pair anywhere to use it. Just choose File | Load mode and select the mode file from the language pair.

Opening a mode file


Features

  • Allow users to set 'mark unknown words' or not (Alt-M)
  • Automatically resizing panes (Fit text button, Alt-I). Stages with unchanged text are automatically collapsed.
  • Alt-0 brings focus to the first pane (input), Alt-1 to the second, etc. Alt-9 brings focus to the last (output). It autoscrolls to make the panes fully visible.
  • Undo on a per text-pane/stage basis (Ctrl-Z, redo is Ctrl-Y)
  • Copy all button puts text for all stages into clipboard (Alt-C)
  • Commands can be hidden for clearer view (Alt-S)
  • Views can be frozen/paused to not propagate changes
  • Syntax highlighting
  • If a surface form has an ambigious analysis its shown in red. If you click on an alternative it is selected (basically, between / /) and can be removed it pressing Delete key.
A click on an ambigious analysis selects one posibility (press Del to delete it). Also the freeze button is shown.
  • Removing scrollbars when not wanted.
  • Configuration / choosing language pair in the GUI.
  • Scroll panes down when they fill with more information.
  • Zoom button to get a detached window (particularly input and output windows).
  • Remember settings when closed (language pair, input text, size of panes, windows size and position etc).
  • It DOESENT use dbus. Rather you can just directly point to a mode file and use it. Therefore language pairs can be tested directly from the SVN source directory, without installing them.
When the text is the same as on the former stage it is shown with a yellow background. Commands have been hidden for a clearer view.


Feature requests/bugs

  • Restoring of view sizes after restart is not perfect yet (press Fit to text to fix)
  • Shrinking view sizes not perfect yet (press Fit to text a few times to fix)
  • Moving chunks as units rather than text.
foo{ bar } baz { bin } → baz{ bin } foo { bar }

Related software

  • Apertium-view is a somewhat simpler version of the same program and coded in Python instead of Java and dequires dbus.
  • Apertium-tolk is similar to, but much simpler than Apertium-viewer. It only has an input window and an output window. Where Apertium-viewer is aimed at developers, Apertium-tolk is intended to be as user friendly as possible.