SKR API Logo

 Home    NLM » LHNCBC » SKR » API

Contents:
       SKR API Download No Source Button
Whenever you see Information Mark Symbol in the text below, it means that additional information is available by selecting the symbol.

Introduction:
This Java-based API to the SKR Scheduler facility was created to provide users with the ability to programmatically submit jobs to the Scheduler Batch and Interactive facilities instead of using the web-based interfaces. We have tried to reproduce full functionality for all of the programs under the SKR Scheduler umbrella.

Background:
The Semantic Knowledge Representation (SKR) Project was initiated at NLM in order to develop programs to provide usable semantic representation of biomedical free text by building on resources currently available at the library.

The SKR project is concerned with reliable and effective management of the information encoded in natural language texts. The project develops programs that provide usable semantic representation of biomedical text by building on resources currently available at the Library, especially the UMLS knowledge sources and the natural language processing tools provided by the SPECIALIST system.

Two programs in particular, MetaMap/SKR and SemRep, are being evaluated and enhanced and applied to a variety of problems in the management of biomedical information. These include automatic indexing of MEDLINE citations, concept-based query expansion, analysis of complex Metathesaurus strings, accurate identification of the terminology and relationships in anatomical documents, and the extraction of chemical binding relations from biomedical text.


Prerequisites and Notices:
Please Note
This software is produced by an agency of the U.S. Government, and by statute is not subject to copyright in the United States. Recipients of this software assume all responsibilities associated with its operation, modification, and maintenance.
Please Note: Users are responsible for compliance with the UMLS copyright restrictions.

To use this application, you must have signed the UMLS agreement. The UMLS agreement requires those who use the UMLS to file a brief report once a year to summarize their use of the UMLS. It also requires the acknowledgment that the UMLS contains copyrighted material and that those copyright restrictions be respected. The UMLS agreement requires users to agree to obtain agreements for EACH copyrighted source prior to it's use within a commercial or production application.

[Use of all the sources is permitted if the application is for research only.]


Download:

Change History
Version 1.3 Initial Public Release September 6, 2007
Version 1.4 Minor Change Release (Updated defaults) July 2, 2008

  Version Notes Sizes
SKR API Download With Source Button 1.4 Library, Examples, Documentation, and all Source Code (302KB)
[1059KB]
SKR API Download No Source Button 1.4 Library, Examples, and Documentation
No Source Code Version
(241KB)
[863KB]
Note: sizes of compressed archive files are in parenthesis "()", the uncompressed size of contents are in brackets "[]".

Installation:

To install the SKR API, do the following:
  1. Make a top level directory to store the SKR API program.

  2. Go to the SKR API page from the SKR homepage.

  3. Download the latest version of the SKR API into the directory created in #1.

  4. Change directory to the directory created in #1

  5. Extract the jar files from the downloaded jar file - either SKR_API_V1_4.jar or SKR_API_V1_4_noSource.jar.
  6. This will create a directory called "SKR_API_V1_4" or "SKR_API_V1_4_noSource" in the directory you created in #1 and fill it with all of the program files needed.

  7. Now, change to this new directory: cd SKR_API_V1_4

  8. You are now ready to run. Look at the example programs in the "Examples" subdirectory for ideas on what to do. There is also a 00Note file located in the "Examples" directory which shows you how to compile and run the example programs.

Overview of What Happens:

The SKR API has been designed to allow you to interact with our web-based Scheduler using either our Batch or Interactive facilities.


Example Programs:

There are several example files included to show the various ways to access the SKR Scheduler routines. These are all located in the Examples directory.

SKRBatch.java: Example program for submitting a new SKR Batch job request to the Scheduler to run. You will be prompted for your username and password and if they are alright, the job is submitted to the Scheduler and the results are returned in the String "results" below.

This example shows how to setup a basic SKR Batch job with a small file (medlin25.txt) with ASCII MEDLINE formatted citations as input data. You must set the Email_Address variable and use the UpLoad_File to specify the data to be processed. This example also shows the user setting the silentEmail option which tells the Scheduler to NOT send email upon completing the job.

This example also shows one way to setup which arguments you want to use for the SKR program ("mySKRObj.setArgs("-ApcsmtDalbIr 980 -n");". This tells SKR to use our normal options (-ApcsmtDalb) and additionally, use the -I (show CUIs), -r 980 (threshold), and -n (number Candidates). The result that comes back from SKR is then just printed to the standard output.
 
SKRInteractive.java: Example program for submitting a new SKR Interactive job request to the Scheduler to run. You will be prompted for your username and password and if they are alright, the job is run and the results are returned in the String "results" below.

This example shows how to setup a basic SKR Interactive job with a short sentence of free text as input data. You must set the Email_Address variable and use the APIText variable to specify the data to be processed.

This example also shows one way to setup which arguments you want to use for the SKR program ("mySKRObj.setArgs("-ApcsmtDalbIr 980 -n");". This tells SKR to use our normal options (-ApcsmtDalb) and additionally, use the -I (show CUIs), -r 980 (threshold), and -n (number Candidates). The result that comes back from SKR is then just printed to the standard output.
 
SKR_II_Interactive.java: This example displays an alternate method of setting up which arguments you want to use for the SKR program by using the setField method instead of the setArgs method. This version sets the exact same arguments as the SKRInteractive program and receives the same results back.
 
MTIBatch.java: Example program for submitting a new MTI Batch job request to the Scheduler to run. You will be prompted for your username and password and if they are alright, the job is submitted to the Scheduler and the results are returned in the String "results" below.

This example shows how to setup a basic MTI Batch job with a small file (medlin25.txt) with ASCII MEDLINE formatted citations as input data. You must set the Email_Address variable and use the UpLoad_File to specify the data to be processed. This example also shows the user setting the silentEmail option which tells the Scheduler to NOT send email upon completing the job.

This example also shows one way to setup which arguments you want to use for the MTI program ("myMTIObj.setArgs("-opt1_DCMS");". This tells MTI to use the opt1 variant of our DCMS processing options to process our data. The results that come back from MTI are then just printed to the standard output.
 
MTIInteractive.java: Example program for submitting a new MTI Interactive job request to the Scheduler to run. You will be prompted for your username and password and if they are alright, the job is submitted to the Scheduler and the results are returned in the String "results" below.

This example shows how to setup a basic MTI Interactive job with a short sentence of free text as input data. You must set the Email_Address variable and use the APIText variable to specify the data to be processed.

This example also shows one way to setup which arguments you want to use for the MTI program ("myMTIObj.setArgs("-opt1_DCMS -display_full");". This tells MTI to use the opt1 variant of our DCMS processing options to process our data and then to display all of the possible terms (-display_full) inorder instead of the default max of 25. The result that comes back from MTI is then just printed to the standard output.
 
SemRepBatch.java: Example program for submitting a new SemRep Batch job request to the Scheduler to run. You will be prompted for your username and password and if they are alright, the job is submitted to the Scheduler and the results are returned in the String "results" below.

This example shows how to setup a basic SemRep Batch job with a small file (medlin25.txt) with ASCII MEDLINE formatted citations as input data. You must set the Email_Address variable and use the UpLoad_File to specify the data to be processed. This example also shows the user setting the silentEmail option which tells the Scheduler to NOT send email upon completing the job.

This example also shows one way to setup which arguments you want to use for the SemRep program ("mySemRepObj.setArgs("-D");". This tells SemRep to use the "Full Fielded Output" when processing the data. The results that come back from SemRep are then just printed to the standard output.
 
SemGenBatch.java Example program for submitting a new SemGen Batch job request to the Scheduler to run. You will be prompted for your username and password and if they are alright, the job is submitted to the Scheduler and the results are returned in the String "results" below.

This example shows an alternate method to specifying which file to upload. This example reads in the small file (medlin25.txt) with ASCII MEDLINE formatted citations as input data and builds a String with the data which is then sent to the Scheduler instead of the file reference.

You must set the Email_Address variable and use the APIText variable to specify the data to be processed. This example also shows that the user did not specify the silentEmail option, so they will have a notification email sent to the address in the Email_Address specification.

This example also has SemGen using just the default setup when processing the data. The results that come back from SemGen are then just printed to the standard output.
 
GenericBatch.java Example program for submitting a new Generic Batch with Validation job ("GenericObject(true)" turns on validation) request to the Scheduler to run. You will be prompted for your username and password and if they are alright, the job is submitted to the Scheduler and the results are returned in the String "results" below.

NOTE: There is no Interactive facility for Generic jobs at this point.

This example shows how to setup a basic Generic Batch with Validation job with a small file (medlin25.txt) with ASCII MEDLINE formatted citations as input data. You must set the Email_Address variable and use the UpLoad_File to specify the data to be processed. This example also shows the user setting the silentEmail option which tells the Scheduler to NOT send email upon completing the job.

This example is set to run the MTI (Medical Text Indexer) program using the -opt1_DCMS and -E options. You can also setup any environment variables that will be needed by the program by setting the Batch_Env field.


How to Compile and Run:
Details on Supported Programs:

Programs Accessible via SKR API: Select each link to see notes about and what options are available for each of the programs.

Programming Notes:

Required Fields   Batch Specific Optional Fields
General Description Short Name Form Name Type
Email Address Email_Address Email_Address String
Internal Text field APIText APIText String
File to Upload UpLoad_File UpLoad_File String
You must specify either the APIText or the UpLoad_File.
* Interactive Mode will ONLY accept the APIText field.
* Batch Mode will accept either field being specified.
 
General Description Short Name Form Name Type
Silent on Errors Question Mark Symbol: Help about Silent on Errors ESilent ESilent Boolean
Single Line Delimited Input   Question Mark Symbol: Help about Single Line Delimited Input SingLine SingLine Boolean
Single Line Delimited Input w/ID Question Mark Symbol: Help about Single Line Delimited Input w/ ID SingLinePMID SingLinePMID Boolean
Requested Run Priority Level Question Mark Symbol: Help about Requested Run Priority Levels RPriority RPriority String
No Completion Email Question Mark Symbol: Help about the No Completion Email option SilentEmail SilentEmail Boolean

Last Modified: July 03, 2008 ii-public
Links to Our Sites
MetaMap Public Release
NEW: Distributable version of the actual MetaMap program.
Indexing Initiative (II)
Investigating computer-assisted and fully automatic methodologies for indexing biomedical text. Includes the NLM Medical Text Indexer (MTI).
Semantic Knowledge Representation (SKR)
Develop programs to provide usable semantic representation of biomedical text. Includes the MetaMap and SemRep programs.
MetaMap Transfer (MMTx)
Java-Based distributable version of the MetaMap program.
Word Sense Disambiguation (WSD)
Test collection of manually curated MetaMap ambiguity resolution in support of word sense disambiguation research.
Medline Baseline Repository (MBR)
Static MEDLINE Baselines for use in research involving biomedical citations. Allows for query searches and test collection creation.
Lister Hill Center Homepage Link - Image of Lister Hill Center Lister Hill National Center for Biomedical Communications   NLM Homepage Link - NLM Logo U.S. National Library of Medicine   NIH Homepage Link - NIH Logo National Institutes of Health
DHHS Homepage Link - DHHS Logo Department of Health and Human Services
     Contact Us    |   Copyright    |   Privacy    |   Accessibility    |   Freedom of Information Act    |   USA.gov    Get Acrobat Reader button