...
Step
| Example | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1. Do no try this until AFTER cTAKES 4.0 is released (this 4.0 document is still a DRAFT): On the cTAKES downloads page, download the User Installation package.
|
| ||||||||||||||||||
2. (Recommended) Verify the downloaded files against a signature to ensure you have the proper and complete file. From the following directory, download the signature file that corresponds to your download from step 1 https://www.apache.org/dist/ctakes/ctakes-4.0.0/ Please Please do not download any of the files that end with .zip or .gz directly from apache.org/dist - use the downloads page listed in step 1 if you need to download cTAKES itself so that a mirror can be used. | No example | ||||||||||||||||||
3. Unzip the file you downloaded into a directory that you want to be the cTAKES install location. The compressed files contain a single directory at the top level. This folder we will call <cTAKES_HOME>. It is the directory that contains subdirectories like bin, desc, resources, lib. You will need to refer to this directory later.
Linux:
| Windows:
| ||||||||||||||||||
4. Download the cTAKES resources ZIP file with a matching version from the ctakesresources project (More information on cTAKES models). These resources are required to operate cTAKES.
| Windows:
| ||||||||||||||||||
5. Copy (or move) the resources to cTAKES_HOME.
| Windows:
Linux:
Mac OSX:
Mac OSX: Code Block | | |||||||||||||||||
|
.0.0/resources |
7.
10. Close the GUI or
Convert Dictionaries You've Previously Created to be Compatible with cTAKES 4.0
Info |
---|
cTAKES 4.0.0 uses HSQLDB 2.3.4 rather than HSQLDB 1.8. Dictionaries created with HSQLDB 1.8 need to be converted before they can be used by cTAKES 4.0. |
Step | Example |
---|---|
| No example |
2. If your dictionary's .properties file sets your dictionary's database to be read-only, you need to change it before you can convert it.
| |
3. Locate the 1.8 hsqldb jar that you used when you created the database (for example, CTAKES_HOME/lib/hsqldb-1.8.0.10.jar for cTAKES 3.2.2) If you don't have a copy any more, you can download it from Maven Central at: http://central.maven.org/maven2/org/hsqldb/hsqldb/1.8.0.10/hsqldb-1.8.0.10.jar | |
4. Open the HSQLDB manager GUI for version 1.8. For example, if your 1.8 jar is in C:\Apps\hsqldb\, you would enter this command
| |
5. Connect to your database, by entering the appropriate URL. For example, if you are on Windows and your dictionary's .properties file is C:\cTAKES_3\resources\org\apache\ctakes\dictionary\lookup\fast\custom\custom.properties you could enter the following for the URL jdbc:hsqldb:\cTAKES_3\resources\org\apache\ctakes\dictionary\lookup\fast\custom\custom | |
6. In the upper right pane, enter SHUTDOWN COMPACT and press Execute | |
7. Exit the Database Manager GUi | |
8. (now do same with hsqldb 2.3.4 jar) | |
9. |
(Recommended) Add UMLS access rights
Note |
---|
In the initial setup cTAKES will recognize only few sample concepts in text. If you wish to perform named entity recognition or concept identification for anything other than these few words, you will need to 1) obtain the rights to use UMLS resources 2) add those credentials to cTAKES, and 3) use a cTAKES pipeline that makes use of those UMLS resources. If you don't, cTAKES will work but won't recognize much. |
...
Step
| Example | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1. If you do not have a UMLS username and password, you may request one at UMLS Terminology Services. | No example | |||||||||||||||||||
2. Once you have your UMLS username and password, edit the following files. Find the lines in each script that runs java and add the ctakes.umlsuser and ctakes.umlspw parameters to the java command with your credentials. Make sure you substitute your actual ID and password if you cut and paste the example.
Linux:
|
In the examples below, the rest of the lines after
If you use special characters in your user name or password, you may need to escape them or for windows, place the string in quotes For example, if your username and password were literally myusername and mypassword, you could insert them before the -cp option so the start of the java command would look like this:
Windows: If you use special characters in your umls user name or password, you can place them in double-quotes:
The rest of the line after Linux: If you use special characters in your user name or password, you may need to escape them | |||||||||||||||||||
2a. You may also specify your UMLS Credentials as environment variables to your operating system, but the dots will need to be replaced with underscores. | Linux:
|
...
Step
| Example | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1. Open a command prompt and change to the cTAKES_HOME directory, which is the directory that contains subdirectories like bin, desc, resources, lib. Depending on how you extracted the files,
|
Linux:
| ||||||||||||
2. This step uses AggregatePlaintextFastUMLSProcessor, which requires that you downloaded the cTAKES resources as described in step 4 of Install cTAKES (above) and that you added UMLS access rights (also above). If you haven't done those, you can use the AggregatePlaintextProcessor instead. Start the CAS Visual Debugger and load the AggregatePlaintextFastUMLSProcessor pipeline by running this command (at right)
The GUI opens and then loads the AggregatePlaintextFastUMLSProcessor pipeline. If it appears to be hung, look at the window where you entered the command and you will see what is happening. Once the analysis engine has successfully loaded you should see a tree in the Analysis Results frame:
| Windows:
Linux:
| ||||||||||||
3. Copy the example text from the next cell in this table and paste the contents into the Text section of CVD, replacing the text that is already there. |
| ||||||||||||
4. From the menu bar, click Run -> Run AggregatePlaintextFastUMLSProcessor. Note: If you would like to TEST some simple annotators to ensure it's working without UMLS, you can just load: /desc/ctakes-core/desc/analysis_egine/SentencesAndTokensAggregate.xml |
| ||||||||||||
5. You'll get a list of all the annotations for this clinical document in the Analysis Results frame. Annotations such as named entities, division by sentence, etc from the pipeline are viewable. To see one, in the Analysis Results frame, click on the key in front of:
This will show an AnnotationIndex in the lower frame. Select any annotation in that lower frame and you will see the text discovered in
Now select items in the lower frame to see the text being annotated. |
| ||||||||||||
To run other pipelines, use the Run-> Load AE menu bar command. Navigate to the file you wish to load, such as
Click Open.
|
...
Annotator | Description | Example Piper file |
---|---|---|
Clinical Pipeline | The pipeline to obtain concepts and their attributes | <cTAKES_HOME>/TBD |
Chunker | Obtains phrasal chunk annotations | <cTAKES_HOME>/TBD |
Dependency Parser | Obtains dependency parsing tree | <cTAKES_HOME>/TBD |
Drug NER | Finds mentions of medications and medication attributes such as dose, strength, frequency... | <cTAKES_HOME>/TBD |
Dictionary Lookup | Finds mentions of concepts from a dictionary (e.g., SNOMED CT or RxNorm | <cTAKES_HOME>/TBD |
Dictionary Lookup Fast | Finds mentions of concepts from a dictionary (e.g., SNOMED CT or RxNorm | <cTAKES_HOME>/TBD |
Relation Extractor | Finds certain relations (location of and degree of) between certain Event, Entity, and Modifier annotations | <cTAKES_HOME>/TBD |
Smoking Status | Finds document or patient-level smoking status | <cTAKES_HOME>/TBD |
Side Effect | Finds side effect mentions and sentences from clinical documents | <cTAKES_HOME>/TBD |
Next Steps
The cTAKES 4.0 Component Use Guide will help you to understand each of the cTAKES components that have been installed. In some cases you can learn how to improve the components.
Also, before you go on to process text in production, you will want to consider dictionaries and models. If you did not obtain the rights yet to the UMLS resources and models, you will want to do so. Be aware, the models within cTAKES have been trained on data that may not match your data well enough to be effective. In some cases you might want to modify the dictionaries and train models using your own data.