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:

Note

Note that <cTAKES_HOME>/bin must be your current directory unless you are skilled at setting paths on your machine.


Windows:

Code Block
languagenone
cd \apache-ctakes-3.0.0-incubating\bin

Linux:

Code Block
languagenone
cd /usr/local/apache-ctakes-3.0.0-incubating/bin

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

Windows:

Code Block
languagenone
runctakesCPE.bat

Linux:

Code Block
languagenone
runctakesCPE.sh

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

4. Navigate to the file

Code Block
languagenone
<cTAKES_HOME>/desc/ctakes-clinical-pipeline/desc/collection_processing_engine/test_plaintexttest1.xml

Click Open.

Info

If you have been directed here as a developer the first "desc/" will not be in the path.

No example

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

6. 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.


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

 

8. Open a new command prompt and change to the <cTAKES_HOME>

 

9. To test the results there is a comparison tool that will help show that the results match expectations with the following syntax:

Code Block
languagenone
java -cp ctakes-utils-3.0.0.jar org.apache.ctakes.utils.xcas_comparison.Compare
<First File> <Second File> <diff-html>

Where: <First File> is the first file to compare; <Second File> is the second file to compare; <diff-html> is where the results are written to
Copy and paste the example at the right (next cell) which has had our
example files already substituted into a command prompt to run. In this
case we have shipped an example of what the output should be for you to
compare against.

Windows:

Code Block
languagenone
java -cp ctakes-utils-3.0.0.jar org.apache.ctakes.utils.xcas_comparison.Compare ^
"testdata\cdptest\testoutput\plaintext\sample_note_plaintext.xml" ^
"testdata\cdptest\testsampleoutput\plaintext\sample_note_plaintext.xml" ^
c:\stuff\diff-html.html


Linux:

Code Block
languagenone
java -cp ctakes-utils-3.0.0.jar org.apache.ctakes.utils.xcas_comparison.Compare \
"/usr/bin/cTAKES3.0/testdata/cdptest/testoutput/plaintext\sample_note_plaintext.xml" \
"/usr/bin/cTAKES3.0/testdata/cdptest/testsampleoutput/plaintext/sample_note_plaintext.xml" \
/tmp/diff-html.html

10. The resulting file will open for you. Look at the comparison to see the annotations resulting from this pipeline.
Windows:

Code Block
languagenone
c:\stuff\diff-html.html

Linux:

Code Block
languagenone
/tmp/diff-html.html

 

...

Annotator

Description

Abbreviated

Example Analysis Engine (AE)

Example Collection processing Engine (CPE)

Example test data

Clinical Document Pipeline

the complete cTAKES pipeline to obtain majority of cTAKES annotations

cdp

cTAKES_HOME/desc/ctakes-clinical-pipeline/desc/analysis_engine/AggregatePlaintextProcessor.xml

cTAKES_HOME/desc/ctakes-clinical-pipeline/desc/collection_processing_engine/test_plaintexttest1.xml

cTAKES_HOME/testdata/cdptest

Chunker

obtain cTAKES chunking annotations

chunker

cTAKES_HOME/desc/ctakes-chunker/desc/ChunkerAggregate.xml

cTAKES_HOME/desc/ctakes-chunker/desc/ChunkerCPE.xml

cTAKES_HOME/testdata/chunkertest

Dependency Parser

obtain dependency parsing tree

dp

cTAKES_HOME/desc/ctakes-dependency-parser/desc/analysis_engine/ClearParserSRLTokenizedInfPosAggregate.xml

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

cTAKES_HOME/testdata/dptest

Drug NER

the annotator to obtain drug annotations

drugner

cTAKES_HOME/desc/ctakes-drug-ner/desc/analysis_engine/DrugAggregatePlaintextProcesor.xml

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

cTAKES_HOME/testdata/drugnertest

Dictionary Lookup

mapping cTAKES annotations to dictionaries (e.g., SNOMED_CT or RxNorm

lookup

cTAKES_HOME/desc/ctakes-dictionary-lookup/desc/analysis_engine/TestAggregateTAE.xml

cTAKES_HOME/desc/ctakes-dictionary-lookup/desc/collection_processing_engine/LookupCPE.xml

cTAKES_HOME/testdata/lookuptest

PAD Term Spotter

identifying terms related to PAD

pad

cTAKES_HOME/desc/ctakes-pad-term-spotter/desc/analysis_engine/Radiology_TermSpotterAnnotatorTAE.xml

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

cTAKES_HOME/testdata/padtest

Smoking Status

the annotator to obtain document or patient-level smoking status

smoking

cTAKES_HOME/desc/ctakes-smoking-status/desc/analysis_engine/SimulatedProdSmokingTAE.xml

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

cTAKES_HOME/testdata/smokingtest

Side Effect

the annotator to find side effect mentions and sentences from clinical documents

sideeffect

cTAKES_HOME/desc/ctakes-side-effect/desc/analysis_engine/SideEffectAggregateTAE.xml

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

cTAKES_HOME/testdata/sideeffecttest

...