Versions Compared

Key

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

...

 

 

Step

 

 

Example

1. Open a command prompt and change to the cTAKES_HOME directory, which is the directory that contains subdirectories like bin, desc, resources, lib.

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.

mkdir testdata

3. The sample dictionary that does not require UMLS rights contains only a few terms.

Create a file containing the sentence at right into the testdata directory.

The patient says they took 325 mg aspirin for knee pain.

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 AggregatePlaintextProcessor

 

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


Click Open.

No example

7. Change the Collection Reader input directory to testdata, which contains the files to process

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? The pipeline used a file system reader that will process all files in a directory. The processing was accomplished by a pipeline of cTAKES components. For each input file, one resultant file was placed into the output directory. Each output file is an XML file that includes the annotations made by each component within the pipeline. (The AggregatePlaintextProcessor allows for the Chunk Creator Class parameter to be passed to the Chunker annotator.)

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 Performance Report 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 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

 

cTAKES

...

Pipeline Fabricator GUI (Creating Piper Files)

The cTAKES GUI can be launched using bin\runPiperCreator.bat or bin\runPiperCreator.sh

...