Versions Compared

Key

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

...

<arguments> <argument>-Dctakes.umlsuser=MyUMLSID</argument> <argument>-Dctakes.umlspw=MyUMLSPassword</argument> </arguments>

Step

Example

1. Checkout the cTAKES project.

Info

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


Windows/Linux:

Code Block
langnone
cd /
svn co https://svn.apache.org/repos/asf/incubator/ctakes/trunk cTAKES-3.0

The parameter on the end will be created as a new directory in your current location.

Note

For Linux, make sure that you have write access to the directory that you are in.


Windows:

Code Block
langnone
C:\>cd /
C:\>svn co https://svn.apache.org/repos/asf/incubator/ctakes/trunk cTAKES-3.0

 ...

A ctakes-3.0\ctakes-type-system\pom.xml
A ctakes-3.0\ctakes-type-system\.settings
A ctakes-3.0\ctakes-type-system\.settings\org.eclipse.jdt.core.prefs
A ctakes-3.0\ctakes-type-system\.settings\org.eclipse.core.resources.prefs
A ctakes-3.0\ctakes-type-system\desc
A ctakes-3.0\DISCLAIMER
Checked out revision 1433729.

C:\>cd cTAKES-3.0
C:\cTAKES-3.0>

Linux:

Code Block
langnone
tbleeker@system:~$ cd /
tbleeker@system:/$ svn co https://svn.apache.org/repos/asf/incubator/ctakes/trunk cTAKES-3.0

...

A ctakes-3.0/ctakes-type-system/pom.xml
A ctakes-3.0/ctakes-type-system/.settings
A ctakes-3.0/ctakes-type-system/.settings/org.eclipse.jdt.core.prefs
A ctakes-3.0/ctakes-type-system/.settings/org.eclipse.core.resources.prefs
A ctakes-3.0/ctakes-type-system/desc
A ctakes-3.0/DISCLAIMER
Checked out revision 1434842.

tbleeker@system:/$ cd cTAKES-3.0/
tbleeker@system:/cTAKES-3.0$ 

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

Go to http://sourceforge.net/projects/ctakesresources/files/ and download the ZIP file with a matching version from the ctakesresources project.
Download time will be commensurate with 1GB of data.
Unzip the files into a temporary location.

Windows:

Code Block
langnone
C:\temp\ctakes-resources-3.0.1\resources

Linux:

Code Block
langnone
/tmp/ctakes-resources-3.0.1/resources

3. 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:\cTAKES-3.0\ctakes-dictionary-lookup\resources

Linux:

Code Block
langnone
copy /tmp/ctakes-resources-3.0.1/resources/* /cTAKES-3.0/ctakes-dictionary-lookup/resources/*

4. Compile the complete set.

Make sure you are in the proper directory.

Windows/Linux:

Code Block
langnone
mvn clean compile package


Note

For Linux, make sure you are using the user that has access to the files in your cTAKES directory.

Windows/Linux:

Code Block
langnone
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache cTAKES ..................................... SUCCESS [59.140s]
[INFO] Apache cTAKES common type system .................. SUCCESS [41.856s]
[INFO] Apache cTAKES utils ............................... SUCCESS [6.255s]
[INFO] Apache cTAKES core ................................ SUCCESS [17.940s]
[INFO] Apache cTAKES part-of-speech tagger ............... SUCCESS [5.148s]
[INFO] Apache cTAKES chunker ............................. SUCCESS [3.027s]
[INFO] Apache cTAKES document preprocessor ............... SUCCESS [4.118s]
[INFO] Apache cTAKES dictionary lookup ................... SUCCESS [1:14.740s]
[INFO] Apache cTAKES context dependent tokenizer ......... SUCCESS [5.975s]
[INFO] Apache cTAKES LVG lexical tools ................... SUCCESS [7.831s]
[INFO] Apache cTAKES named entity contexts ............... SUCCESS [4.743s]
[INFO] Apache cTAKES Constituency Parser ................. SUCCESS [9.516s]
[INFO] Apache cTAKES Dependency Parser ................... SUCCESS [32.386s]
[INFO] Apache cTAKES Assertion's zoner ................... SUCCESS [2.152s]
[INFO] Apache cTAKES Assertion ........................... SUCCESS [12.200s]
[INFO] Apache cTAKES ctakes-clinical-pipeline ............ SUCCESS [4.446s]
[INFO] Apache cTAKES Relation Extractor .................. SUCCESS [13.634s]
[INFO] Apache cTAKES CoReference Resolver ................ SUCCESS [8.923s]
[INFO] Apache cTAKES Drug NER ............................ SUCCESS [6.958s]
[INFO] Apache cTAKES Side Effects ........................ SUCCESS [7.566s]
[INFO] Apache cTAKES Smoking Status ...................... SUCCESS [8.377s]
[INFO] Apache cTAKES Pad Term Spotter .................... SUCCESS [9.048s]
[INFO] Apache cTAKES Temporal Information Extraction ..... SUCCESS [33.993s]
[INFO] Apache cTAKES Distribution ........................ SUCCESS [17:59.809s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24:22.120s
[INFO] Finished at: Wed Jan 16 17:44:35 CST 2013
[INFO] Final Memory: 41M/181M
[INFO] ------------------------------------------------------------------------
...



5. Add the resources as a folder to the classpath.
Make sure the current path or dot (.) is in your CLASSPATH environment variable accessible to the process maven is running in.

No example

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

# Environment variable - Set or export environment

variable

variables.
Refer to the Eclipse documentation above for more information.

  1. Add the system properties to the Java arguments for running the UIMA GUIs. (Shown in the next cell)
    Edit the file <cTAKES_HOME>\ctakes-clinical-pipeline\pom.xml the maven environment.
    Add these parameters as arguments to the runCVD or runCPE profile plugin configuration to the MAVEN_OPTS environment variable in the next section as you run the commands to process documents.
    No Format
    -Dctakes.umlsuser=<username> -Dctakes.umlspw=<password>
    
    Make sure you make the ID and password specific to you.
  2. Change the UMLSUser and UMLSPW <nameValuePair> strings in these descriptor files with your UMLS username and password.
    Refer to the Eclipse documentation above for more information.
No Format

No example

Process documents using cTAKES

Step

Example

1. Launching the UIMA CAS Visual Debugger (CVD) or the Collection Processing Engine (CPE) can now be accomplished in the ctakes-clinical-pipeline project:

Windows:

Code Block
langnone
set MAVEN_OPTS="-Xmx2g -Xms1g"
mvn -Prun<CVD|CPE> compile

Linux:

Code Block
langnone
export MAVEN_OPTS="-Xmx2g -Xms1g"
mvn -Prun<CVD | CPE> compile

where you must select between CVD and CPE in the command.


(Optional) Process data.

Now that you can launch the tools, the User Guide has steps to walk you through processing test data if you want to go there.

Note

The User Guide describes files in the form that they came in the binary distributions. That form does not match the form when you checkout the code as we have done here.

For developers there is only one directory named "desc" in a path. When you use the User Guide you must ignore the first "desc" shown in a path.


No example

...