Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column
width65%
Panel
titleContents of this Page
Table of Contents
minLevel2
Column
Include Page
CTAKES:Menu cTAKES 3.0 to Include
CTAKES:Menu cTAKES 3.0 to Include

...

WARNING: Newer instructions

NOTE: The information here is largely for the ctakes 2.5 build process (eclipse based with some ant). ctakes 3.x under apache now uses a maven based build process. Please see the following web site for current build instructions:

...

(should

...

these

...

instructions

...

be

...

copied

...

into

...

this

...

wiki

...

page?)

...


YES! The original contents were just a start to the page and it should be changed over into what it takes now for 3.0.
The user doc and the developer doc that started on the incubator site should both be moved here and the main site should point to this doc. The same groups should be covered, meaning developers using Eclipse or the command line.

These are instructions for installation of cTAKES for developers. With these instructions you can set up your development environment with cTAKES code, change or extend the code, compile the code, and deploy. If you simply want to be a user of the software, refer to the cTAKES 3.0 User Guide.

Knowledge about what the cTAKES components do is not supplied by the install instructions. This is found in the cTAKES 3.0 Component Use Guide. There is no training or documentation (except for code comments) on the code itself. You must familiarize yourself with the components and then study the code on your own to be able to extend it.

In order to modify/compile the source code for a cTAKES component, developers must utilize either an IDE, such as Eclipse, or another editor of your choice. Follow the appropriate sections here depending upon your developer preferences.

Once you have compiled the code you can process documents with the cTAKES components. The documents upon which you can run cTAKES will take many forms. An example of doing this is covered in the Processing Documents section.

The expert instructions below are short and require a lot of prerequisite setup on your own. If you need more help then follow the step by step instructions.

Eclipse

Minimal install instructions

Prerequisites: Java JDK 1.6+, Eclipse IDE 4.2+, subversive plugin (or svn equivalent with appropriate SVN team provider connectors), m2e plugin (or mvn equivalent)

  • Import Project > Maven > Checkout Maven Project from SCM and use: svn and https://svn.apache.org/repos/asf/incubator/ctakes/trunk

...

  • Select

...

  • all

...

  • projects.

...

  • Wait

...

  • until

...

  • Eclipse

...

  • downloads

...

  • and

...

  • builds

...

  • all

...

  • of

...

  • your

...

  • projects

...

  • (it

...

  • may

...

  • take

...

  • up

...

  • to

...

  • 30

...

  • minutes

...

  • depending

...

  • on

...

  • the

...

  • machine).

...

    • The

...

    • various

...

    • build

...

    • helpers

...

    • should

...

    • run

...

    • jcasgen

...

    • and

...

    • builds

...

    • the

...

    • projects

...

    • for

...

    • you.

...

    • There

...

    • should

...

    • not

...

    • be

...

    • any

...

    • reason

...

    • to

...

    • run

...

    • mvn

...

    • install,

...

    • etc.

...

  • (Optional)

...

  • If

...

  • you

...

  • would

...

  • like

...

  • to

...

  • launch

...

  • the

...

  • UIMA

...

  • CVD

...

  • or

...

  • CPE

...

  • GUI,

...

  • run

...

  • ctakes-clinical-pipeline/resources/launch/UIMA_<CVD

...

  • |

...

  • CPE>GUI--clinical_documents

...

  • pipeline.launch

...

  • (Optional) UIMA plug-ins called "UIMA Eclipse tooling and runtime support" can be installed from update site: http://www.apache.org/dist/uima/eclipse-update-site

Step by step install instructions

Preparing Java

Step

Example

1. All forms of development require the Java SDK 1.6+.

...

You

...

can

...

get

...

it

...

from

...

...

.

Make sure you get the proper version and install the SDK not just the Java Runtime environment.

To check if you have the SDK, look in the lib directory of the Java install and see if the file tools.jar is there. If there is a lib directory and there is a file by that name then you have the SDK.

To check if you have the proper version. Enter the command:
Windows and Linux:

Code Block
languagenone
java -version


on any command line to see what version you have now.

Code Block
languagenone
C:\>java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

...

2.

...

It

...

is

...

possible

...

that

...

some

...

commands

...

and

...

programs

...

can

...

find

...

the

...

Java

...

runtime

...

that

...

you

...

want

...

to

...

be

...

used

...

but

...

it

...

is

...

best

...

to

...

set

...

the

...

JAVA_HOME

...

environment

...

variable.

...

Set

...

the

...

value

...

of

...

JAVA_HOME

...

to

...

the

...

absolute

...

path

...

of

...

the

...

root

...

of

...

the

...

Java

...

Runtime

...

environment

...

that

...

you

...

want

...

UIMA

...

and

...

cTAKES

...

to

...

use.

...


Windows

...

:
Right-click

...

on

...

Computer

...

>

...

Properties

...

>

...

Advanced

...

System

...

Settings

...

>

...

Advanced

...

tab

...

>

...

Environment

...

Variables

...

button

...

>

...

New

...

button

...

for

...

System

...

variables.

...

Once

...

the

...

values

...

are

...

entered

...

click

...

OK

...

until

...

you

...

are

...

out

...

of

...

the

...

dialog

...

series.

...


Linux

...

:

Code Block
languagenone
export JAVA_HOME=<path>

...

Image Added

Preparing Eclipse

If you are going to use Eclipse for development then follow these instructions.

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

...


Image Added

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.

Image Added
Image Added

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
Juno - http://download.eclipse.org/releases/juno

...

Expand

...

the

...

Collaboration

...

category.

...


Select

...

"m2e

...

-

...

Maven

...

Integration

...

for

...

Eclipse".

...


Click

...

Next.

...


Click

...

Finish.

...


Restart

...

Eclipse.

Image Added

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.

Image Added
Image Added

Compile the latest stable release in Eclipse

Step

Example

1. Import the cTAKES projects using Maven.

File -> Import ... -> Maven -> Check out Maven Projects from SCM.
Click Next.

Image Added

2. For SCM URL use "svn" in the drop-down

Code Block
https://svn.apache.org/repos/asf/incubator/ctakes/trunk

...

in

...

the

...

text

...

field.

...


Click

...

Finish.

...


Eclipse

...

will

...

download

...

and

...

builds

...

all

...

of

...

the

...

cTAKES

...

projects

...

including

...

running

...

jcasgen

...

as

...

needed.

...

It

...

may

...

take

...

up

...

to

...

30

...

minutes

...

depending

...

on

...

your

...

machine

...

and

...

Internet

...

speed.

...

Image Added

Process documents using cTAKES

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
ctakes-clinical-pipeline/resources/launch/UIMA_<CVD | CPE>GUI--clinical_documents pipeline.launch

...

where

...

you

...

must

...

select

...

between

...

CVD

...

and

...

CPE

...

in

...

the

...

command.

...

Other

...

Run

...

Configurations

...

are

...

also

...

available

...

in

...

the

...

Eclipse

...

Run

...

menu.

...


Image Added

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.

No example

(Optional) UIMA tools plug-in

Developers may be interested in the Eclipse plug-ins provided by the UIMA community. They include, for example, a UIMA component descriptor editor.

Step

Example

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

Image Added

2. Install UIMA Eclipse plug-ins.

Select the UIMA Eclipse tooling and runtime support.
Click Next.
Leave the defaults and click Next.
Accept the license agreement.
Click Finish.
Restart Eclipse.

Image Added

3. (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 i the next cell with plug-in names starting with "UIMA Eclipse:".

Image Added

Command line

Minimal install instructions

Prerequisites: Java JDK 1.6+, SVN, Maven 3.0+

  • svn co https://svn.apache.org/repos/asf/incubator/ctakes/trunk

...

  • ctakes-3.0
  • mvn clean compile package
    • Running the mvn package command will generate a binary distribution in /ctakes-distribution/target/ctakes

...

    • -

...

    • <release>-bin.tar.gz/zip

...

  • (Optional)

...

  • If

...

  • you

...

  • would

...

  • like

...

  • to

...

  • launch

...

  • the

...

  • UIMA

...

  • CVD

...

  • or

...

  • CPE

...

  • GUI,

...

  • run

...

  • $

...

  • MAVEN_OPTS="-Xmx1g"

...

  • mvn

...

  • -PrunCVD

...

  • compile

...

For

...

further

...

information

...

see

...

the

...

Apache

...

Source

...

Code Repository page.

Step by step install instructions (for command line)

Preparing Command Line Tools

If you are going to use command line only to compile then you will need these tools.

Step

Example

1. Navigate to the Ant download site on apache.org and install Ant 1.7.1+


2. Download Ant 1.7.1+.

...

Unzip

...

the

...

file

...

you

...

downloaded

...

to

...

a

...

local

...

directory.

...

We

...

will

...

call

...

this

...

<ANT_HOME>

...

Follow

...

the

...

...

...

...

...

...

...

.

...

This

...

will

...

include

...

changing

...

the

...

PATH and ANT_HOME environment variables.




Info

The UIMA command to generate the type system through the command line (JCasGen) is not shipped with cTAKES at this time. The common type system has already been generated for you. If you need, for some reason, to generate this then you will need to use the method described for Eclipse or install the entire UIMA SDK.

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

...

language

...

none

...

ant

No example

Process documents using cTAKES