Versions Compared

Key

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

...

Step

Example

1. Download and install Eclipse 4.2+.

(optional) It is recommended that you start a new workspace to keep your cTAKES projects separate from other work.

No example

2. Subversion Eclipse plug-in (based on Subversive site). We will use the one called "Subversive - SVN Team Provider"

Help -> Install New Software...
Select the current Eclipse release (in the case of Eclipse 4 it is Juno) for the "Work with" field:

Code Block
langnone
Juno - http://download.eclipse.org/releases/juno

Expand the Collaboration category.
Select "Subversive SVN Team Provider".
Click Next.
Click Next.
Agree to the license agreement.
Click Finish.
Restart Eclipse.

3. Subversion team provider connectors 1.7+.

After restarting Eclipse a dialog will ask you to install an SVN Kit for the Team Provider.
Select SVN Kit 1.7 or greater.
Click Finish.
Click Next.
Click Next.
Agree to the license agreement.
Click Finish.
Accept the security warning (if one appears).
Restart Eclipse.



4. Maven is already part of Eclipse, but more integration to Maven commands is needed.

Help -> Install New Software...
Select the current Eclipse release (in the case of Eclipse 4 it is Juno) for the "Work with" field:

Code Block
langnone
Juno - http://download.eclipse.org/releases/juno

Expand the Collaboration category.
Select "m2e - Maven Integration for Eclipse".
Click Next.
Click Finish.
Restart Eclipse.

5. Maven SCM connector.

File -> Import ... -> Maven -> Check out Maven Projects from SCM.
Click Next.
Click the "m2e Marketplace" link.
You are now in the m2e Marketplace not the Eclipse Marketplace.
Scroll to and select m2e-subversive.
Click Finish.
Leave the defaults to install the "Maven SCM Handler for Subversive" and click Next.
Click Next.
Accept the license agreement.
Click Finish.
Accept the security warning (if one appears).
Restart Eclipse.



...

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/incubator/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.

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

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
copy /tmp/ctakes-resources-3.0.1/resources/* /usr/local/apache-ctakes-3.0.0-incubating/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 resources as a folder to the classpath.
You will need to repeat this step for ALL project that you wish to use the resources (nearly all of them do except for ctakes-relation-extractor). For example:

Open the properties on the top-level project ctake-clicical-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
    export 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.




...

Step

Example

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

Code Block
langnone
<cTAKES_HOME>
  \ctakes>ctakes-clinical-pipeline
   >resources \resources
    >launch
  \launch
        >UIMA\UIMA_<CVD | CPE>GUI--clinical_documents pipeline.launch

where you must select between CVD and CPE in the command. Right-click on the launch file and select Run-As -> UIMA_<CVD | CPE>GUI-clinical_documents.

Info

Note: Don't forget to set the location of the resources and your UMLS user ID and password if you have not done so for a particular project or run configuration.



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

...

(Optional) UIMA tools plug-in

...

Step

Example

1. Install an SVN client.

Info

Run this command to check the setup.
svn --version



Windows:
We used a binary package of Apache Subversion from SlikSVN.
Apache has a larger list here.
Download and run the MSI file.
Click Next.
Accept the license agreement.
Click Next.
Click Next.
Select Typical.
Select Install.
Wait
Click Finish.
Exit and restart any command prompts that were open.

Linux:

Code Block
langnone
sudo apt-get install subversion

Windows:


Linux:

Code Block
langnone
The following extra packages will be installed:
  libapr1 libaprutil1 libneon27-gnutls libsvn1
Suggested packages:
  subversion-tools db4.8-util
The following NEW packages will be installed:
  libapr1 libaprutil1 libneon27-gnutls libsvn1 subversion

...

Processing triggers for python-central ...
Processing triggers for man-db ...
Setting up libapr1 (1.4.2-7ubuntu2) ...
Setting up libaprutil1 (1.3.9+dfsg-5ubuntu3) ...
Setting up libneon27-gnutls (0.29.5-3) ...
Setting up libsvn1 (1.6.12dfsg-4ubuntu2) ...
Setting up subversion (1.6.12dfsg-4ubuntu2) ...


2. Install a Maven 3.0+ client.

Windows:
We downloaded Apache Maven file apache-maven-3.0.4-bin.zip. Install instructions are on the same page.
Unzip the file to the root drive.
C:\apache-maven-3.0.4 will be your MAVEN_HOME.

Linux:
We downloaded Apache Maven file apache-maven-3.0.4-bin.tar.gz. Install instructions are on the same page.
Unzip the file to /usr/local/apache-maven-3.0.4 which will be your MAVEN_HOME.

Code Block
langnone
cd /tmp
wget http://apache.mirrors.pair.com/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz
tar -xvf apache-maven-3.0.4-bin.tar.gz -C /usr/local


Windows:


Linux:

3. Set the Maven environment variable values -
M2_HOME=<MAVEN_HOME>
M2=<MAVEN_HOME>/bin
PATH=<existing Path>;<MAVEN_HOME>
where MAVEN_HOME is the path you unzipped to.

Info

Run this command to check the setup.
mvn --version



Windows:
Right-click on Computer > Properties > Advanced System Settings > Advanced tab > Environment Variables button > New button for User variables. Once the values are entered click OK until you are out of the dialog series.

Linux:

Code Block
langnone
export M2_HOME=/usr/local/apache-maven-3.0.4
export M2=$M2_HOME/bin
export PATH=$PATH:$M2
Note

It is left to the user to make environment variables permanent in their development environment.

Windows:





Linux:

Code Block
langnone
tbleeker@system:~$ export
...
declare -x M2="/usr/local/apache-maven-3.0.4/bin"
declare -x M2_HOME="/usr/local/apache-maven-3.0.4"
declare -x PATH="/usr/lib/jvm/java-6-sun/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/apache-maven-3.0.4/bin"

...

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.

...

Step

Example

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

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

where you must select between CVD and CPE in the command. Other Run Configurations are also available in the Eclipse Run menu.


(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

Next Steps

The cTAKES 3.0 Component Use Guide will help you to understand, in great detail, each of the cTAKES components that have been installed. In some cases you can learn how to improve the components.

...