Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Step

Example

1. On the cTAKES downloads page, download the User Installation package.

Info

The download time will be commensurate with ~500MB of data.

 

2. (Recommended) Verify the downloaded files against a signature to ensure you have the proper and complete file.

From the following directory, download the signature file that corresponds to your download from step 1

https://www.apache.org/dist/ctakes/ctakes-4.0.0/ 

 Please do not download any of the files that end with .zip or .gz directly from apache.org/dist - use the downloads page listed in step 1 if you need to download cTAKES itself so that a mirror can be used.

No example

3. Unzip the file you downloaded into a directory that you want to be the cTAKES install location. The compressed files contain a single directory at the top level. This folder we will call <cTAKES_HOME>. You will need to refer to this directory later.

Windows:

Code Block
languagenone
C:\apache-ctakes-4.0.0

Linux:

Code Block
languagenone
/usr/local/apache-ctakes-4.0.0

Windows:

Linux:

Code Block
languagenone
tar -xvf apache-ctakes-4.0.0.bin.tar.gz -C /usr/local 

4. Download the cTAKES resources ZIP file with a matching version from the ctakesresources project (More information on cTAKES models). These resources are required to operate cTAKES.

Info

Due to licensing considerations, resources are hosted at an external location. For ease of installation, a single package was created 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.


Unzip the cTAKES resources file into a temporary location.

Windows:


Linux:

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

5. Copy (or move) the resources to cTAKES_HOME.
Copy the contents of the temporary resources directory (and all sub-directories) to <cTAKES_HOME>/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-4.0.0\resources C:\apache-ctakes-4.0.0\resources

Linux:

Code Block
langnone
cp -R /tmp/resources/* /usr/local/apache-ctakes-4.0.0/resources

Mac OSX:

Code Block
langnone
ditto /tmp/resources/* /usr/local/apache-ctakes-4.0.0/resources

...

  1. Using the bundled UIMA CAS Visual Debugger (CVD) to view the results stored as XCAS files or run the annotators
  2. Using the bundled UIMA Collection Processing Engine (CPE) to process documents in cTAKES_HOME/testdata directory

You These tools On Linux, you will need a windowing environment on Linux to run these tools.

Piper File

TBD

 

CAS Visual Debugger (CVD)

...

Step

Example

1. Open a command prompt and change to the cTAKES_HOME directory:

Note

It is best if <cTAKES_HOME> is your current directory. The scripts will change directories, so being home to run the command is best.


Windows:

Code Block
languagenone
cd \apache-ctakes-4.0.0

Linux:

Code Block
languagenone
cd /usr/local/apache-ctakes-4.0.0

2. Create a directory for some test data.

Windows:mkdir testdata

3. Download this sample file and place it into the testdata directory.

No example

4. Start the collection processing engine by running this command:
The application may take a minute to start on slower hardware.

Windows:

Code Block
languagenone
bin\runctakesCPE.bat

Linux:

Code Block
languagenone
bin/runctakesCPE.sh

5. This will bring up the Collection Processing Engine Configurator. In the Menu bar click File >Open CPE Descriptor

6. Navigate to the following file, which uses the AggregateCdaProcessor

Code Block
langnone
<cTAKES_HOME>
  /desc
    /ctakes-clinical-pipeline
      /desc
        /collection_processing_engine
          /test1.xml


Click Open.

No example

7. Change the Collection reader Reader input directory to testdata, which contains a CDA file(s).

Within the CAS Consumers pane of the same window, change the output directory to testdata/output

8. Click the Play button (green/blue play arrow near the bottom).

Info

What just happened? You placed a sample CDA document into the input of a pipeline. The pipeline was used a file system reader that will process all files in a directory. The processing was accomplished by the chunker cTAKES component (noted by the name of the Analysis Engine pictured). One resulting file for each input a pipeline of cTAKES components. The AggregateCdaProcessor allows for a parameter (Chunk Creator Class) to be passed to the Chunker annotator. For each input file, one resultant file was placed into the output directory. This Each output file is an XML file that annotates the noun phrases and verb phrasesincludes the annotations made by each component within the pipeline.

9. You should see that one document was processed. You did process a collection of documents. In this case the collection only contained one just to show how to do it. Close the results window.

Note

This example of using the CPE GUI did not use the UMLS resources. If you wish to perform named entity recognition or concept identification for anything other than a few words, you will need to 1) obtain the rights to use UMLS resources 2) add those credentials to cTAKES, and 3) use an aggregate a pipeline that makes use of those UMLS resources (see above).

10. Close the CPE application. You may be prompted to save changes. Since this was just a test you may click the No button.

No example

Using the same CVD and CPE programs in the manner described above, you can test all the other components. The analysis engines and collection processing engines shipped with cTAKES for some of the annotators are described in the following table.

...

Annotator

Description

Example Piper file

Example Collection processing Engine (CPE)

Clinical Pipeline

The pipeline to obtain concepts and their attributes

 <cTAKES_HOME>/TBD

<cTAKES_HOME>/desc/ctakes-clinical-pipeline/desc/collection_processing_engine/test1.xml

Chunker

Obtain cTAKES Obtains phrasal chunk annotations

<cTAKES_HOME>/TBD

NA

Dependency Parser

Obtain Obtains dependency parsing tree

<cTAKES_HOME>/TBD

<cTAKES_HOME>/desc/ctakes-dependency-parser/desc/collection_processing_engine/ClearParserTestCPE.xml

Drug NER

The annotator to obtain drug annotations

Finds mentions of medications and medication attributes such as dose, strength, frequency...

<cTAKES_HOME>/TBD 

<cTAKES_HOME>/desc/ctakes-drug-ner/desc/collection_processing_engine/DrugNER_PlainText_CPE.xml

Dictionary Lookup

Mapping cTAKES annotations to dictionaries Finds mentions of concepts from a dictionary (e.g., SNOMED _ CT or RxNorm

<cTAKES_HOME>/TBD

NA

Dictionary Lookup Fast

Finds mentions of concepts from a dictionary (e.g., SNOMED CT or RxNorm

 

Identifying terms related to PAD

<cTAKES_HOME>/TBD<cTAKES_HOME>/desc/ctakes-pad-term-spotter/desc/collection_processing_engine/Radiology_Sample.xml

NA

Relation Extractor

Annotate Finds certain relations (location of and degree of) between certain Event, Entity, and Modifier annotations

<cTAKES_HOME>/TBD

N/A

Smoking Status

The annotator to obtain Finds document or patient-level smoking status

<cTAKES_HOME>/TBD

<cTAKES_HOME>/desc/ctakes-smoking-status/desc/collection_processing_engine/Sample_SmokingStatus_output_flatfile.xml

Side Effect

The annotator to find Finds side effect mentions and sentences from clinical documents

<cTAKES_HOME>/TBD

<cTAKES_HOME>/desc/ctakes-side-effect/desc/collection_processing_engine/SideEffectCPE.xml

...