Difference between revisions of "Using the tools on your own system"

From LING073
Jump to: navigation, search
(→‎Install homebrew)
(→‎Misc tools)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
−
There are two ways to use many of the tools we use in class on another system.  The easiest is to set up a copy of the virtual machine we run.  You may also install the tools on your own system.  The instructions for both approaches follow.
+
It's possible to use the tools we make use of in class on your own system.
  
−
== Installing the VM ==
+
The following is the complete list of tools you'll need:
−
If you want to use a copy of the VM we use in class, you can grab a copy hosted by SCCS ([http://www.sccs.swarthmore.edu/users/faculty/jnw/Debian.ova Debian.ova]—'''WARNING: 2.5GB file!''').  Just install VirtualBox on your system and import that file.
+
* The core tools:
 +
** Apertium, with <code>lttoolbox</code> and other dependencies
 +
** <code>apertium-lex-tools</code>, <code>apertium-separable</code>, <code>apertium-recursive</code>
 +
** HFST
 +
** CG-3
 +
** <code>lexd</code>
 +
* <code>udpipe</code> (not needed Spring 2021)
 +
* Miscellaneous tools (from repo)
  
−
== Installing the tools ==
+
== Installing core tools ==
−
If you're running linux, Mac OS X, or Windows 10, you should be able to use the tools in the course on your own system.
+
There are three main methods to install the core tools:
 +
* If you run Linux, [[:apertium:Install_Apertium_core_using_packaging|set up your package manager to use Apertium's repos]] using the nightly script.
 +
* If you run Windows 10, [https://docs.microsoft.com/en-us/windows/wsl/install-win10 set up WSL] and then [[[[:apertium:Install_Apertium_core_using_packaging|set up the package manager to use Apertium's repos]] using the nightly script.
 +
* If you run macOS, [[#Apertium installation on Mac using homebrew|use homebrew]] to install the tools.
  
−
=== Apertium ===
+
Alternatively, you can install VirtualBox and use a [[:apertium:Apertium VirtualBox|Linux virtual machine with Apertium tools installed]].
  
−
See the [[:apertium:Installation#If_you_want_to_add_language_data_.2F_do_more_advanced_stuff|Installation]] page on Apertium's wiki.
+
=== Apertium installation on Debian/Ubuntu (including under Windows WSL) ===
  
−
=== Apertium-quality ===
+
Set up the [[:apertium:Install_Apertium_core_using_packaging|Apertium nightly script]].
  
−
Install from SVN as described on Apertium's wiki: [[:apertium:Apertium-quality/Installation|Apertium quality installation]].
+
Then install all development packages
  
−
=== UDpipe ===
+
$ sudo apt-get -f install apertium-all-dev
−
Follow [https://ufal.mff.cuni.cz/udpipe/install these instructions].
+
 
 +
That should install all the core tools on your system!
 +
 
 +
=== Apertium installation on Mac using homebrew ===
 +
 
 +
==== Install homebrew ====
 +
 
 +
[https://brew.sh Homebrew] is a package manager for Mac. To install it, open a terminal run the following:
 +
 
 +
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
 +
 
 +
This will take several minutes.
  
−
=== Misc tools ===
+
''Note that you'll probably need the XCode developer tools from Apple to install homebrew.  If you don't have them installed, Homebrew may direct you to install them—perhaps automatically—but it may not.''
  
−
Clone <code>git@github.swarthmore.edu:Ling073-sp17/tools.git</code> and run <code>sudo make</code>.
+
==== Install dependencies from homebrew ====
  
−
== Apertium installation on Mac using brew ==
+
$ brew install gperftools help2man pcre icu4c perl518 gawk autoconf automake pkg-config cmake wget gcc
  
−
=== Install homebrew ===
+
This will take a couple minutes.
  
−
[https://brew.sh Homebrew] is a package manager for Mac.  To install it, run the following:
+
==== Install apertium core tools and HFST ====
  
−
  $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+
  $ wget https://apertium.projectjj.com/osx/install-nightly.sh -O - | bash
  
−
This will take several minutes.
+
This will take a minute.
  
−
''Note that you may need the XCode developer tools from Apple. If you don't have them installed, Homebrew may direct you to install them—perhaps automatically—but it may not.''
+
== UDpipe ==
 +
Follow [https://ufal.mff.cuni.cz/udpipe/install these instructions].
  
−
=== Install dependencies from homebrew ===
+
== Misc tools ==
  
−
$ brew install gawk subversion autoconf automake pkgconfig wget python3
+
First, for <code>morph-test</code> to work, you'll need PyYAML.
  
−
This will take a couple minutes. You'll also want yaml if you install [[:apertium:Apertium-quality/Installation|apertium-quality]].
+
On Debian/Ubuntu (including under Windows with WSL):
 +
  $ sudo apt-get install python3-yaml
  
 +
On macOS using homebrew and pretty much any other system where you don't mind bypassing your package manager:
 
  $ pip3 install PyYAML
 
  $ pip3 install PyYAML
  
−
=== Install apertium core tools and HFST ===
+
Then clone the tools repo, being sure to use the <code>--recurse-submodules</code> option (since the repo includes two subrepos):
 +
 
 +
$ git clone --recurse-submodules git@github.swarthmore.edu:Ling073-sp21/tools.git
 +
 
 +
And then run <code>make</code> or <code>sudo make</code> to install the tools to either your local <code>~/bin</code> directory or the system <code>$PREFIX</code>, respectively.
  
−
  $ wget https://apertium.projectjj.com/osx/install-nightly.sh -O - | bash
+
If the latter, you need to be a system administrator; if the former, make sure you have your <code>~/bin</code> in your <code>$PATH</code>. How to do this will depend on your shell; in bash, edit your <code>~/.bash_profile</code> file, and make sure <code>$HOME/bin</code> is in the <code>PATH=</code> list, separated from other entries by <code>:</code>.
  
−
This will take a minute.
+
== Also see ==
 +
* [[Accessing the lab machines remotely]]
  
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
 
[[Category:Tools]]
 
[[Category:Tools]]

Latest revision as of 04:15, 17 January 2023

It's possible to use the tools we make use of in class on your own system.

The following is the complete list of tools you'll need:

  • The core tools:
    • Apertium, with lttoolbox and other dependencies
    • apertium-lex-tools, apertium-separable, apertium-recursive
    • HFST
    • CG-3
    • lexd
  • udpipe (not needed Spring 2021)
  • Miscellaneous tools (from repo)

Installing core tools

There are three main methods to install the core tools:

Alternatively, you can install VirtualBox and use a Linux virtual machine with Apertium tools installed.

Apertium installation on Debian/Ubuntu (including under Windows WSL)

Set up the Apertium nightly script.

Then install all development packages

$ sudo apt-get -f install apertium-all-dev

That should install all the core tools on your system!

Apertium installation on Mac using homebrew

Install homebrew

Homebrew is a package manager for Mac. To install it, open a terminal run the following:

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

This will take several minutes.

Note that you'll probably need the XCode developer tools from Apple to install homebrew. If you don't have them installed, Homebrew may direct you to install them—perhaps automatically—but it may not.

Install dependencies from homebrew

$ brew install gperftools help2man pcre icu4c perl518 gawk autoconf automake pkg-config cmake wget gcc

This will take a couple minutes.

Install apertium core tools and HFST

$ wget https://apertium.projectjj.com/osx/install-nightly.sh -O - | bash

This will take a minute.

UDpipe

Follow these instructions.

Misc tools

First, for morph-test to work, you'll need PyYAML.

On Debian/Ubuntu (including under Windows with WSL):

$ sudo apt-get install python3-yaml

On macOS using homebrew and pretty much any other system where you don't mind bypassing your package manager:

$ pip3 install PyYAML

Then clone the tools repo, being sure to use the --recurse-submodules option (since the repo includes two subrepos):

$ git clone --recurse-submodules git@github.swarthmore.edu:Ling073-sp21/tools.git

And then run make or sudo make to install the tools to either your local ~/bin directory or the system $PREFIX, respectively.

If the latter, you need to be a system administrator; if the former, make sure you have your ~/bin in your $PATH. How to do this will depend on your shell; in bash, edit your ~/.bash_profile file, and make sure $HOME/bin is in the PATH= list, separated from other entries by :.

Also see