nlm2mm.pl
Converts the NLM-WSD data set to the prolog format used in the NLM-WSD dataset.
This program takes as input plain formated data and converts it to the prolog format similar to that of the NLM-WSD Reviewed Results directory.
perl nlm2mm.pl DESTINATION Basic_Reviewed_Results DIRECTORY
The MetaMap command used in the program is:
$ENV{METAMAP_PATH}/metamap08 -q InputFile OutputFile
where --q option outputs the data in machine code
Note: the METAMAP_PATH environment variable must be set to the bin directory containing the metamap program
For example:
in bash: export METAMAP_PATH=/home/bthomson/metamap/public_mm/bin
in cshrc: set env METAMAP_PATH /home/bthomson/metamap/public_mm/bin
The directory that will contain the prolog files. The structure of this directory is similar to that of the NLM-WSD Reviewed_Results directory.
SOURCE can be a directory or a file.
Directory to contain temporary and log files. DEFAULT: nlm2mm.log
Displays the quick summary of program options.
Displays the version information.
nlm2mm.pl converts the data set to the CuiTools xml-like .mm format.
In plain format each line of the text files contains a single context. where the ambiguous word is identified by:
<head item=``target word'' instance=``instance'' sense=``sense''>word</head>.
For example:
Paul was named <head item=``art'' instance=``art.30002'' sense=``art''>Art</head> magazine's top collector.
Bridget T. McInnes, University of Minnesota, Twin Cities =head1 COPYRIGHT
Copyright (c) 2007-2008,
Bridget T. McInnes, University of Minnesota, Twin Cities bthomson at cs.umn.edu
Ted Pedersen, University of Minnesota Duluth tpederse at d.umn.edu
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to
The Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.