ctakes-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim O'Connell" <tim.oconn...@gmail.com>
Subject Re: NPE with ytex in ctakes 3.2.0
Date Sun, 26 Oct 2014 13:36:23 GMT
David, Michelle,

If it helps any - I create install logs of what I do while I'm doing a
complex install.  Here's my log of instructions.  It's for linux (I run
Ubuntu server, but that shouldn't matter for this), so you may have to
translate to Windows if that's your OS.  Before doing any of the below, I
already had UMLS set up in MySQL, with a db name of 'umls'.  Let me know if
anything seems unclear.

Tim

   -

   install java, svn, maven
   -

      sudo add-apt-repository ppa:webupd8team/java
      -

      sudo apt-get update
      -

      sudo apt-get install oracle-java7-installer
      -

      sudo apt-get install maven
      - sudo apt-get install subversion


   -

   set up the ytex database, executing the following in MySQL:
   -

      CREATE DATABASE ytex CHARACTER SET utf8;
      -

      CREATE USER 'ytex'@'localhost' IDENTIFIED BY 'ytex';
      -

      GRANT ALL PRIVILEGES ON ytex.* TO 'ytex'@'localhost';
      -

      GRANT SELECT on umls.* to 'ytex'@'localhost';
      -

   download and build latest ctakes using subversion
   -

      cd ~
      -

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

      cd ctakes
      -

      mvn clean install -DskipTests
      -

   unpack cTakes build:
   -

      cd ~/ctakes/trunk/ctakes-distribution/target
      -

      tar -xvf ./apache-ctakes-3.2.1-SNAPSHOT-bin.tar.gz -C ~
      -

   Download ctakes-ytex-lib-3.1.2-SNAPSHOT.zip to ~
   -

      cp ~/ctakes-ytex-lib-3.1.2-SNAPSHOT.zip /tmp
      -

      cd /tmp
      -

      unzip ctakes-ytex-lib-3.1.2-SNAPSHOT.zip
      -

      cp -R /tmp/lib/* ~/apache-ctakes-3.2.1-SNAPSHOT/lib/
      -

      rm -rf /tmp/lib
      -

   Download ctakes-ytex-resources-3.1.2-SNAPSHOT.zip to ~
   -

      cd ~/ctakes-ytex-resources-3.1.2-SNAPSHOT.zip /tmp
      -

      cd /tmp
      -

      unzip ./ctakes-ytex-resources-3.1.2-SNAPSHOT.zip
      -

      cp -R /tmp/resources/* ~/apache-ctakes-3.2.1-SNAPSHOT/resources/
      -

      sudo rm -rf /tmp/resources
      -

   Download ctakes-resources-3.2.0.zip
   -

      ct /tmp
      -

      wget
      http://sourceforge.net/projects/ctakesresources/files/ctakes-resources-3.2.0.zip
      -

      unzip ./ctakes-resources-3.2.0.zip
      -

      cp -R /tmp/resources/* ~/apache-ctakes-3.2.1-SNAPSHOT/resources/
      -

   Download the new ytex Patch from:
   https://cwiki.apache.org/confluence/download/attachments/40504828/ytex-patch-3.2.0.zip?version=2&modificationDate=1413291939000&api=v2
   (link is from the ctakes-ytex installation page on confluence) and put it
   in ~
   -

      cp ~/ytex-patch.zip /tmp
      -

      cd /tmp
      -

      unzip ./ytex-patch.zip
      -

      cd ytex-patch
      -

      cp -R * ~/apache-ctakes-3.2.1-SNAPSHOT/
      -

      cd /tmp
      -

      rm -rf ./ytex-patch
      -

   Edit:
   -

      CTAKES_HOME/bin/runctakesCVD.sh to use 64-bit java, increase the heap
      size
      -

      CTAKES_HOME/bin/runctakesCPE.sh to use 64-bit java, increase the heap
      size
      -

      CTAKES_HOME/config/log4j.xml to use the file appender
      -

   Create CTAKES_HOME/resources/org/apache/ctakes/ytex/ytex.properties
   -

      While the current instructions say this can be extracted from
      CTAKES_HOME/lib/ctakes-ytex-res-3.2.0.jar, I couldn’t get my jar unpacker
      to work, so I just copied the MySQL version of this file over from a
      previous installation. The only change I had to make was to uncomment the
      umls.schema line.
      -

   Move the ctakes.profile file to my home directory:
   -

      cp ~/apache-ctakes-3.2.1-SNAPSHOT/bin/ctakes.profile ~/ctakes.profile
      -

      edit the CTAKES_HOME environment variable
      -

      chmod u+x ~/ctakes.profile
      -

   Execute the ytex setup script:
   -

      cd ~
      -

      ./ctakes.profile
      -

      cd ./apache-ctakes-3.2.1-SNAPSHOT/bin
      -

      chmod u+x ant
      -

      chmod u+x *.sh
      -

      cd ctakes-ytex/scripts
      -

      nohup ../../ant -f build-setup.xml all > setup.out 2>&1 &
      -

      tail -f setup.out


That's it.  After this, I can run the CVD and CPE via X11.

On Fri, Oct 24, 2014 at 8:27 PM, David Kincaid <kincaid.dave@gmail.com>
wrote:

> Sadly, no. I have not been able to get it working.
>
> - Dave
>
> On Fri, Oct 24, 2014 at 3:48 PM, Michelle Chen <mwchen@mit.edu> wrote:
>
>> Hello,
>>
>> I'm also trying to get YTex to work and run into the same problem whe
>> runnign the build-setup.xml file. I get the DBping error of "[java] Error:
>> Could not find or load main class org.apache.ctakes.ytext.tools.DBPing"
>>
>> I have created a database called YTex, but was unsure if I set it up
>> correctly.
>>
>> @David, Did you find a fix for this?
>>
>> Thanks.
>>
>> -------
>> Michelle Chen
>>
>> Massachusetts Institute of Technology
>> Electrical Engineering and Computer Science
>> B.S. '14, M.Eng. '15
>>
>>
>> On Tue, Oct 14, 2014 at 10:27 AM, David Kincaid <kincaid.dave@gmail.com>
>> wrote:
>>
>>> Ok. I just noticed that the typo is in that parameter. Instead of
>>> CTAKES_HOME it should be $CTAKES_HOME. I get a little farther with that
>>> (although still have to use my installed version of ant), but now get a
>>> failure in the dbping: that it can't connect to a database. I don't have a
>>> database running, so I assume that is to be expected. I was hoping I could
>>> play with it without a database, but maybe that's not possible. I
>>> appreciate the help. If you update that ant command line in the wiki page
>>> to have $CTAKES_HOME instead of CTAKES_HOME it should work.
>>>
>>> - Dave
>>>
>>
>>
>

Mime
View raw message