YTEX is currently in a branch (https://svn.apache.org/repos/asf/ctakes/branches/ytex/) and will be merged into trunk and included in cTAKES 3.2. YTEX is included in the cTAKES installation. This This document describes additional installation steps required to take advantage of the following YTEX features:
...
If you want to install the UMLS in your SQL Server, you may want to use a different database/schema from the YTEX database. If that is the case, you need permissions on the UMLS database/schema as well.
Installation
0) Build the YTEX branch
All of ytex has been moved into ctakes, it is currently in a branch (https://svn.apache.org/repos/asf/ctakes/branches/ytex). You must build a ctakes distribution (that includes ytex).
- Open a command prompt
- Ensure that maven, svn, and the JDK 1.7 are in your PATH variable
- cd to some directory where you want to check stuff out (I like c:\temp)
- run the following commands
Code Block | ||
---|---|---|
| ||
rmdir /s /q ctakes
svn co https://svn.apache.org/repos/asf/ctakes/branches/ytex ctakes
cd ctakes
mvn clean install -DskipTests |
...
1) Install ctakes
...
'as usual'
Go through the standard ctakes installation for the distribution you just created: See https://cwiki.apache.org/confluence/display/CTAKES/cTAKES+3.1+User+Install+Guide. For the rest of this document, we assume ctakes is installed in CTAKES_HOME
1.5) Patch YTEX Distro (YTEX 3.2.0 only)
Not needed for YTEX 3.2.1. Some of the install scripts need to be patched (fixed in trunk). Download and unzip ytex-patch-3.2.0.zip 'over' your installation.
Linux users: set the shell scripts to executable:
Code Block |
---|
cd CTAKES_HOME/bin
chmod ug+x ant ctakes.profile *.sh |
2) Unzip YTEX Libraries
Download and unzip ctakes-ytex-lib-3.1.2-SNAPSHOT.zip 'over' your installation. This contains non-APACHE 2.0 license compliant libraries:
...
You can always create concept graphs for WSD from your UMLS installation. If you have the UMLS in your DB, YTEX will create a dictionary lookup table from the UMLS during the installation.
4)
...
For production use, we suggest that you install UMLS in your database.
- If you have not done so already, obtain a UMLS License and create a UMLS Technology Services (UTS) Account, available free of charge:https://uts.nlm.nih.gov/home.html
...
Edit environment batch/shell script
Fix the path references to match your environment.
- windows - no changes necessary; see CTAKES_HOME\bin\setenv.cmd
- linux -
- move CTAKES_HOME/bin/ctakes.profile to ${HOME}/ctakes.profile
- edit the CTAKES_HOME environment variable
- make executable - chmod u+x ${HOME}/ctakes.profile
...
5) Create CTAKES_HOME\resources\org\apache\ctakes\ytex\ytex.properties
In this file, you specify the database connection parameters. Use CTAKESYou will find templates in CTAKES_HOME\resources\lib\ctakes-ytex-res-[version].jar, under org\apache\ctakes\ytex\ytex.properties.<db type>.example as a templateexample. If you have UMLS installed on your database, specify the umls.schema and umls.catalog properties (see the properties file for an explanation of what these are).
7) Install UMLS in MSSQL (Optional)
...
Code Block | ||||
---|---|---|---|---|
| ||||
cd %CTAKES_HOME%\resources
mkdir org\apache\ctakes\ytex
@REM extract the mysql example. change mysql to mssql (for MS SQL Server) or orcl (for Oracle)
jar xf ..\lib\ctakes-ytex-res-*.jar org/apache/ctakes/ytex/ytex.properties.mysql.example
copy org\apache\ctakes\ytex\ytex.properties.mysql.example org\apache\ctakes\ytex\ytex.properties
@REM edit the properties file
notepad org\apache\ctakes\ytex\ytex.properties |
Code Block | ||||
---|---|---|---|---|
| ||||
cd $CTAKES_HOME/resources
mkdir -p org/apache/ctakes/ytex
# extract the mysql example. change mysql to mssql (for MS SQL Server) or orcl (for Oracle)
jar xf ../lib/ctakes-ytex-res-*.jar org/apache/ctakes/ytex/ytex.properties.mysql.example
cp org/apache/ctakes/ytex/ytex.properties.mysql.example org/apache/ctakes/ytex/ytex.properties
# edit the properties file
vi org\apache\ctakes\ytex\ytex.properties |
6) Install the UMLS in your database (Optional)
We strongly suggest that you install UMLS in your database.
- If you have not done so already, obtain a UMLS License and create a UMLS Technology Services (UTS) Account, available free of charge: https://uts.nlm.nih.gov/home.html
- UMLS's MetamorphoSys can create database load scripts for MySQL and Oracle. Follow these instructions: http://www.nlm.nih.gov/research/umls/implementation_resources/scripts/index.html
- We have provided load scripts for MS SQL. Refer to UMLS SQL Server Installation for instructions on how to install UMLS in MS SQL Server.
...
7) Execute the setup script
windows: Open a command prompt, navigate to CTAKES_HOME, and execute setup script:
Code Block | ||
---|---|---|
| ||
cd /d c:\java\apache-ctakes-3.1.2-SNAPSHOT\%CTAKES_HOME%\bin\ctakes-ytex\scripts ..\..\ant.bat -f build-setup.xml all > setup.out 2>&1 |
...
The installation executes SQL scripts located in the CTAKES_HOME\bin\scripts\ctakes-ytex\data directory. All YTEX database objects will be dropped and recreated. If this is the initial installation, ignore the errors about objects not existing when they are being dropped. If you have installed the UMLS in your database and configured YTEX to use it, YTEX will create a dictionary lookup table with all concepts from the UMLS. The setup speed is dependent on the latency between the machine you are installing on and the database server. This Creating the dictionary lookup table from the UMLS can take several hours.