Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ disable_system_repos=0\n'\
# Clean all yum cache
RUN yum update -y && \
yum install -y yum-utils && \
yum install -y which java-1.8.0-openjdk java-1.8.0-openjdk-devel unzip && \
yum install -y which java-17-openjdk java-17-openjdk-devel unzip && \
curl -fsSL https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share && \
mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven && \
ln -s /usr/share/maven/bin/mvn /usr/bin/mvn && \
yum install -y gcc git python39 python39-devel && \
alternatives --set python /usr/bin/python3.9 && \
pip3 install --upgrade pip && \
curl -LO https://archive.apache.org/dist/activemq/activemq-artemis/2.19.1/apache-artemis-2.19.1-bin.zip && \
unzip apache-artemis-2.19.1-bin.zip && \
apache-artemis-2.19.1/bin/artemis create mybroker --user deepphe --password deepphe --allow-anonymous && \
curl -LO https://archive.apache.org/dist/activemq/activemq-artemis/2.36.0/apache-artemis-2.36.0-bin.zip && \
unzip apache-artemis-2.36.0-bin.zip && \
apache-artemis-2.36.0/bin/artemis create mybroker --user deepphe --password deepphe --allow-anonymous && \
yum clean all

# Set environment variables for Java and Maven
Expand All @@ -61,7 +61,7 @@ RUN mvn -U clean package

# Execute the parser jar
CMD ["java", "-cp", \
"instance-generator/target/instance-generator-5.0.0-SNAPSHOT-jar-with-dependencies.jar", \
"instance-generator/target/instance-generator-7.0.0-SNAPSHOT-jar-with-dependencies.jar", \
"org.apache.ctakes.core.pipeline.PiperFileRunner", \
"-p", "org/apache/ctakes/timelines/pipeline/Timelines", \
"-i", "/usr/src/app/input", \
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ Due to a current issue in the inter process communication, the process will fini
## Running the system outside of a Docker image

This is for the most part actually how we have ran the system during development, and can be resorted to in the event of issues with creating or running a Docker image. Use the following steps for setup:
- Make sure you have Java JDK 8 (we use OpenJDK) and the latest version of maven installed and that Java 8 is set as your default system Java
- Make sure you have Java JDK 11 (we use OpenJDK) and the latest version of maven installed and that Java 11 is set as your default system Java
- Create a conda 3.9 environment with `conda create -n timelines python=3.9`
- Change directory into `timelines` under the project root
- Create an ActiveMQ broker named `mybroker` in your current directory via:
```
curl -LO https://archive.apache.org/dist/activemq/activemq-artemis/2.19.1/apache-artemis-2.19.1-bin.zip && \
unzip apache-artemis-2.19.1-bin.zip && \
apache-artemis-2.19.1/bin/artemis create mybroker --user deepphe --password deepphe --allow-anonymous
curl -LO https://archive.apache.org/dist/activemq/activemq-artemis/2.32.0/apache-artemis-2.32.0-bin.zip && \
unzip apache-artemis-2.32.0-bin.zip && \
apache-artemis-2.32.0/bin/artemis create mybroker --user deepphe --password deepphe --allow-anonymous
```
- (temporary fix until we fix the PBJ and timelines dependencies issue) Install the system's Python dependencies via:
```
Expand Down
10 changes: 5 additions & 5 deletions timelines/gold_debug_just_run.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
java -cp instance-generator/target/instance-generator-5.0.0-SNAPSHOT-jar-with-dependencies.jar \
java -cp instance-generator/target/instance-generator-7.0.0-SNAPSHOT-jar-with-dependencies.jar \
org.apache.ctakes.core.pipeline.PiperFileRunner \
-p org/apache/ctakes/timelines/pipeline/Timelines \
-a mybroker \
-v /usr/local/miniconda3/envs/timelines-docker \
-i ../input/ \
-o ../output \
-a C:\Users\ch229935\Documents\apache-artemis-2.39.0-bin\mybroker \
-v C:\Users\ch229935\.conda\envs\ctakes-chemotime \
-i C:\Users\ch229935\Desktop\cTakes\chemoTimelinesBaselineSystem\input\breast_dev_restrictions\ \
-o . \
-l org/apache/ctakes/dictionary/lookup/fast/bsv/Unified_Gold_Dev.xml \
--pipPbj yes \
28 changes: 19 additions & 9 deletions timelines/instance-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<parent>
<artifactId>txtimelines-lookup</artifactId>
<groupId>org.healthnlp</groupId>
<version>5.0.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>instance-generator</artifactId>

<packaging>jar</packaging>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<ctakes.version>5.0.0-SNAPSHOT</ctakes.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<ctakes.version>7.0.0-SNAPSHOT</ctakes.version>
<skip.assembly>false</skip.assembly>
</properties>
<dependencies>
Expand All @@ -25,6 +25,16 @@
<version>${ctakes.version}</version>
</dependency>

<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-examples</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-user-resources</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down Expand Up @@ -65,11 +75,11 @@
<version>${ctakes.version}</version>

</dependency>
<dependency>
<groupId>org.healthnlp</groupId>
<artifactId>tweaked-timenorm</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.healthnlp</groupId>-->
<!-- <artifactId>tweaked-timenorm</artifactId>-->
<!-- <version>${project.parent.version}</version>-->
<!-- </dependency>-->
</dependencies>

<build>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import org.apache.ctakes.core.util.doc.SourceMetadataUtil;
import org.apache.ctakes.typesystem.type.structured.DocumentPath;
import org.apache.ctakes.typesystem.type.structured.SourceData;
import org.apache.log4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.uima.UimaContext;
import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
import org.apache.uima.fit.util.JCasUtil;
Expand All @@ -21,7 +22,7 @@
)

public class DCTAnnotator extends org.apache.uima.fit.component.JCasAnnotator_ImplBase {
final static private Logger LOGGER = Logger.getLogger( "DCTAnnotator" );
final static private Logger LOGGER = LoggerFactory.getLogger( "DCTAnnotator" );
final static private DocTimeApproximator _approximator = new DocTimeApproximator();
@Override
public void initialize( UimaContext context ) throws ResourceInitializationException {
Expand All @@ -41,7 +42,7 @@ public void process( JCas jCas ) throws AnalysisEngineProcessException {
if ( fileNameElements.length >= 3 ){

String[] possibleDate =
fileNameElements[2].split("-");
fileNameElements[2].split("-");

if ( possibleDate.length == 3 ){

Expand Down
Loading