Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fix some typos, clarify which resources

...

Step

Example

1. Import the cTAKES projects using Maven.

File -> Import ... -> Maven -> Check out Maven Projects from SCM.
Click Next.


Info

The following location is the main trunk of cTAKES. See how cTAKES treats the trunk, branches, and tags in the developer FAQs.

2. For SCM URL use "svn" in the drop-down and this in the text field

Code Block
langnone
https://svn.apache.org/repos/asf/ctakes/trunk

Click Finish.
Eclipse will download and build all of the cTAKES sub-projects including running jcasgen as needed.

Info

Due to the way Maven and Eclipse work together you will see two copies of the sub-projects in Eclipse. If you look into your workspace directories there is only one set of underlying files.



3. Download cTAKES 3.0 Dictionaries and models.

Info

Due to licensing considerations and easy of installability, one download from an external location was established with all the resources you will need. Licensing for these resources is found within the download.

Info

Download time will be commensurate with 1GB of data.


Windows:
Go to cTAKES resources and download the ZIP file with a matching version from the ctakesresources project.
Unzip the files into a temporary location such as C:\temp.

Linux:
Obtain the URL of the version matching ZIP file from cTAKES resources, get the file, and unzip to a temporary location.

Windows:


Linux:

Code Block
langnone
cd /tmp
wget http://sourceforge.net/projects/ctakesresources/files/ctakes-resources-3.0.1.zip
sudo unzip ctakes-resources-3.0.1.zip

4. Copy (or move) the resources to cTAKES_HOME.
With Eclipse, cTAKES_HOME will be your workspace location followed by the project name "ctakes". Copy the contents of the temporary resources directory (and all sub-directories) to <cTAKES_HOME>/ctakes-dictionary-lookup/resources.

Info

There may be conflicts while taking this action. Overwrite the cTAKES_HOME files with those in the resources download.

Windows:

Code Block
langnone
xcopy /s C:\temp\ctakes-resources-3.0.1\resources C:\Users\<userID>\workspace\ctakes\ctakes-dictionary-lookup\resources

Linux:

Code Block
langnone
cp -R /tmp/resources/* <LINUX_ECLIPSE_WORKSPACE_HOME>/ctakes/ctakes-dictionary-lookup/resources

5. Refresh Eclipse.

You must refresh your Eclipse projects to make sure that Eclipse knows about the new directories and data.

No example

6. Add the ctakes-dictionary-lookup/resources as a folder to the classpath.
You will need to repeat this step for ALL EACH project that you wish to use the needs access to those resources (nearly all of them do except for ctakes-relation-extractor). For example:

Open the properties on the top-level project ctakectakes-clicicalclinical-pipeline. For Eclipse, do not select the one under the ctakes project but the sibling to that at the highest level. Select Java Build Path -> Libraries tab -> Add Class Folder ... button.
Select the resources directory under the ctakes-dictionary-lookup.
Click OK on all dialogs until you are out of the sequence.


7. UMLS user ID and password.
Usually the dictionaries are required to process data. If you plan to utilize the UMLS dictionaries you must pass your UMLS user ID and password to the pipeline. There are several ways to do this - select one.

Note

If you do not have a UMLS username and password, you may request one at UMLS Terminology Services

  1. Environment variable - Set or export environment variable

    No Format
    ctakes.umlsuser=<username>, ctakes.umlspw=<password>
    
  2. Add the system properties to the Java arguments for a run configuration (shown in the next cell). Navigate to ctakes-clinical-pipeline -> resources -> launch > UIMA_<CVD | CPE>GUI--clinical_documents pipeline.launch. Right-click on the launch file and select Run-As -> Run Configurations... In the Arguments tab enter these parameters in the VM. Click Apply.

    No Format
    -Dctakes.umlsuser=<username> -Dctakes.umlspw=<password>
    
  3. Change the UMLSUser and UMLSPW <nameValuePair> strings in these descriptor files with your UMLS username and password.
    • Dictionary Lookup: <cTAKES_HOME>/desc/ctakes-dictionary-lookup/desc/analysis_engine/DictionaryLookupAnnotatorUMLS.xml* (optional) Drug NER: <cTAKES_HOME>/desc/ctakes-drug-ner/desc/analysis_engine/DictionaryLookupAnnotatorUMLS.xml
      The following shows where in the files you would make the changes. (Do not change the <configurationParameters> by the same name.)
      Code Block
      languagenone
            <nameValuePair>
              <name>ctakes.umlsuser</name>
              <value>
                <string>YOUR_UMLS_USERNAME_HERE</string>
              </value>
            </nameValuePair>
            <nameValuePair>
              <name>ctakes.umlspw</name>
              <value>
                <string>YOUR_UMLS_PASSWORD_HERE</string>
              </value>
            </nameValuePair>
    • Now include the DictionaryLookupAnnotatorUMLS.xml Analysis Engine within your aggregate Analysis Engine or switch to the ones provided by cTAKES. cTAKES has provided duplicates of shipped Analysis Engine descriptors, put UMLS in the name, and placed DictionaryLookupAnnotatorUMLS.xml within them for these components:
      • Dictionary Lookup
      • Clinical Documents pipeline
      • Drug NER
      • Side Effect 
    • So you simply need to switch to using those descriptors. For example, if you were using AggregateCdaProcessor.xml in the Clinical Documents pipeline you would switch to using AggregateCdaUMLSProcessor.xml instead and you will now hook into the complete dictionaries.

      You can, of course, modify your own aggregate Analysis Engine files and place the DictionaryLookupAnnotatorUMLS.xml Analysis Engine within them.
      Since this is an in-memory database implementation, please be patient during the initial load as it could take approximately 20-30 seconds for the database to initialize.




...