7.6. MedEx-UIMA drug NLP

MedEx-UIMA NLP (for drugs and drug doses) [1] is supported via an external program. MedEx-UIMA runs in Java. CRATE supplies an external front-end Java program (CrateMedexPipeline.java) that loads the MedEx app, sends text to it (via a temporary disk file, for reasons relating to MedEx-UIMA’s internal workings), and returns answers.

7.6.1. Installation

  • Download it from https://sbmi.uth.edu/ccb/resources/medex.htm
  • CRATE provides Java code (see CrateMedexPipeline.java) to talk to MedEx-UIMA. Use crate_nlp_build_medex_java_interface to build this before you use it for the first time.
  • CRATE fixes some bugs in MedEx-UIMA. Run crate_nlp_build_medex_itself to rebuild MedEx and fix them.

7.6.2. crate_nlp_build_medex_java_interface

Options as of 2017-02-28:

usage: crate_nlp_build_medex_java_interface [-h] [--builddir BUILDDIR]
                                            [--medexdir MEDEXDIR]
                                            [--java JAVA] [--javac JAVAC]
                                            [--verbose] [--launch]

Compile Java classes for CRATE's interface to MedEx-UIMA

optional arguments:
  -h, --help           show this help message and exit
  --builddir BUILDDIR  Output directory for compiled .class files (default: /h
                       ome/rudolf/Documents/code/crate/crate_anon/nlp_manager/
                       compiled_nlp_classes)
  --medexdir MEDEXDIR  Root directory of MedEx installation (default:
                       /home/rudolf/dev/Medex_UIMA_1.3.6)
  --java JAVA          Java executable (default: java)
  --javac JAVAC        Java compiler (default: javac)
  --verbose, -v        Be verbose (use twice for extra verbosity)
  --launch             Launch script in demonstration mode (having previously
                       compiled it)

7.6.3. crate_nlp_build_medex_itself

This program builds MedEx and implements some bug fixes and improvements for the UK.

Options as of 2017-02-28:

usage: crate_nlp_build_medex_itself [-h] [--medexdir MEDEXDIR] [--javac JAVAC]
                                    [--deletefirst] [--verbose]

Compile MedEx-UIMA itself (in Java)

optional arguments:
  -h, --help           show this help message and exit
  --medexdir MEDEXDIR  Root directory of MedEx installation (default:
                       /home/rudolf/dev/Medex_UIMA_1.3.6)
  --javac JAVAC        Java compiler (default: javac)
  --deletefirst        Delete existing .class files first (optional)
  --verbose, -v        Be verbose

Footnotes

[1]MedEx UIMA reference publication: https://www.ncbi.nlm.nih.gov/pubmed/25954575
[2]MedEx-UIMA downloads: https://sbmi.uth.edu/ccb/resources/medex.htm