This document is a reference on installing tools to support Data File Builder or Source Code compilation on the Mac OS/X Platform.
This document is relevant only if
The Data File Builder module, which constructs a custom Metathesaurus, requires certain GNU utilities, which are included in Linux distributions, however, most but not all are included in Mac OS/X. If you plan to use the Data File Builder on Mac OS/X, you need to download and install the GNU utilities.
It is *essential* that the GNU utilities be available, because the Data File Builder scripts use the GNU versions of programs such as grep, cut, join, sort, etc., and which may not work properly if the BSD and SYS V versions of these programs are used instead.
The necessary GNU utilities may be freely downloaded and compiled using the GCC or CLang compiler supplied with the Xcode Developer Tools.
If the GNU utilities are already available on your system, you may skip to the Configuring the Shell Environment: section below.
The source code to these utilities are available at http://www.gnu.org/software/.
Pre-compiled (binary) versions of these utilities can be obtained at the following:
Refer to the installation instructions supplied by the provider of coreutils package, source or binary (pre-compiled). Be sure to install the Apple Developer Tools if you're using the source package for coreutils.
The GNU utilities were installed above in /usr/local/bin. Before running BuildDataFiles, ensure that the programs grep, sed, sort, cut, join, etc. are run from /usr/local/bin and not /bin, /usr/bin, or another directory (specified by the packager or yourself). The simplest way to do this is to run the following command (using csh or tcsh):
$ set path = ( /usr/local/bin $path )
or using sh or bash:
$ PATH=/usr/local/bin:$PATH $ export PATH
The appropriate command should be added to your .cshrc or .bashrc file.
See the Data File Builder Documentation (http://metamap.nlm.nih.gov/Docs/datafilebuilder.pdf) for complete instructions on running BuildDataFiles.
If you are using a Mac there are special instructions for installing LVG on Mac OS/X:
Download the "Lite" version of Lvg for the year you wish to use (the example uses LVG 2010.) (see Lexical Tools Download Page: http://lexsrv3.nlm.nih.gov/LexSysGroup/Projects/lvg/current/web/release/index.html)
extract it using tar and then for each of the files in the lvg2010lite/bin directory replace:
JAVA=/export/home/lu/Development/LVG/lvg2010/bin/jre1.6.0_14/bin/java
with:
JAVA=java
and:
LVG_DIR=/export/home/lu/Development/LVG/lvg2010
with:
LVG_DIR={where lvg is extracted}/lvg2010lite
Also modify the CLASSPATH variable: include both ${LVG_DIR} and lvg2011dist.jar.
Make sure all of the files in lvg2010lite/bin are executable:
chmod +x lvg2010lite/bin/*
Also modify the configuration file (${LVG_DIR}/data/config/lvg.properties.
The Java VM (java) is currently provided with Mac OS/X Leopard, Snow Leopard, and Lion (Note: MetaMap has not been tested on Mac OS/X Lion).
More detailed instructions on how to install Lvg manually are available at the Lexical Systems WebSite. See details at URL:
http://lexsrv3.nlm.nih.gov/LexSysGroup/Projects/lvg/current/docs/userDoc/install/installManual.html
This document was generated using AFT v5.098