Versions Compared

Key

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

...

Step

Example

1. Download and install Eclipse if you don't already have it.

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

No example

2. Find UIMA Eclipse plug-ins.

Help> Install New Software...> Add... button
Set a repository name and this site location

Code Block
languagenone
http://www.apache.org/dist/uima/eclipse-update-site

\
Click OK.

3. Install UIMA Eclipse plug-ins.

Select the UIMA Eclipse tooling and runtime support.
Click *Next >*and finish the install.

Additional help can be found on the Apache site UIMA for Eclipse on apache.org.

Note
titleNote

These install instructions depend upon the installation of these plug-ins.



(optional) Verify the installation of the UIMA Plug-ins. Go to Help> About Eclipse> Installation Details> Plug-ins. You will see a dialog such as that on the right (next cell) with plug-in names starting with "UIMA Eclipse:".


...

Step

Example

1. Navigate to the source downloads for areleased version on SourceForge.net

Even without the full LVG data, cTAKES is about 790 MB when compressed.

2. Download the latest version.

Select the directory for the latest version and download the *ZIP*file.

3.
Unzip the file you downloaded into a directory that you want to be the
cTAKES install location. It will expand to about 1.4GB.
Windows:

Code Block
languagenone
c:\cTAKES-2.5


Linux:

Code Block
languagenone
/usr/bin/cTAKES-2.5

...



This folder we will call <cTAKES_HOME>. You will need to refer to the directory later.

...

Image Modified|

4. Set UIMA_HOME. UIMA requires a special environment variable for its commands to run.

Use the absolute path to the <cTAKES_HOME> directory in the previous step as the value.

Windows:
Right-click on Computer> Properties> Advanced> *Environment Variables*button > *New*button for System variables. Keep clicking *OK*until you are out of the dialog series.
Linux:
Use the command export UIMA_HOME=<cTAKES_HOME> for example:

Code Block
languagenone
export UIMA_HOME=/usr/bin/cTAKES-2.5

5. Edit PATH. This will be used for any command line access to binaries.
Windows:
Right-click on Computer> Properties> Advanced> *Environment Variables*button. Edit the *Path*environment variable adding *;<cTAKES_HOME>\bin*to the end. Keep clicking *OK*until you are out of the dialog series.
Linux:
Use the command export PATH=%PATH%:<cTAKES_HOME>/bin for example

Code Block
languagenone
export PATH=%PATH%:/usr/bin/cTAKES-2.5/bin

6. In Eclipse use File > New > Java Project ...

Uncheck Use default location*and navigate to *<cTAKES_HOME>*for location Click *Next>*Click *Finish.


7. Remove unnecessary JAR files.

Go to Project> Properties> Java Build Path> Libraries. Select all the entries except the JRE System Library and click the *Remove*button.


8. Add cTAKES folders as class resources.

Select Add Class Folder. Check the two class folders cTAKESdesc*and *resources. Click OK.


9. Add JAR files from <cTAKES_HOME>/lib.

Select Add Library*button > *User Library*list item > *Next >*button > *User Libraries*button > *New*button. Name the new user library *ctakes2.5lib*and click *OK. Click the Add JARs...*button and Navigate to <cTAKES_HOME>\lib*. Select all the JAR files and click Open. Click OK. Click Finish.


10. Close the User Libraries dialog.

Click OK. Your Package Explorer should look something like this (next cell).




11. If you have Eclipse set to build automatically it will do so and you may continue to run and debug from Eclipse.

You can also setup Eclipse to run Ant builds using the Ant files shipped as seen on the right (next cell).

...

Step

Example

1. Follow the first steps of the "Compile the latest stable release in Eclipse" (which do not require Eclipse) until you get to the part about creating a new project in Eclipse.

No example

2. Obtain the relevant build.xml file from SVN, placing it into <cTAKES_HOME>

It can be found at
https://ohnlp.svn.sourceforge.net/svnroot/ohnlp/trunk/icTAKES/build.xml
Be aware there are multiple build.xml files in SVN. be sure to use the one listed above

No example

3. To compile cTAKES, change to the <cTAKES_HOME> directory and simply run:

Code Block
languagenone
ant

No example

Compile a development release from SVN in Eclipse

If you know what you are doing with the cTAKES code and you must get the latest code currently under development (potentially unstable), then you need to use an SVN connection to retrieve the code.

Step

Example

1. Install subversion or a suitable plug-in for your IDE.

No example

2. Check-out the code to a local directory, such as:

Code Block
languagenone
c:\cTAKES-2.5


This folder we will call <cTAKES_HOME>. You will need to refer to the directory later.
Pre-release versions are available from:

Code Block
languagenone
svn checkout https://ohnlp.svn.sourceforge.net/svnroot/ohnlp/trunk/cTAKES

...


Note

If you are checking out via Subclipse in Eclipse, make sure to check out each project separately.

Code Block
languagenone
...
A cTAKES\PAD term spotter\desc\type_system
A cTAKES\PAD term spotter\desc\type_system\PADSiteAndTerm.xml
A cTAKES\PAD term spotter\desc\analysis_engine
A cTAKES\PAD term spotter\desc\analysis_engine\Radiology_TermSpotterAnnotatorTAEStyleMap.xml
A cTAKES\PAD term spotter\desc\analysis_engine\Radiology_TermSpotterAnnotatorTAE.xml
A cTAKES\PAD term spotter\desc\analysis_engine\DxStatusAnnotator.xml
A cTAKES\PAD term spotter\desc\analysis_engine\NegationDxAnnotator.xml
A cTAKES\PAD term spotter\desc\analysis_engine\PAD_Hit.xml
A cTAKES\PAD term spotter\desc\analysis_engine\SubSectionBoundaryAnnotator.xml
A cTAKES\PAD term spotter\desc\analysis_engine\Radiology_DictionaryLookupCSVAnnotator.xml
A cTAKES\PAD term spotter\desc\collection_processing_engine
A cTAKES\PAD term spotter\desc\collection_processing_engine\Radiology_sample.xml
A cTAKES\PAD term spotter\desc\collection_reader
A cTAKES\PAD term spotter\desc\collection_reader\RadiologyRecordsCollectionReader.xml
A cTAKES\PAD term spotter\.settings
A cTAKES\PAD term spotter\.settings\org.eclipse.jdt.ui.prefs
Checked out revision 667.

3. In Eclipse use File > Import... > General > Existing Projects into Workspace

Use your local directory for the root directory. Leave all of the projects selected and click Finish.

Note

It may be necessary to import each project one by one!

4. Install UIMA 2.4. Make note of UIMA_HOME.

No example

5. Add UIMA JARs to the build path configuration in Eclipse. Add all JARs from:

Code Block
<UIMA_HOME>/lib
  • jVinci.jar
  • uima-adapter-soap.jar
  • uima-adapter-vinci.jar
  • uima-core.jar
  • uima-cpe.jar
  • uima-documentation-annotation.jar
  • uima-examples.jar
  • uima-bootstrap.jar
  • uima-tools.jar

6. Generate the common type system.

A bug in the ordering and generation currently requires that you go to your project properties> Java Build Path> *Order and Export*and move the *auto_generatesrc*directory to the top of the list.

Right-click on /cTAKESdesc/typesysytem/common_type_system.xml*and select *Open With> Component Descriptor Editor.
Click the *Type System*tab then the *JCasGen*button (in the center).

Process documents using cTAKES

You
can now launch or debug the cTAKES components that you have built. You
could run commands from a command prompt, as found in the user install instructions, but you can launch them from within Eclipse now instead. Launching the CAS Visual Debugger (CVD) and the Collection processing engine (CPE) from Eclipse is as simple as following this step.

...