Difference between revisions of "Apertium guide for Windows users"

From Apertium
Jump to navigation Jump to search
m (→‎Translating a file: note on escaping backslash, re: http://www.overclock.net/windows/1007705-apertium-windows-need-help.html)
(oftc)
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
  +
[[Guide Apertium pour les utilisateurs de Windows|En français]]
  +
  +
'''Note: the installer here is out of date. The [[Apertium VirtualBox]] is the easiest method to get started with apertium if you're using Windows.'''
  +
  +
 
{{TOCD}}
 
{{TOCD}}
This tutorial will guide you how to use Apertium Installer to install :
+
This tutorial will guide you on how to use the Apertium Installer and how to install :
 
* Apertium
 
* Apertium
 
* Apertium language pairs
 
* Apertium language pairs
Line 6: Line 11:
 
* Notepad++ (Good open source text editor)
 
* Notepad++ (Good open source text editor)
   
With Apertium Installer for Windows, there is no need to install tools such as Cygwin, Subversion, GCC etc. (which another guide such as [[Apertium_on_Windows]] require you to install).
+
With Apertium Installer for Windows, there is no need to install tools such as Cygwin, Subversion, GCC etc. (which another guide such as [[Apertium on Windows]] require you to install).
   
== Install Apertium ==
+
== Apertium Installation ==
1. Download the installer from [http://sourceforge.net/projects/apertium/files/apertium-win32-installer/ApertiumSetup.exe/download Sourceforge]. Run and read the license argument of Apertium installer (most parts are GNU/GPL) then click "I Agree" to continue.
+
1. Download the installer from [http://sourceforge.net/projects/apertium/files/apertium-win32-installer/ApertiumSetup.exe/download Sourceforge]. Run the executable file and read the license argreement of the Apertium installer (most parts are GNU/GPL). Click "I Agree" to continue.
   
 
[[File:Apertium_guide_for_Windows_users_Apertium_1.png]]
 
[[File:Apertium_guide_for_Windows_users_Apertium_1.png]]
   
2. Select components to install (All of them are recommended for unexperienced users) then click "Next" to go to next page.
+
2. Select the components you want to install. For unexperienced users, all of them are recommended. Click "Next" to go to next page.
   
 
[[File:Apertium_guide_for_Windows_users_Apertium_2.png]]
 
[[File:Apertium_guide_for_Windows_users_Apertium_2.png]]
   
3. Choose the desired install location, location without special characters (eg. space, non-English characters) is recommended
+
3. Choose the desired installation location. A location without special characters (eg. a space or non-English characters) is recommended.
   
 
[[File:Apertium_guide_for_Windows_users_Apertium_3.png]]
 
[[File:Apertium_guide_for_Windows_users_Apertium_3.png]]
Line 25: Line 30:
 
[[File:Apertium_guide_for_Windows_users_Apertium_4.png]]
 
[[File:Apertium_guide_for_Windows_users_Apertium_4.png]]
   
5. You will be asked to select Cygwin packages, (It is okay to leave them all unmarked) click "Next" to continue.
+
5. You will be asked to select Cygwin packages. It required to install coreutils and util-linux. Click "Next" to continue.
   
 
[[File:Apertium_guide_for_Windows_users_Apertium_5.png]]
 
[[File:Apertium_guide_for_Windows_users_Apertium_5.png]]
   
6. Installer will list packages which are required to install to resolve dependency problems. Click "Next" to continue.
+
6. The installer may list packages which are required to install to resolve dependency problems. Click "Next" to continue.
   
 
[[File:Apertium_guide_for_Windows_users_Apertium_6.png]]
 
[[File:Apertium_guide_for_Windows_users_Apertium_6.png]]
   
7. There will be an alert box around the first time installation, just ignore and click "OK"
+
7. An alert box may appear if this is the first time Apertium is being installed. Click "OK."
   
 
[[File:Apertium_guide_for_Windows_users_Apertium_7.png]]
 
[[File:Apertium_guide_for_Windows_users_Apertium_7.png]]
   
8. Cygwin setup will ask to create desktop icon and shortcut in Start Menu. Apertium installer will also create Start Menu shortcut so there is no need to select them.
+
8. Cygwin setup will give you the option to create desktop icon and a shortcut in the Start Menu. The installer will create a Start Menu shortcut for Apertium so there is no need to select them.
   
 
[[File:Apertium_guide_for_Windows_users_Apertium_8.png]]
 
[[File:Apertium_guide_for_Windows_users_Apertium_8.png]]
   
  +
9. The Apertium setup will be completed and you may click "Finish" to close the process.
9. Thent there will be a console recompiling Apertium and lttoolbox. It will take around 30-60 minutes. (It is fine to do other things during the waiting)
 
   
=== Quick test that it works ===
+
=== A Quick Test that it Works ===
   
You should now have the core/engine of Apertium installed (but no language pairs yet).
+
You should now have the core/engine of Apertium installed (including the requirement lttoolbox, but no language pairs yet).
   
  +
Upon installation, start Cygwin with Apertium. If you did not click the checkbox to run Cygwin after clicking "Finish," you may find the "Cygwin Bash Shell" in the Apertium folder in your Program Files in the start menu. The black "Cygwin" terminal window should be visible. If you try typing "apertium" and enter, you should see
After the installation, the black "Cygwin" terminal window should be visible (you can also find a link to this in your Start menu under "Apertium"). If you try typing "apertium" and enter, you should see <code>USAGE: apertium [-d datadir] [-f format] [-u] <direction> [in [out]]</code> and some more text like that. If not, something probably went wrong...
 
   
  +
[[File:Apertium_guide_for_Windows_users_Apertium_Test.png]]
== Install Apertium language pairs ==
 
  +
1. Download the installer from [http://sourceforge.net/projects/apertium/files/apertium-win32-installer/ApertiumLanguageSetup.exe/download Sourceforge]. Run and read the license argument of Apertium installer (most parts are GNU/GPL) then click "I Agree" to continue.
 
  +
If you get a "command not found" error, you must set your path to find the folder where apertium is. Type in:
  +
<pre>
  +
export PATH=/home/apertium-install/apertium/apertium
  +
</pre>
  +
and then you may type "apertium" to see the Usage instructions as seen above.
  +
  +
== Apertium Language Pairs Installation ==
 
1. Download the language pair installer from [http://sourceforge.net/projects/apertium/files/apertium-win32-installer/ApertiumLanguageSetup.exe/download Sourceforge]. Run and read the license agreement of the installer. Click "I Agree" to continue.
   
 
[[File:Apertium_Language_Pairs_Installer_1.png]]
 
[[File:Apertium_Language_Pairs_Installer_1.png]]
   
2. Select language pairs you would like to install and click "Next" to continue. '''Full installation take few hours to install and not recomment for normal user.'''
+
2. Select 'Minimal' as the type to install and then select the language pairs you would like. The [http://wiki.apertium.org/wiki/Main_Page Main Apertium Wiki Page] shows the possible language pairs. Click "Next" to continue. '''Full installation (selection every language pair) takes a few hours to install and is not recommended for normal users.'''
   
 
[[File:Apertium_Language_Pairs_Installer_2.png]]
 
[[File:Apertium_Language_Pairs_Installer_2.png]]
   
3. Select location to install and click "Next". (Must be the same location that Apertium had been installed.)
+
3. Select the location you would like the language pair installed and click "Next". '''The location must be the same as where Apertium was installed.'''
   
 
[[File:Apertium_Language_Pairs_Installer_3.png]]
 
[[File:Apertium_Language_Pairs_Installer_3.png]]
   
4. Click Finish to finish installation process.
+
4. Allow the Cygwin Setup to install the language pair and click "Finish" to finish the installation process.
   
 
[[File:Apertium_Language_Pairs_Installer_4.png]]
 
[[File:Apertium_Language_Pairs_Installer_4.png]]
   
===Quick test that it works===
+
===A Quick Test that it Works===
   
After the installation, the black "Cygwin" terminal window should be visible (you can also find a link to this in your Start menu under "Apertium").
+
After the installation, the black "Cygwin" terminal window should be visible. You can also find a link to this in your Program Files from the Start menu under "Apertium".
   
If you type "apertium -l" (without the quotes) and enter, you should see a list of the codes of the installed language pairs. If this lists <code>es-ca</code>, you can try typing "echo hola mundo | apertium es-ca" (without the quotes), you should see "hola món"; similarly for other language pairs.
+
If you type in "apertium -l" (without the quotes) and press enter, you should see a list of the codes of the installed language pairs. If this lists <code>es-ca</code>, you can try typing "echo hola mundo | apertium es-ca" (without the quotes). you should see "hola món"; similarly for other language pairs.
   
===Translating a file===
+
===Translating a File===
 
Example: translating an HTML file from Asturian to Spanish:
 
Example: translating an HTML file from Asturian to Spanish:
 
<pre>
 
<pre>
Line 82: Line 95:
 
Please note that backslash needs to be escaped, by typing it twice!
 
Please note that backslash needs to be escaped, by typing it twice!
   
  +
<u>Note :</u> It is also possible to use UNIX syntax for paths replacing every <code>\</code> of Windows path by a <code>/</code> . I don't know if it resolves the problem of cygpath. [[User:Bech|Bech]] 09:02, 11 September 2011 (UTC)
===Developing further on a language pair===
 
  +
The installer puts the language data inside the Cygwin directory <code>/home/apertium-install/languages</code>, which is really located within the Windows directory <code>C:\Apertium\home\apertium-install\languages</code>. In there you'll find directories for all the installed language pairs, and can change language data and recompile etc. as described in [[Apertium_New_Language_Pair_HOWTO]]
 
  +
===Further Development on a Language Pair===
 
The installer puts the language data inside the Cygwin directory <code>/home/apertium-install/languages</code>, which is really located within the Windows directory <code>C:\Apertium\home\apertium-install\languages</code>. In there you'll find directories for all the installed language pairs, and can change language data and recompile etc. as described in [[Apertium New Language Pair HOWTO]]
   
: or was it <code>/home/apertium-installation/...</code>?
 
   
 
== Install TortoiseSVN(optional) ==
 
== Install TortoiseSVN(optional) ==
Line 142: Line 156:
 
== How to commit changes to SVN using TortoiseSVN ==
 
== How to commit changes to SVN using TortoiseSVN ==
 
You need to request commit access before follow this part of tutorial. You can request commit access from these following ways.
 
You need to request commit access before follow this part of tutorial. You can request commit access from these following ways.
* IRC: #apertium on irc.freenode.net
+
* IRC: #apertium on irc.oftc.net
 
* Mailing List: apertium-stuff AT lists.sourceforge DOT net
 
* Mailing List: apertium-stuff AT lists.sourceforge DOT net
   
Line 163: Line 177:
   
 
[[Category:Installation]]
 
[[Category:Installation]]
  +
[[Category:Documentation in English]]

Latest revision as of 09:17, 26 May 2021

En français

Note: the installer here is out of date. The Apertium VirtualBox is the easiest method to get started with apertium if you're using Windows.


This tutorial will guide you on how to use the Apertium Installer and how to install :

  • Apertium
  • Apertium language pairs
  • TortoiseSVN (GUI SVN client for Windows)
  • Notepad++ (Good open source text editor)

With Apertium Installer for Windows, there is no need to install tools such as Cygwin, Subversion, GCC etc. (which another guide such as Apertium on Windows require you to install).

Apertium Installation[edit]

1. Download the installer from Sourceforge. Run the executable file and read the license argreement of the Apertium installer (most parts are GNU/GPL). Click "I Agree" to continue.

Apertium guide for Windows users Apertium 1.png

2. Select the components you want to install. For unexperienced users, all of them are recommended. Click "Next" to go to next page.

Apertium guide for Windows users Apertium 2.png

3. Choose the desired installation location. A location without special characters (eg. a space or non-English characters) is recommended.

Apertium guide for Windows users Apertium 3.png

4. Cygwin installer will appear. Choose the nearest mirror and continue.

Apertium guide for Windows users Apertium 4.png

5. You will be asked to select Cygwin packages. It required to install coreutils and util-linux. Click "Next" to continue.

Apertium guide for Windows users Apertium 5.png

6. The installer may list packages which are required to install to resolve dependency problems. Click "Next" to continue.

Apertium guide for Windows users Apertium 6.png

7. An alert box may appear if this is the first time Apertium is being installed. Click "OK."

Apertium guide for Windows users Apertium 7.png

8. Cygwin setup will give you the option to create desktop icon and a shortcut in the Start Menu. The installer will create a Start Menu shortcut for Apertium so there is no need to select them.

Apertium guide for Windows users Apertium 8.png

9. The Apertium setup will be completed and you may click "Finish" to close the process.

A Quick Test that it Works[edit]

You should now have the core/engine of Apertium installed (including the requirement lttoolbox, but no language pairs yet).

Upon installation, start Cygwin with Apertium. If you did not click the checkbox to run Cygwin after clicking "Finish," you may find the "Cygwin Bash Shell" in the Apertium folder in your Program Files in the start menu. The black "Cygwin" terminal window should be visible. If you try typing "apertium" and enter, you should see

Apertium guide for Windows users Apertium Test.png

If you get a "command not found" error, you must set your path to find the folder where apertium is. Type in:

export PATH=/home/apertium-install/apertium/apertium

and then you may type "apertium" to see the Usage instructions as seen above.

Apertium Language Pairs Installation[edit]

1. Download the language pair installer from Sourceforge. Run and read the license agreement of the installer. Click "I Agree" to continue.

Apertium Language Pairs Installer 1.png

2. Select 'Minimal' as the type to install and then select the language pairs you would like. The Main Apertium Wiki Page shows the possible language pairs. Click "Next" to continue. Full installation (selection every language pair) takes a few hours to install and is not recommended for normal users.

Apertium Language Pairs Installer 2.png

3. Select the location you would like the language pair installed and click "Next". The location must be the same as where Apertium was installed.

Apertium Language Pairs Installer 3.png

4. Allow the Cygwin Setup to install the language pair and click "Finish" to finish the installation process.

Apertium Language Pairs Installer 4.png

A Quick Test that it Works[edit]

After the installation, the black "Cygwin" terminal window should be visible. You can also find a link to this in your Program Files from the Start menu under "Apertium".

If you type in "apertium -l" (without the quotes) and press enter, you should see a list of the codes of the installed language pairs. If this lists es-ca, you can try typing "echo hola mundo | apertium es-ca" (without the quotes). you should see "hola món"; similarly for other language pairs.

Translating a File[edit]

Example: translating an HTML file from Asturian to Spanish:

apertium -f html ast-es $(cygpath c:\\mystuff\\asturian_input.html) $(cygpath c:\\mystuff\\spanish_output.html)

(The cygpath stuff is unfortunately needed to get to a Windows file path from Cygwin. A Windows Power User could probably write a script to make this a right-click menu option.)

Please note that backslash needs to be escaped, by typing it twice!

Note : It is also possible to use UNIX syntax for paths replacing every \ of Windows path by a / . I don't know if it resolves the problem of cygpath. Bech 09:02, 11 September 2011 (UTC)

Further Development on a Language Pair[edit]

The installer puts the language data inside the Cygwin directory /home/apertium-install/languages, which is really located within the Windows directory C:\Apertium\home\apertium-install\languages. In there you'll find directories for all the installed language pairs, and can change language data and recompile etc. as described in Apertium New Language Pair HOWTO


Install TortoiseSVN(optional)[edit]

See also: Using SVN with TortoiseSVN

1. Download TortoiseSVN from Offical downloads page. Run and click next to skip introduction step.

Apertium guide for Windows users TortoiseSVN 1.png

2. Read EULA and select "I accept the terms in the License Agreement", click "Next" to continue.

Apertium guide for Windows users TortoiseSVN 2.png

3. Select components to install, you can leave it as it is and click "Next" to continue.

Apertium guide for Windows users TortoiseSVN 3.png

4. The installer will show the finish page, click next and it will ask you to restart. You need to restart your machine to start using TortoiseSVN.

Apertium guide for Windows users TortoiseSVN 4.png

5. After TortoiseSVN there will be a menu item in context menu of every files and directories. To checkout SVN click "SVN checkout..."

Apertium guide for Windows users TortoiseSVN 5.png

6. You can now type URL of repository in Checkout dialog and click OK to start SVN checkout.

Apertium guide for Windows users TortoiseSVN 6.png


Install Notepad++(optional)[edit]

1. Download Notepad++ from offical site. Run and click "Next" to continue.

Apertium guide for Windows users NotepadPlus 1.png

2. Read license agreement and click "I agree" to continue.

Apertium guide for Windows users NotepadPlus 2.png

3. Select install location (recommmend default) and click "Next" to continue.

Apertium guide for Windows users NotepadPlus 3.png

4. Select components to install, just leave it as default and click "Next" to continue.

Apertium guide for Windows users NotepadPlus 4.png

5. The installer will start to process. After that you can select to run Notepad++ for first time.

Apertium guide for Windows users NotepadPlus 5.png

6. You can edit any files with Notepad++ by right click on them and click on a menu item named "Edit with Notepad++".

Apertium guide for Windows users NotepadPlus 6.png


How to commit changes to SVN using TortoiseSVN[edit]

You need to request commit access before follow this part of tutorial. You can request commit access from these following ways.

  • IRC: #apertium on irc.oftc.net
  • Mailing List: apertium-stuff AT lists.sourceforge DOT net

1. Right click on directory you would like to commit changes and click "SVN Commit..." (Language pairs will normally located in C:\Apertium\home\apertium-install\languages)

TortoiseSVN Commit 1.png

2. Type message describe your changes and select file you wish to commit. Then click "OK" to start the process.

TortoiseSVN Commit 2.png

3. There will be a dialog ask your username and password. Fill the information and click "OK"

TortoiseSVN Commit 3.png

4. You will see a dialog show committing progress. Just wait and click "OK" after the process finished.

TortoiseSVN Commit 4.png