Custom software for assimilation

IntroductionUp

Interpreters can generally do their work with standard software, but analysts also need custom software. Most of our custom software is bundled into a single package called the PanLex tools.

Installation

In order to use the PanLex tools you will first need to install Perl and git. The linked pages contain installation instructions.

To obtain the PanLex tools, retrieve it from its GitHub repository. Open a terminal window and at the command line run the following command:

git clone https://github.com/longnow/panlex-tools.git

This command will clone the tools repository into a directory named panlex-tools inside your current working directory. It is safe to rename or move this directory elsewhere if you want. If the PanLex tools later get updated, you can update your local copy by opening a terminal window, changing to the panlex-tools directory, and executing git pull.

Once you have cloned the repository with the above command, you should follow the Perl module installation instructions to ensure that modules required by the PanLex tools are installed.

Configuration

In order to properly configure the PanLex tools, you need to set (i.e. define) certain environment variables. Your environment variables are set in various files, but it is enough if you set the variables in one of the files that is read each time you open a new terminal window. The best file to use for this purpose is called .bash_profile, located at:

  • On OS X, /Users/<username>/.bash_profile
  • On Windows under Cygwin, C:\cygwin\home\<username>\.bash_profile

Replace <username> above with your actual username.

In order to edit your .bash_profile, it is best to use a programming text editor. Do not use Notepad on Windows; use Notepad++ or another recommended text editor. On OS X, it is OK to use TextEdit, but if you do be sure to turn off smart quotes (Edit menu > Substitutions > Smart Quotes should be unchecked). Whenever you update your .bash_profile, close the terminal window and reopen it for the change to take effect.

In order to use the PanLex tools, you need to set the environment variable PANLEX_TOOLDIR and to modify your PATH to include it. To do so, add the following to your .bash_profile:

export PANLEX_TOOLDIR="/path/to/panlex-tools"
export PATH="$PANLEX_TOOLDIR/bin:$PATH"

Replace /path/to/panlex-tools with the actual path on your system. If you do not know the path, you can find it by opening a terminal window, changing to the panlex-tools directory, and typing pwd (which stands for “print working directory”).

There are several other useful environment variables for the PanLex tools. For more information, see the documentation on the plx command-line tool.

Usage

To work through a guided example of how to use the PanLex tools to tabularize and serialize a source file, follow the analysis tutorial. More detailed documentation is available on tabularization, serialization, and the plx tool.