Lexical Tools

Installation Instructions



Introduction

Thank you for downloading the Lexical Tools Java. This package includes one compressed file -- lvg2024.tgz.

Requirements

  • Disk: 4.0 Gb
  • Platform: 64-bit Linux, or Windows.
  • Archive program:
    • Linux: gtar (tar)
    • Windows: winzip or pkzip

Installation

  1. Download
    Download the lvg2024.tgz file from Lexical Tools web site, or retrieve the file from the UMLS distribution in the /LEX/LEX_PGMS directory.

  2. Uncompress
    Uncompress and unarchive this file into the location where you intend to have it installed. On a Linux machine, this would look like:
      > gtar -xzvf lvg2024.tgz
    

    If you are on a windows platform, pkzip and winzip may be used to uncompress and unarchive this file. Please make sure the file you download has the right extension (tgz) before you unzip it. Winzip looks into the file to check if there is tar file within it, and it asks if it should create a temporary file with the tar file in it. The proper response is to allow this to happen. Once the temporary file has been created, winzip reads it and displays the archive as it would any other zip'ed file. Unzip the resulting contents to the location you want to install to. Make sure that you preserve the directory structures when unarchiving.

    Once the files are in place, change directories to the top level. This should be lvg2024. If you are on a windows platform, this will involve opening up a DOS command window (Start->run->cmd), and changing directories to where you have put these files. We will henceforth refer to this top level directory as the ${LVG_DIR} directory.

  3. Install
    From the ${LVG_DIR}, invoke the appropriate installation command. These are installation scripts appropriate to the platforms we know about:

    PlatformsInstallation Scripts
    Linux./install_linux.sh
    Windows./install_win.bat

    The scripts shown above will first install a copy of the JRE to ensure a compatible version of JRE for running the lvg. The JRE is installed under the ${LVG_DIR}/bin directory on Linux platform. If you install lvg on a PC/Windows platform, you may choose not to install JRE if your existing JRE is 1.8+. Then, the script proceeds to alter the configuration file settings to set the install location. If you install lvg on a PC/Windows platform, choose NOT to restart your computer after JRE is installed. You may restart your computer after finishing lvg installation.

    After 2006 release, the installation script does not provide options of loading the lexical tools' data into this other databases (MySql). After 2010 release, the installation script does not provide options of installing lexical tools on Sun-Solaris. However, users may still use Lexical Tools with other database on other platforms than Linux or Window (such as Mac) by following the instructions on pages of using other database and manual installation. Release 2013-2017, the installation script provides options to install 32 or 64-bit JRE for Window platform (while it will automatically detects the appropriate JRE in Linux). After 2018+ release, only 64-bit JRE is supported.

    The script will create shell files in the ${LVG_DIR} bin directory for each of the lexical tools, with the proper environment set up. Also, it creates lvg configuration file under ${LVG_DIR}/data/config/lvg.properties.

    Once done, the script will attempt to verify that the installation was successful.

    If the installation was successful, there will be a congratulation message that finishes off this process.

    If the installation is not successful, there will be a message indicating so. Please refer to the ${LVG_DIR}/logs directory for a complete transcript of the process. It is likely that there were error messages indicating the source of the failure.

After a successful installation

The lexical tools are now ready to be used. They can be found in the ${LVG_DIR}/bin directory. On the Linux platforms, they include the following shell scripts:

  • lvg
  • norm
  • luiNorm
  • wordInd
  • lgt
  • toAscii
  • fields

On the Windows platform, they include the following batch files:

  • lvg.bat
  • norm.bat
  • luiNorm.bat
  • wordInd.bat
  • lgt.bat
  • toAscii.bat
  • fields.bat

Each may be used from any location on the machine. If you put the ${LVG_DIR}/bin path in your $PATH environment variable they do not have to be referenced with the whole path.

An Example


> lvg -f:i -m
sleep
sleep|sleep|128|1|i|1|FACT|sleep|noun|base|sleep|noun|base|E0056245|
sleep|sleep|128|512|i|1|FACT|sleep|noun|base|sleep|noun|singular|E0056245|
sleep|sleep|1024|1|i|1|FACT|sleep|verb|base|sleep|verb|base|E0056246|
sleep|sleep|1024|262144|i|1|FACT|sleep|verb|base|sleep|verb|pres1p23p|E0056246|
sleep|sleep|1024|1024|i|1|FACT|sleep|verb|base|sleep|verb|infinitive|E0056246|
sleep|slept|1024|32|i|1|FACT|sleep|verb|base|slept|verb|past|E0056246|
sleep|slept|1024|64|i|1|FACT|sleep|verb|base|slept|verb|pastPart|E0056246|
sleep|sleeps|1024|128|i|1|FACT|sleep|verb|base|sleeps|verb|pres3s|E0056246|
sleep|sleeping|1024|16|i|1|FACT|sleep|verb|base|sleeping|verb|presPart|E0056246|

An Example Installation

Using Other Platform (Sun-Solaris) - Manual Installation

After 2010, the installation script provide options to install the lexical tools on platform of Linux and Windows. Users may follow instructions on manual installation instructions to install lexical tools on different platforms. The manual installation page shows details of how the installation script configures and installs Lexical tools. Users may skip this section if they use installation script to install Lexical tools.

Using Other Database (MySql)

After 2006, the installation script does not provide options to configure and load the lexical tools into database other than the default HSqlDb. Users may follow instructions on loading data into other DB (MySql) page to load data to their pre-existing database. However, we recommend users to use the default database (HSql-DB).

Altering your environment to use the lexical tools, once they have been installed

You may invoke these tools from a command line. These tools are found in the ${LVG_DIR}/bin directory. You can add this ${LVG_DIR}/bin path to your ${PATH} environment variable. This would enable you to find and run these tools from any location.

In Linux/UNIX, this would be done by adding this path to your ~/.cshrc or ~/.profile startup script.

In Windows, this would be done by appending this path to the PATH variable from the "control panel\System\Advanced\Environment variable\Edit" menus.