<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.bioontology.org//mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tejaswit</id>
	<title>NCBO Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.bioontology.org//mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tejaswit"/>
	<link rel="alternate" type="text/html" href="https://www.bioontology.org//wiki/Special:Contributions/Tejaswit"/>
	<updated>2026-06-06T05:52:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9708</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9708"/>
		<updated>2010-01-28T04:42:28Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* Versions (prototypes &amp;amp; releases) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap [http://mmtx.nlm.nih.gov/] is a highly powerful tool to map biomedical text to the UMLS [http://www.nlm.nih.gov/research/umls/] Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO [http://www.bioontology.org/] is developing a system [http://www.bioontology.org/annotator-service] to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [http://www.biomedcentral.com/1471-2105/10/S9/S14]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. &lt;br /&gt;
&lt;br /&gt;
Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact Clement Jonquet [mailto:jonquet@stanford.edu?subject=MetaMap%Installation] and Tejaswi Tenneti [mailto:tejaswit@stanford.edu?subject=MetaMap%Installation]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* '''December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html]''' &lt;br /&gt;
&lt;br /&gt;
The release consists of an integrated MetaMap 2009 installation. The Data File builder utility was used build a custom dictionary containing the ontologies '''CST, OMS, 39857, 39046, 40187 and 39885'''. The data was obtained from the '''obs_v1_sept09''' schema. However, some ontologies like 39857 is not present in '''obs_v1_sept09'''&lt;br /&gt;
 &lt;br /&gt;
* '''November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html]''' &lt;br /&gt;
&lt;br /&gt;
The release consists of an integrated MMTx installation. The Data File builder utility was used build a custom dictionary containing all the ontologies in the '''obs''' schema. A defect with this installation is that the Data File builder scripts processed only CUIs of 8 digits length. This is a bug in the MMTx documentation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* gforge code location https://bmir-gforge.stanford.edu/gf/project/obs/&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
We thank the researchers at National Library of Medicine [http://www.nlm.nih.gov/] for their constant support and help at various stages of this project.&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9707</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9707"/>
		<updated>2010-01-28T04:39:25Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* Versions (prototypes &amp;amp; releases) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap [http://mmtx.nlm.nih.gov/] is a highly powerful tool to map biomedical text to the UMLS [http://www.nlm.nih.gov/research/umls/] Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO [http://www.bioontology.org/] is developing a system [http://www.bioontology.org/annotator-service] to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [http://www.biomedcentral.com/1471-2105/10/S9/S14]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. &lt;br /&gt;
&lt;br /&gt;
Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact Clement Jonquet [mailto:jonquet@stanford.edu?subject=MetaMap%Installation] and Tejaswi Tenneti [mailto:tejaswit@stanford.edu?subject=MetaMap%Installation]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
&lt;br /&gt;
The release consists of an integrated MetaMap 2009 installation. The Data File builder utility was used build a custom dictionary containing the ontologies '''CST, OMS, 39857, 39046, 40187 and 39885'''. The data was obtained from the '''obs_v1_sept09''' schema. However, some ontologies like 39857 is not present in '''obs_v1_sept09'''&lt;br /&gt;
 &lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
&lt;br /&gt;
The release consists of an integrated MMTx installation. The Data File builder utility was used build a custom dictionary containing all the ontologies in the '''obs''' schema. A defect with this installation is that the Data File builder scripts processed only CUIs of 8 digits length. This is a bug in the MMTx documentation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* gforge code location https://bmir-gforge.stanford.edu/gf/project/obs/&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
We thank the researchers at National Library of Medicine [http://www.nlm.nih.gov/] for their constant support and help at various stages of this project.&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9706</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9706"/>
		<updated>2010-01-27T10:27:28Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* Collaboration &amp;amp; Acknowledgment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap [http://mmtx.nlm.nih.gov/] is a highly powerful tool to map biomedical text to the UMLS [http://www.nlm.nih.gov/research/umls/] Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO [http://www.bioontology.org/] is developing a system [http://www.bioontology.org/annotator-service] to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [http://www.biomedcentral.com/1471-2105/10/S9/S14]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. &lt;br /&gt;
&lt;br /&gt;
Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact Clement Jonquet [mailto:jonquet@stanford.edu?subject=MetaMap%Installation] and Tejaswi Tenneti [mailto:tejaswit@stanford.edu?subject=MetaMap%Installation]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* gforge code location https://bmir-gforge.stanford.edu/gf/project/obs/&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
We thank the researchers at National Library of Medicine [http://www.nlm.nih.gov/] for their constant support and help at various stages of this project.&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9705</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9705"/>
		<updated>2010-01-27T10:26:37Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* Collaboration &amp;amp; Acknowledgment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap [http://mmtx.nlm.nih.gov/] is a highly powerful tool to map biomedical text to the UMLS [http://www.nlm.nih.gov/research/umls/] Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO [http://www.bioontology.org/] is developing a system [http://www.bioontology.org/annotator-service] to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [http://www.biomedcentral.com/1471-2105/10/S9/S14]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. &lt;br /&gt;
&lt;br /&gt;
Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact Clement Jonquet [mailto:jonquet@stanford.edu?subject=MetaMap%Installation] and Tejaswi Tenneti [mailto:tejaswit@stanford.edu?subject=MetaMap%Installation]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* gforge code location https://bmir-gforge.stanford.edu/gf/project/obs/&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
We thank the guys at NLM [http://www.nlm.nih.gov/] for their constant support and help at various stages of this project.&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9704</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9704"/>
		<updated>2010-01-27T10:25:01Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap [http://mmtx.nlm.nih.gov/] is a highly powerful tool to map biomedical text to the UMLS [http://www.nlm.nih.gov/research/umls/] Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO [http://www.bioontology.org/] is developing a system [http://www.bioontology.org/annotator-service] to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [http://www.biomedcentral.com/1471-2105/10/S9/S14]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. &lt;br /&gt;
&lt;br /&gt;
Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact Clement Jonquet [mailto:jonquet@stanford.edu?subject=MetaMap%Installation] and Tejaswi Tenneti [mailto:tejaswit@stanford.edu?subject=MetaMap%Installation]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* gforge code location https://bmir-gforge.stanford.edu/gf/project/obs/&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
[a sentence to acknowledge the support of NLM]&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9703</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9703"/>
		<updated>2010-01-27T10:24:41Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap [http://mmtx.nlm.nih.gov/] is a highly powerful tool to map biomedical text to the UMLS [http://www.nlm.nih.gov/research/umls/] Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO [http://www.bioontology.org/] is developing a system [http://www.bioontology.org/annotator-service] to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [http://www.biomedcentral.com/1471-2105/10/S9/S14]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. &lt;br /&gt;
&lt;br /&gt;
Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact Clement Jonquet [mailto:jonquet@stanford.edu?subject=MetaMap%Installation] and Tejaswi Tenneti [mailto:tejaswit@stanford.edu?subject=MetaMap%Installation]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
gforge code location&lt;br /&gt;
&lt;br /&gt;
* https://bmir-gforge.stanford.edu/gf/project/obs/&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
[a sentence to acknowledge the support of NLM]&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9702</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9702"/>
		<updated>2010-01-27T10:23:53Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap [http://mmtx.nlm.nih.gov/] is a highly powerful tool to map biomedical text to the UMLS [http://www.nlm.nih.gov/research/umls/] Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO [http://www.bioontology.org/] is developing a system [http://www.bioontology.org/annotator-service] to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [http://www.biomedcentral.com/1471-2105/10/S9/S14]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. &lt;br /&gt;
&lt;br /&gt;
Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact Clement Jonquet [mailto:jonquet@stanford.edu?subject=MetaMap%Installation] and Tejaswi Tenneti [mailto:tejaswit@stanford.edu?subject=MetaMap%Installation]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://bmir-gforge.stanford.edu/gf/project/obs/&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
[a sentence to acknowledge the support of NLM]&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9701</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9701"/>
		<updated>2010-01-27T10:23:39Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap [http://mmtx.nlm.nih.gov/] is a highly powerful tool to map biomedical text to the UMLS [http://www.nlm.nih.gov/research/umls/] Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO [http://www.bioontology.org/] is developing a system [http://www.bioontology.org/annotator-service] to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [http://www.biomedcentral.com/1471-2105/10/S9/S14]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. &lt;br /&gt;
&lt;br /&gt;
Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact Clement Jonquet [mailto:jonquet@stanford.edu?subject=MetaMap%Installation] and Tejaswi Tenneti [mailto:tejaswit@stanford.edu?subject=MetaMap%Installation]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [https://bmir-gforge.stanford.edu/gf/project/obs/]&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
[a sentence to acknowledge the support of NLM]&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9700</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9700"/>
		<updated>2010-01-27T10:16:59Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* Presentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap [http://mmtx.nlm.nih.gov/] is a highly powerful tool to map biomedical text to the UMLS [http://www.nlm.nih.gov/research/umls/] Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO [http://www.bioontology.org/] is developing a system [http://www.bioontology.org/annotator-service] to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [http://www.biomedcentral.com/1471-2105/10/S9/S14]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. &lt;br /&gt;
&lt;br /&gt;
Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact Clement Jonquet [mailto:jonquet@stanford.edu?subject=MetaMap%Installation] and Tejaswi Tenneti [mailto:tejaswit@stanford.edu?subject=MetaMap%Installation]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [Gforge code location]&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
[a sentence to acknowledge the support of NLM]&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9699</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9699"/>
		<updated>2010-01-27T10:15:53Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* Presentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap [http://mmtx.nlm.nih.gov/] is a highly powerful tool to map biomedical text to the UMLS [http://www.nlm.nih.gov/research/umls/] Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO [http://www.bioontology.org/] is developing a system [http://www.bioontology.org/annotator-service] to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [http://www.biomedcentral.com/1471-2105/10/S9/S14]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact Clement Jonquet [mailto:jonquet@stanford.edu?subject=MetaMap%Installation] and Tejaswi Tenneti [mailto:tejaswit@stanford.edu?subject=MetaMap%Installation]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [Gforge code location]&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
[a sentence to acknowledge the support of NLM]&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9698</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9698"/>
		<updated>2010-01-27T10:09:51Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* Contacts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap is a highly powerful tool to map biomedical text to the UMLS Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO is developing a system to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [quote Nipun's paper]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact Clement Jonquet [mailto:jonquet@stanford.edu?subject=MetaMap%Installation] and Tejaswi Tenneti [mailto:tejaswit@stanford.edu?subject=MetaMap%Installation]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [Gforge code location]&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
[a sentence to acknowledge the support of NLM]&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9697</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9697"/>
		<updated>2010-01-27T10:03:04Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* Presentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap is a highly powerful tool to map biomedical text to the UMLS Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO is developing a system to annotate large numbers of data resources automatically, and have developed a prototype system for ontology-based annotation and indexing of biomedical data [quote Nipun's paper]. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. The goal of the project is to embed MetaMap into the annotator workflow. MetaMap is a very powerful for this task due to the use of complex NLP techniques in its concept recognition algorithm. Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary for NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact XX and YY [mailto:XXX?subject=YYY]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [Gforge code location]&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
[a sentence to acknowledge the support of NLM]&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9696</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9696"/>
		<updated>2010-01-27T09:55:51Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* Presentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Presentation ==&lt;br /&gt;
MetaMap is a highly powerful tool to map biomedical text to the UMLS Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
&lt;br /&gt;
NCBO is developing a system for automated, ontology-based access to online biomedical resources. As a part of the workflow a concept recognizer is used to recognize a given ontology concept in text. MetaMap is very powerful for this task due to the use of complex NLP techniques. Below listed is some of the useful processing done by MetaMap:&lt;br /&gt;
&lt;br /&gt;
1. Removal of problematic terms from data [numbers, single alphabets etc..]&lt;br /&gt;
&lt;br /&gt;
2. Lexical and Syntactic filtering to recognize long phrases accurately&lt;br /&gt;
&lt;br /&gt;
3. Identifying linguistic variants of base words and terms that have been computed using a variety of generation methods. This handles various forms like inflectional (heart → hearts), derivational (treat → treatment), synonyms (pyrosis ↔ heartburn), acronyms (vt ↔ ventricular tachycardia) and spellings (apnea ↔ apnoea)&lt;br /&gt;
&lt;br /&gt;
Such kind of rich semantic processing can drastically increase the number of concepts that can be recognized from a text. &lt;br /&gt;
&lt;br /&gt;
Although Metamap was originally built to work on UMLS concepts, its Data File builder utility (DFB) lets us create our own custom dictionary out of NCBO concepts.&lt;br /&gt;
&lt;br /&gt;
== Contacts ==&lt;br /&gt;
&lt;br /&gt;
* For questions or feature requests, contact XX and YY [mailto:XXX?subject=YYY]&lt;br /&gt;
&lt;br /&gt;
== Versions (prototypes &amp;amp; releases) ==&lt;br /&gt;
&lt;br /&gt;
* December 2009 - Second Annotator prototype including MetaMap: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
* November 2009 - Second Annotator prototype including Mmtx: [http://obs.bioontology.org/oba/OBA_v1.2_rest.html] &lt;br /&gt;
[Tejaswi: give detail about the release, and the problems of the installation e.g., the list of ontologies used]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [Gforge code location]&lt;br /&gt;
&lt;br /&gt;
== Collaboration &amp;amp; Acknowledgment ==&lt;br /&gt;
&lt;br /&gt;
[a sentence to acknowledge the support of NLM]&lt;br /&gt;
&lt;br /&gt;
== MetaMap Installation documentation ==&lt;br /&gt;
&lt;br /&gt;
The installation of MetaMap primarily involves 3 stages. Each of them are explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
=== Preparation of data ===&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up the workspace ===&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
=== Installation of Metamap ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
=== Running MetaMap ===&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9682</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9682"/>
		<updated>2010-01-22T10:35:48Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: /* Setting up the workspace */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
MetaMap is a highly powerful tool to map biomedical text to the UMLS Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
  &lt;br /&gt;
Installation of MetaMap primarily involves 3 stages. &lt;br /&gt;
&lt;br /&gt;
1.Preparation of data&lt;br /&gt;
&lt;br /&gt;
2.Setting up the workspace&lt;br /&gt;
&lt;br /&gt;
3.Installation of Metamap&lt;br /&gt;
&lt;br /&gt;
Each of the step is explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
== Preparation of data ==&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the workspace ==&lt;br /&gt;
&lt;br /&gt;
1. '''Install the Lexical Variant Generator (LVG)''' before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder, you also need to '''add LVG's bin directory''' {LVG_DIR}/bin to your program path:&lt;br /&gt;
&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. '''Install MetaMap''' using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution and invoke the install program:&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
'''A sample run of the installation script follows:'''&lt;br /&gt;
&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &lt;br /&gt;
&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]:&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. '''Make sure that the SKR/MedPOST tagger is running;''' to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
'''Incase there is an error''' due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the port you set in skrmedpostctl.   The environment variables that should be changed in SKRrun are:&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
== Installation of Metamap ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running MetaMap ==&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
	<entry>
		<id>https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9681</id>
		<title>MetaMap Installation</title>
		<link rel="alternate" type="text/html" href="https://www.bioontology.org//mediawiki/index.php?title=MetaMap_Installation&amp;diff=9681"/>
		<updated>2010-01-22T10:28:24Z</updated>

		<summary type="html">&lt;p&gt;Tejaswit: New page: == Introduction == MetaMap is a highly powerful tool to map biomedical text to the UMLS Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred t...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
MetaMap is a highly powerful tool to map biomedical text to the UMLS Metathesaurus or a custom Metathesaurus, equivalently, to discover Metathesaurus concepts referred to in text. The following article describes the way of using the Data File Builder utility inside MetaMap to build a concept recognizer for text containing NCBO terms.&lt;br /&gt;
  &lt;br /&gt;
Installation of MetaMap primarily involves 3 stages. &lt;br /&gt;
&lt;br /&gt;
1.Preparation of data&lt;br /&gt;
&lt;br /&gt;
2.Setting up the workspace&lt;br /&gt;
&lt;br /&gt;
3.Installation of Metamap&lt;br /&gt;
&lt;br /&gt;
Each of the step is explained below followed by instructions to run the newly installed custom MetaMap.&lt;br /&gt;
&lt;br /&gt;
== Preparation of data ==&lt;br /&gt;
 &lt;br /&gt;
There are primarily 4 files to be generated for the installation. &lt;br /&gt;
&lt;br /&gt;
'''1.MRCON:''' This file is primarily generated from the table OBS_TT. Below is a mapping between the columns in MRCON and OBS_TT. The columns listed in OBS_TT are used to fill their corresponding columns in MRCON file.&lt;br /&gt;
&lt;br /&gt;
MRCON                        OBS_TT&lt;br /&gt;
 &lt;br /&gt;
CUI (Concept Unique ID)      conceptID&lt;br /&gt;
&lt;br /&gt;
Language-	&lt;br /&gt;
Status			isPreferred 	&lt;br /&gt;
LUI(Lexical Unique ID)		 termID &lt;br /&gt;
String type					    -&lt;br /&gt;
SUI(String Unique ID)		 termID &lt;br /&gt;
String                       termName &lt;br /&gt;
LRL								-	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRCON table in database. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|ENG|P|L0027051|PF| S0064638|Myocardial Infarction|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2.MRSO:''' This file is primarily generated from the tables OBS_TT, OBS_OT and OBS_CT. Below is a mapping between the columns in MRSO and the above OBS tables. The columns listed in the tables are used to fill their corresponding columns in MRSO file.&lt;br /&gt;
&lt;br /&gt;
MRSO						OBS tables&lt;br /&gt;
CUI (Concept Unique ID)     OBS_TT.conceptID&lt;br /&gt;
LUI(Lexical Unique ID)		OBS_TT.termID&lt;br /&gt;
SUI(String Unique ID)		OBS_TT.termID &lt;br /&gt;
SABSourceAbbrev				OBS_OT.localOntologyID&lt;br /&gt;
TermType					OBS_TT.isPreferred&lt;br /&gt;
SourceID					OBS_OT.ontologyID&lt;br /&gt;
Restrictionlevel				-&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|L0027051|S0064638| MEDLINEPLUS|ET|T5|0|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3.MRSTY:''' This file is primarily generated from the table OBS_STT. Below is a mapping between the columns in MRSTY and OBS_STT. The columns listed in OBS_STT are used to fill their corresponding columns in MRSTY file.&lt;br /&gt;
&lt;br /&gt;
MRSTY 						OBS_STT&lt;br /&gt;
CUI (Concept Unique ID)     OBS_STT.conceptID&lt;br /&gt;
TUI (term Unique ID)        OBS_STT.localSemanticTypeID&lt;br /&gt;
STY 						OBS_STT.semanticTypeName	&lt;br /&gt;
&lt;br /&gt;
The sql command would fill correct values into MRSO table in database. &lt;br /&gt;
&lt;br /&gt;
'''Example entry row:'''&lt;br /&gt;
&lt;br /&gt;
C0027051|T047|Disease or Syndrome|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.st.raw:''' This file is primarily generated from the column semanticTypeName in the table OBS_STT. This file contains row of semantic type names and a short name for each of them. &lt;br /&gt;
&lt;br /&gt;
Example row:&lt;br /&gt;
semantic Type Name|semantictypename&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up the workspace ==&lt;br /&gt;
&lt;br /&gt;
1. Install the Lexical Variant Generator (LVG) before running&lt;br /&gt;
MetaMap's install program.  LVG is part of the Lexical Tools distribution and is  available from the Lexical Systems Group (http://lexsrv3.nlm.nih.gov/SPECIALIST/Projects/lvg/current/index.html).&lt;br /&gt;
&lt;br /&gt;
2. Before using MetaMap install program to install data file builder,&lt;br /&gt;
You also need to add LVG's bin directory {LVG_DIR}/bin to your&lt;br /&gt;
program path:&lt;br /&gt;
# in Bourne Again Shell (bash)&lt;br /&gt;
export PATH=$PATH:&amp;lt;LVG_DIR&amp;gt;/bin&lt;br /&gt;
&lt;br /&gt;
3. Install MetaMap using instructions at their site &lt;br /&gt;
&lt;br /&gt;
4. Unzip the DFB installation files in the same directory as MetaMap&lt;br /&gt;
&lt;br /&gt;
5. Connect to the new directory created by extracting the distribution&lt;br /&gt;
and invoke the install program:&lt;br /&gt;
cd &amp;lt;distribution directory&amp;gt;&lt;br /&gt;
./bin/install.sh&lt;br /&gt;
&lt;br /&gt;
A sample run of the installation script follows:&lt;br /&gt;
&lt;br /&gt;
^&amp;lt;&amp;lt;&lt;br /&gt;
Enter basedir of installation [/nfsvol/nlsaux15/public_mm] &amp;lt;user hits&lt;br /&gt;
                                                            return to get the default&amp;gt;&lt;br /&gt;
Basedir is set to /nfsvol/nlsaux15/public_mm.&lt;br /&gt;
&lt;br /&gt;
The WSD Server requires Sun's Java Runtime Environment (JRE)&lt;br /&gt;
Sun's Java Developer Kit (JDK) will work as well. if the&lt;br /&gt;
command: &amp;quot;which&amp;quot; java returns /usr/local/jre1.4.2/bin/java, then the&lt;br /&gt;
JRE resides in /usr/local/jre1.4.2/.&lt;br /&gt;
&lt;br /&gt;
Where does your distribution of Sun's JRE reside?&lt;br /&gt;
Enter home path of JRE (JDK) [/usr]: /nfsvol/nls/tools/Linux-i686/java1.4.2&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/java1.4.2 for JAVA_HOME.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/disambServer.cfg generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/WSD_Server/config/log4j.properties generated&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/SKRrun generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/metamap07 generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/wsdserverctl generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/bin/skrmedpostctl generated.&lt;br /&gt;
Install complete.&lt;br /&gt;
Would like to use a custom data set with MetaMap (use data file builder)? [yN]: &amp;lt;user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Is LVG installed? [yN] &amp;lt;The user types y and return&amp;gt;&lt;br /&gt;
&lt;br /&gt;
running Data File Builder Install...&lt;br /&gt;
Enter home path of LVG [/nfsvol/nls/tools/Linux-i686/lvg2009]: &amp;lt;user hits&lt;br /&gt;
                                                            return to get the default&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using /nfsvol/nls/tools/Linux-i686/lvg2009 for LVG_DIR.&lt;br /&gt;
&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.lvglab generated.&lt;br /&gt;
/nfsvol/nlsaux15/public_mm/scripts/dfbuilder/mm_variants/0doit.xwords generated.&lt;br /&gt;
Datafile Builder Setup is complete.&lt;br /&gt;
% &lt;br /&gt;
^&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. Make sure that the SKR/MedPOST tagger is running; to run the tagger, move to the public_mm directory present inside the working directory and invoke&lt;br /&gt;
./bin/skrmedpostctl start&lt;br /&gt;
&lt;br /&gt;
Incase there is an error due to a port number, change the port number in the following files and try to run the tagger again:&lt;br /&gt;
/bin/skrmedpostctl&lt;br /&gt;
&lt;br /&gt;
If you change the port number skrmedpostctl uses you need to change&lt;br /&gt;
public_mm/bin/SKRrun (or SKRrun.in and re-run install.sh) to match the&lt;br /&gt;
port you set in skrmedpostctl.   The environment variables that should&lt;br /&gt;
be changed in SKRrun are:&lt;br /&gt;
TAGGER_SERVER_DEFAULT_TCP_PORT&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_0&lt;br /&gt;
TAGGER_SERVER_TCP_PORT_1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. Inside the directory public_mm/sourceData create a directory for workspace&lt;br /&gt;
mkdir sourceData/09_custom&lt;br /&gt;
&lt;br /&gt;
Finally, Create a directory to store the knowledge sources:&lt;br /&gt;
mkdir sourceData/09_custom/umls&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation of Metamap ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First, run the BuildDataFiles program as follows:&lt;br /&gt;
&lt;br /&gt;
$fullpath/public_mm/bin/BuildDataFiles&lt;br /&gt;
&lt;br /&gt;
2. The file st.raw, located in $fullpath/public_mm/data/dfbuilder/2009 will need to be modified. Append the file generated in point 4 of Preparation of Data section to this file.&lt;br /&gt;
&lt;br /&gt;
3. Move to $fullpath/public_mm/sourceData/09_custom/01metawordindex and execute the following scripts in order&lt;br /&gt;
&lt;br /&gt;
./01CreateWorkFiles&lt;br /&gt;
&lt;br /&gt;
./02Suppress&lt;br /&gt;
&lt;br /&gt;
./03FilterPrep&lt;br /&gt;
&lt;br /&gt;
./04FilterStrict&lt;br /&gt;
&lt;br /&gt;
./05GenerateMWIFiles&lt;br /&gt;
&lt;br /&gt;
4. Move to 02treecodes directory and run 01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
cd ../02treecodes&lt;br /&gt;
&lt;br /&gt;
./01GenerateTreecodes&lt;br /&gt;
&lt;br /&gt;
5. Move to 03Variants directory and run 01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
cd ../03Variants&lt;br /&gt;
&lt;br /&gt;
./01GenerateVariants&lt;br /&gt;
&lt;br /&gt;
6. cd ../04synonyms &lt;br /&gt;
&lt;br /&gt;
./01GenerateSynonyms&lt;br /&gt;
&lt;br /&gt;
7. cd ../05abbrAcronyms&lt;br /&gt;
&lt;br /&gt;
./01GenerateAbbrAcronyms&lt;br /&gt;
&lt;br /&gt;
8. move to $fullpath/public_mm and run&lt;br /&gt;
&lt;br /&gt;
./bin/LoadDataFiles&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running MetaMap ==&lt;br /&gt;
&lt;br /&gt;
To run the newly installed MetaMap dfb, move to the main workspace folder (public_mm) and run the command below&lt;br /&gt;
&lt;br /&gt;
bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 -w ./lexicon ./bin/metamap09.BINARY -Z 09_custom ./resources/input -I&lt;/div&gt;</summary>
		<author><name>Tejaswit</name></author>
	</entry>
</feed>