From 0335e031dc483b60dd60a53ece46ef227950b13b Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Thu, 3 Nov 2022 14:05:49 +0100 Subject: [PATCH 1/5] Issue 448 - Update dependencies - Apache UIMA Java SDK 2.9.0 -> 2.11.0 - Apache UIMA uimaFIT 2.3.0 -> 2.5.0 --- pom.xml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 012d74146..44b2e3bf2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,13 +4,16 @@ 3.0 4.0.0 + org.cleartk cleartk 2.1.0-SNAPSHOT pom + ClearTK The official ClearTK release http://cleartk.github.io/cleartk/ + The BSD 3-Clause License @@ -18,16 +21,24 @@ repo + https://github.com/ClearTK/cleartk scm:git:https://github.com/ClearTK/cleartk.git scm:git:git@github.com:ClearTK/cleartk.git + GitHub https://github.com/ClearTK/cleartk/issues + + + reckart + richard.eckart@gmail.com + Richard Eckart de Castilho + steven.bethard steven.bethard@gmail.com @@ -44,6 +55,7 @@ Lee Becker + cleartk-test-util @@ -91,6 +103,8 @@ 1.8 1.8 UTF-8 + 2.11.0 + 2.5.0 @@ -108,17 +122,17 @@ org.apache.uima uimaj-core - 2.9.0 + ${uima-version} org.apache.uima uimaj-document-annotation - 2.9.0 + ${uima-version} org.apache.uima uimafit-core - 2.3.0 + ${uimafit-version} com.google.guava @@ -339,7 +353,7 @@ org.apache.uima jcasgen-maven-plugin - 2.5.0 + ${uima-version} From 17fea7a780e4ac544b7ad70cd49d14f2a001f6eb Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Thu, 3 Nov 2022 14:16:50 +0100 Subject: [PATCH 2/5] Issue 448 - Update dependencies - junit 4.13.1 -> 4.13.2 - assertj -> 3.23.1 - Fixed two tests --- cleartk-ml/pom.xml | 70 +- .../org/cleartk/ml/jar/JarDataWriterTest.java | 7 +- .../ml/viterbi/ViterbiDataWriterTest.java | 10 +- pom.xml | 944 +++++++++--------- 4 files changed, 527 insertions(+), 504 deletions(-) diff --git a/cleartk-ml/pom.xml b/cleartk-ml/pom.xml index 7123b6ef2..ddcdeba27 100644 --- a/cleartk-ml/pom.xml +++ b/cleartk-ml/pom.xml @@ -1,31 +1,43 @@ - - 4.0.0 - cleartk-ml - jar - ClearTK ML - ClearTK machine learning library and interfaces - - cleartk - org.cleartk - 2.1.0-SNAPSHOT - .. - - - - org.cleartk - cleartk-util - + + 4.0.0 + cleartk-ml + jar + ClearTK ML + ClearTK machine learning library and interfaces + + cleartk + org.cleartk + 2.1.0-SNAPSHOT + .. + + + + org.cleartk + cleartk-util + + - - org.cleartk - cleartk-test-util - test - - - org.apache.uima - uimaj-document-annotation - test - - - + + junit + junit + test + + + org.assertj + assertj-core + test + + + org.cleartk + cleartk-test-util + test + + + org.apache.uima + uimaj-document-annotation + test + + diff --git a/cleartk-ml/src/test/java/org/cleartk/ml/jar/JarDataWriterTest.java b/cleartk-ml/src/test/java/org/cleartk/ml/jar/JarDataWriterTest.java index 3340cefed..9534463e8 100644 --- a/cleartk-ml/src/test/java/org/cleartk/ml/jar/JarDataWriterTest.java +++ b/cleartk-ml/src/test/java/org/cleartk/ml/jar/JarDataWriterTest.java @@ -23,6 +23,7 @@ */ package org.cleartk.ml.jar; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertTrue; import java.io.File; @@ -37,7 +38,6 @@ import org.cleartk.ml.test.DefaultStringTestDataWriterFactory; import org.cleartk.ml.test.StringTestDataWriter; import org.cleartk.test.util.DefaultTestBase; -import org.junit.Assert; import org.junit.Test; /** @@ -61,7 +61,8 @@ public void testManifest() throws Throwable { dataWriter.finish(); File manifestFile = new File(outputDirectory, "MANIFEST.MF"); String actualManifest = FileUtils.file2String(manifestFile); - Assert.assertEquals(expectedManifest, actualManifest.replaceAll("\r", "").trim()); + + assertThat(actualManifest).isEqualToIgnoringWhitespace(expectedManifest); } @Test @@ -75,7 +76,5 @@ public void testFinish() throws Throwable { DataWriter dataWriter = factory.createDataWriter(); dataWriter.finish(); assertTrue(new File(outputDirectory, FeaturesEncoder_ImplBase.ENCODERS_FILE_NAME).exists()); - } - } diff --git a/cleartk-ml/src/test/java/org/cleartk/ml/viterbi/ViterbiDataWriterTest.java b/cleartk-ml/src/test/java/org/cleartk/ml/viterbi/ViterbiDataWriterTest.java index 68ce7c143..e3b7543d1 100644 --- a/cleartk-ml/src/test/java/org/cleartk/ml/viterbi/ViterbiDataWriterTest.java +++ b/cleartk-ml/src/test/java/org/cleartk/ml/viterbi/ViterbiDataWriterTest.java @@ -24,6 +24,9 @@ package org.cleartk.ml.viterbi; +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.contentOf; import static org.junit.Assert.assertTrue; import java.io.File; @@ -33,7 +36,6 @@ import java.util.List; import java.util.Set; -import org.apache.commons.io.FileUtils; import org.apache.uima.analysis_engine.AnalysisEngine; import org.apache.uima.analysis_engine.AnalysisEngineProcessException; import org.apache.uima.fit.factory.AnalysisEngineFactory; @@ -52,7 +54,6 @@ import org.cleartk.test.util.DefaultTestBase; import org.cleartk.test.util.type.Sentence; import org.cleartk.test.util.type.Token; -import org.junit.Assert; import org.junit.Test; /** @@ -118,8 +119,8 @@ public void testConsumeAll() throws Exception { + "classifierBuilderClass: org.cleartk.ml.viterbi.ViterbiClassifierBuilde\n" + " r"; File manifestFile = new File(outputDirectoryName, "MANIFEST.MF"); - String actualManifest = FileUtils.readFileToString(manifestFile); - Assert.assertEquals(expectedManifest, actualManifest.replaceAll("\r", "").trim()); + String actualManifest = contentOf(manifestFile, UTF_8); + assertThat(actualManifest).isEqualToIgnoringWhitespace(expectedManifest); ViterbiClassifierBuilder builder = new ViterbiClassifierBuilder(); File delegatedOutputDirectory = builder.getDelegatedModelDirectory(outputDirectory); @@ -166,5 +167,4 @@ private void testFeatures(String trainingDataLine, String... expectedFeatures) { assertTrue(features.contains(expectedFeature)); } } - } diff --git a/pom.xml b/pom.xml index 44b2e3bf2..5dd459c8d 100644 --- a/pom.xml +++ b/pom.xml @@ -1,504 +1,516 @@ - - - 3.0 - - 4.0.0 - - org.cleartk - cleartk - 2.1.0-SNAPSHOT - pom - - ClearTK - The official ClearTK release - http://cleartk.github.io/cleartk/ - - - - The BSD 3-Clause License - https://raw.githubusercontent.com/ClearTK/cleartk/master/LICENSE - repo - - - - - https://github.com/ClearTK/cleartk - scm:git:https://github.com/ClearTK/cleartk.git - scm:git:git@github.com:ClearTK/cleartk.git - - - - GitHub - https://github.com/ClearTK/cleartk/issues - - - + + + org.sonatype.oss + oss-parent + 7 + + + + 4.0.0 + + org.cleartk + cleartk + 2.1.0-SNAPSHOT + pom + + ClearTK + The official ClearTK release + http://cleartk.github.io/cleartk/ + + + 3.0 + + + + + The BSD 3-Clause License + https://raw.githubusercontent.com/ClearTK/cleartk/master/LICENSE + repo + + + + + https://github.com/ClearTK/cleartk + scm:git:https://github.com/ClearTK/cleartk.git + scm:git:git@github.com:ClearTK/cleartk.git + + + + GitHub + https://github.com/ClearTK/cleartk/issues + + + reckart richard.eckart@gmail.com Richard Eckart de Castilho - - steven.bethard - steven.bethard@gmail.com - Steven Bethard - - - philip.ogren - philip@ogren.info - Philip Ogren - - - lee.becker - lee.becker@gmail.com - Lee Becker - - - - + + steven.bethard + steven.bethard@gmail.com + Steven Bethard + + + philip.ogren + philip@ogren.info + Philip Ogren + + + lee.becker + lee.becker@gmail.com + Lee Becker + + + + - cleartk-test-util - cleartk-util + cleartk-test-util + cleartk-util - cleartk-ml - cleartk-ml-opennlp-maxent - cleartk-ml-svmlight - cleartk-ml-tksvmlight - cleartk-ml-liblinear - cleartk-ml-libsvm - cleartk-ml-libsvm-tk - cleartk-ml-mallet - cleartk-ml-crfsuite - cleartk-ml-weka + cleartk-ml + cleartk-ml-opennlp-maxent + cleartk-ml-svmlight + cleartk-ml-tksvmlight + cleartk-ml-liblinear + cleartk-ml-libsvm + cleartk-ml-libsvm-tk + cleartk-ml-mallet + cleartk-ml-crfsuite + cleartk-ml-weka - cleartk-eval + cleartk-eval - cleartk-type-system - cleartk-corpus - cleartk-feature + cleartk-type-system + cleartk-corpus + cleartk-feature - cleartk-snowball - cleartk-opennlp-tools - cleartk-berkeleyparser - cleartk-clearnlp - cleartk-maltparser - cleartk-stanford-corenlp + cleartk-snowball + cleartk-opennlp-tools + cleartk-berkeleyparser + cleartk-clearnlp + cleartk-maltparser + cleartk-stanford-corenlp - cleartk-token - cleartk-summarization - cleartk-timeml - cleartk-examples - - cleartk-ml-script - - - - org.sonatype.oss - oss-parent - 7 - - - - 1.8 - 1.8 - UTF-8 + cleartk-token + cleartk-summarization + cleartk-timeml + cleartk-examples + + cleartk-ml-script + + + + + 1.8 + 1.8 + UTF-8 2.11.0 2.5.0 - - - + 4.13.2 + 3.23.1 + + + + - - org.jdom - jdom - 2.0.2 - - - com.lexicalscope.jewelcli - jewelcli - 0.8.9 - - - org.apache.uima - uimaj-core - ${uima-version} - - - org.apache.uima - uimaj-document-annotation + + org.jdom + jdom + 2.0.2 + + + com.lexicalscope.jewelcli + jewelcli + 0.8.9 + + + org.apache.uima + uimaj-core + ${uima-version} + + + org.apache.uima + uimaj-document-annotation ${uima-version} - - - org.apache.uima - uimafit-core - ${uimafit-version} - - - com.google.guava - guava - 17.0 - - - com.google.code.findbugs - jsr305 - - - - - commons-io - commons-io - 2.7 - - - junit - junit - 4.13.1 - + + + org.apache.uima + uimafit-core + ${uimafit-version} + + + com.google.guava + guava + 17.0 + + + com.google.code.findbugs + jsr305 + + + + + commons-io + commons-io + 2.7 + + + junit + junit + ${junit-version} + + + org.assertj + assertj-core + ${assertj-version} + - - org.cleartk - cleartk-test-util - ${project.version} - - - org.cleartk - cleartk-util - ${project.version} - - - org.cleartk - cleartk-ml - ${project.version} - - - org.cleartk - cleartk-ml-opennlp-maxent - ${project.version} - - - org.cleartk - cleartk-ml-svmlight - ${project.version} - - - org.cleartk - cleartk-ml-tksvmlight - ${project.version} - - - org.cleartk - cleartk-ml-liblinear - ${project.version} - - - org.cleartk - cleartk-ml-libsvm - ${project.version} - - - org.cleartk - cleartk-ml-libsvm-tk - ${project.version} - - - org.cleartk - cleartk-ml-mallet - ${project.version} - - - org.cleartk - cleartk-ml-crfsuite - ${project.version} - - - org.cleartk - cleartk-ml-weka - ${project.version} - - - org.cleartk - cleartk-eval - ${project.version} - - - org.cleartk - cleartk-type-system - ${project.version} - - - org.cleartk - cleartk-corpus - ${project.version} - - - org.cleartk - cleartk-feature - ${project.version} - - - org.cleartk - cleartk-snowball - ${project.version} - - - org.cleartk - cleartk-opennlp-tools - ${project.version} - - - org.cleartk - cleartk-berkeleyparser - ${project.version} - - - org.cleartk - cleartk-clearnlp - ${project.version} - - - org.cleartk - cleartk-maltparser - ${project.version} - - - org.cleartk - cleartk-stanford-corenlp - ${project.version} - - - org.cleartk - cleartk-token - ${project.version} - - - org.cleartk - cleartk-summarization - ${project.version} - - - org.cleartk - cleartk-timeml - ${project.version} - - - - - - - - maven-assembly-plugin - 2.4 - - - maven-clean-plugin - 2.5 - - - maven-compiler-plugin - 3.1 - - 1.8 - 1.8 - - - - maven-deploy-plugin - 2.8.1 - - - maven-eclipse-plugin - 2.9 - - - maven-gpg-plugin - 1.5 - - - maven-install-plugin - 2.5.1 - - - maven-jar-plugin - 2.4 - - - maven-javadoc-plugin - 2.9.1 - - - maven-plugin-plugin - 3.3 - - - maven-release-plugin - 2.5 - - - maven-resources-plugin - 2.6 - - - maven-site-plugin - 3.3 - - - maven-source-plugin - 2.2.1 - - - maven-surefire-plugin - 2.17 - - - org.apache.uima - jcasgen-maven-plugin - ${uima-version} - - - - generate - - - - + + org.cleartk + cleartk-test-util + ${project.version} + + + org.cleartk + cleartk-util + ${project.version} + + + org.cleartk + cleartk-ml + ${project.version} + + + org.cleartk + cleartk-ml-opennlp-maxent + ${project.version} + + + org.cleartk + cleartk-ml-svmlight + ${project.version} + + + org.cleartk + cleartk-ml-tksvmlight + ${project.version} + + + org.cleartk + cleartk-ml-liblinear + ${project.version} + + + org.cleartk + cleartk-ml-libsvm + ${project.version} + + + org.cleartk + cleartk-ml-libsvm-tk + ${project.version} + + + org.cleartk + cleartk-ml-mallet + ${project.version} + + + org.cleartk + cleartk-ml-crfsuite + ${project.version} + + + org.cleartk + cleartk-ml-weka + ${project.version} + + + org.cleartk + cleartk-eval + ${project.version} + + + org.cleartk + cleartk-type-system + ${project.version} + + + org.cleartk + cleartk-corpus + ${project.version} + + + org.cleartk + cleartk-feature + ${project.version} + + + org.cleartk + cleartk-snowball + ${project.version} + + + org.cleartk + cleartk-opennlp-tools + ${project.version} + + + org.cleartk + cleartk-berkeleyparser + ${project.version} + + + org.cleartk + cleartk-clearnlp + ${project.version} + + + org.cleartk + cleartk-maltparser + ${project.version} + + + org.cleartk + cleartk-stanford-corenlp + ${project.version} + + + org.cleartk + cleartk-token + ${project.version} + + + org.cleartk + cleartk-summarization + ${project.version} + + + org.cleartk + cleartk-timeml + ${project.version} + + + + + + + + maven-assembly-plugin + 2.4 + + + maven-clean-plugin + 2.5 + + + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + + + + maven-deploy-plugin + 2.8.1 + + + maven-eclipse-plugin + 2.9 + + + maven-gpg-plugin + 1.5 + + + maven-install-plugin + 2.5.1 + + + maven-jar-plugin + 2.4 + + + maven-javadoc-plugin + 2.9.1 + + + maven-plugin-plugin + 3.3 + + + maven-release-plugin + 2.5 + + + maven-resources-plugin + 2.6 + + + maven-site-plugin + 3.3 + + + maven-source-plugin + 2.2.1 + + + maven-surefire-plugin + 2.17 + + + org.apache.uima + jcasgen-maven-plugin + ${uima-version} + + + + generate + + + + - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.cleartk - - consistent-versions-plugin - - - [0.5.0-SNAPSHOT,) - - - - check-version-consistency - - - - - - - - - - - org.apache.maven.plugins - - - maven-enforcer-plugin - - - [1.0,) - - - enforce - - - - - - - - - - - - - - - maven-assembly-plugin - - true - - zip.xml - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.cleartk + + consistent-versions-plugin + + + [0.5.0-SNAPSHOT,) + + + + check-version-consistency + + + + + + + + + + + org.apache.maven.plugins + + + maven-enforcer-plugin + + + [1.0,) + + + enforce + + + + + + + + + + + + + + + maven-assembly-plugin + + true + + zip.xml + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + - true + true - - org.cleartk:* - + + org.cleartk:* + - true + true - - - generated - a - Generated - - - ordered - a - Ordered - - - modifiable - a - Modifiable - - + + + generated + a + Generated + + + ordered + a + Ordered + + + modifiable + a + Modifiable + + - true + true - true + true - + - http://commons.apache.org/io/apidocs/ + http://commons.apache.org/io/apidocs/ - http://commons.apache.org/lang/apidocs/ + http://commons.apache.org/lang/apidocs/ - http://commons.apache.org/logging/apidocs/ + http://commons.apache.org/logging/apidocs/ - http://docs.guava-libraries.googlecode.com/git-history/v10.0/javadoc/ + http://docs.guava-libraries.googlecode.com/git-history/v10.0/javadoc/ - http://uima.apache.org/d/uimaj-2.3.1/api/ + http://uima.apache.org/d/uimaj-2.3.1/api/ - http://www.jdom.org/docs/apidocs/ + http://www.jdom.org/docs/apidocs/ - http://joda-time.sourceforge.net/apidocs + http://joda-time.sourceforge.net/apidocs - http://findbugs.sourceforge.net/api/ + http://findbugs.sourceforge.net/api/ - http://junit.org/apidocs/ + http://junit.org/apidocs/ @@ -510,28 +522,28 @@ - http://logging.apache.org/log4j/1.2/apidocs/ + http://logging.apache.org/log4j/1.2/apidocs/ - http://lucene.apache.org/java/3_0_3/api/all/ + http://lucene.apache.org/java/3_0_3/api/all/ - http://mallet.cs.umass.edu/api/ + http://mallet.cs.umass.edu/api/ - http://maltparser.org/api/ + http://maltparser.org/api/ - http://incubator.apache.org/opennlp/documentation/apidocs/opennlp-maxent/ + http://incubator.apache.org/opennlp/documentation/apidocs/opennlp-maxent/ - http://incubator.apache.org/opennlp/documentation/apidocs/opennlp-tools/ + http://incubator.apache.org/opennlp/documentation/apidocs/opennlp-tools/ - http://static.springsource.org/spring/docs/3.0.3.RELEASE/javadoc-api/ + http://static.springsource.org/spring/docs/3.0.3.RELEASE/javadoc-api/ - http://nlp.stanford.edu/nlp/javadoc/javanlp/ + http://nlp.stanford.edu/nlp/javadoc/javanlp/ @@ -540,25 +552,25 @@ - http://trove4j.sourceforge.net/javadocs/ + http://trove4j.sourceforge.net/javadocs/ - http://uimafit.googlecode.com/svn/tags/uimafit-parent-1.2.0/apidocs/ + http://uimafit.googlecode.com/svn/tags/uimafit-parent-1.2.0/apidocs/ - http://xml.apache.org/xalan-j/apidocs/ + http://xml.apache.org/xalan-j/apidocs/ - https://xerces.apache.org/xerces2-j/javadocs/api/ + https://xerces.apache.org/xerces2-j/javadocs/api/ - http://xom.nu/apidocs/ - - - - - + http://xom.nu/apidocs/ + + + + + From eb68d1e95581e48b1baccb3abbaf9c1229de35aa Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Thu, 3 Nov 2022 15:10:01 +0100 Subject: [PATCH 3/5] Issue 448 - Update dependencies - maven-surefire-plugin 2.17 -> 3.0.0-M7 - By default skip svmlight and tksvmlight tests because these require non-redistributable native binaries --- .../TkSvmLightBooleanOutcomeClassifierBuilder.java | 10 ++++++---- .../org/cleartk/ml/tksvmlight/RunTkSvmLightTest.java | 3 --- pom.xml | 12 +++++++++++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/cleartk-ml-tksvmlight/src/main/java/org/cleartk/ml/tksvmlight/TkSvmLightBooleanOutcomeClassifierBuilder.java b/cleartk-ml-tksvmlight/src/main/java/org/cleartk/ml/tksvmlight/TkSvmLightBooleanOutcomeClassifierBuilder.java index b31cb09fc..d44b36c9a 100644 --- a/cleartk-ml-tksvmlight/src/main/java/org/cleartk/ml/tksvmlight/TkSvmLightBooleanOutcomeClassifierBuilder.java +++ b/cleartk-ml-tksvmlight/src/main/java/org/cleartk/ml/tksvmlight/TkSvmLightBooleanOutcomeClassifierBuilder.java @@ -53,9 +53,9 @@ public class TkSvmLightBooleanOutcomeClassifierBuilder extends TreeKernelSvmBooleanOutcomeClassifierBuilder{ - static Logger logger = UIMAFramework.getLogger(TkSvmLightBooleanOutcomeClassifierBuilder.class); + static final Logger logger = UIMAFramework.getLogger(TkSvmLightBooleanOutcomeClassifierBuilder.class); - public static String COMMAND_ARGUMENT = "--executable"; + public static final String COMMAND_ARGUMENT = "--executable"; /** * Train a SVMTK classifier. Assumes the executable name is "tk_svm_learn". Note: this is public @@ -90,7 +90,8 @@ public static void train(String filePath, String[] args) throws Exception { process.waitFor(); } - public File getTrainingDataFile(File dir) { + @Override +public File getTrainingDataFile(File dir) { return new File(dir, "training-data.svmlight"); } @@ -107,7 +108,8 @@ private File getModelFile(File dir) { * The arguments to be used by the tk_svm_classify command. Note: -t 5 is used to specify * the use of Tree Kernels. */ - public void trainClassifier(File dir, String... args) throws Exception { + @Override +public void trainClassifier(File dir, String... args) throws Exception { File trainingDataFile = (dir.isDirectory() ? getTrainingDataFile(dir) : dir); train(trainingDataFile.getPath(), args); } diff --git a/cleartk-ml-tksvmlight/src/test/java/org/cleartk/ml/tksvmlight/RunTkSvmLightTest.java b/cleartk-ml-tksvmlight/src/test/java/org/cleartk/ml/tksvmlight/RunTkSvmLightTest.java index 6de194ee8..e5ba58624 100644 --- a/cleartk-ml-tksvmlight/src/test/java/org/cleartk/ml/tksvmlight/RunTkSvmLightTest.java +++ b/cleartk-ml-tksvmlight/src/test/java/org/cleartk/ml/tksvmlight/RunTkSvmLightTest.java @@ -50,7 +50,6 @@ import org.cleartk.test.util.DefaultTestBase; import org.junit.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import com.google.common.collect.Lists; @@ -220,7 +219,6 @@ public void testTreeFeatures() throws Exception { } } - @Ignore @Test public void testTKSVMlight() throws Exception { this.assumeTestsEnabled(COMMON_TESTS_PROPERTY_VALUE, TK_SVMLIGHT_TESTS_PROPERTY_VALUE); @@ -265,7 +263,6 @@ public void testTKSVMlight() throws Exception { } } - @Ignore @Test public void testOVATKSVMlight() throws Exception { this.assumeTestsEnabled(COMMON_TESTS_PROPERTY_VALUE, TK_SVMLIGHT_TESTS_PROPERTY_VALUE); diff --git a/pom.xml b/pom.xml index 5dd459c8d..d924627d8 100644 --- a/pom.xml +++ b/pom.xml @@ -106,7 +106,11 @@ 1.8 1.8 + UTF-8 + + tksvmlight,svmlight + 2.11.0 2.5.0 4.13.2 @@ -295,6 +299,7 @@ + @@ -360,7 +365,12 @@ maven-surefire-plugin - 2.17 + 3.0.0-M7 + + + ${cleartk.skipTests} + + org.apache.uima From b94860b8d26db814ccbfedb119d6665e087e48ab Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Thu, 3 Nov 2022 15:33:12 +0100 Subject: [PATCH 4/5] Issue 448 - Update dependencies - xmlunit -> 2.9.0 - Fixed a test --- cleartk-timeml/pom.xml | 180 +++++++++--------- .../cleartk/timeml/TimeMlAnnotateTest.java | 16 +- pom.xml | 12 +- 3 files changed, 114 insertions(+), 94 deletions(-) diff --git a/cleartk-timeml/pom.xml b/cleartk-timeml/pom.xml index f71aadacb..f10087425 100644 --- a/cleartk-timeml/pom.xml +++ b/cleartk-timeml/pom.xml @@ -1,89 +1,97 @@ - - 4.0.0 - cleartk-timeml - jar - ClearTK TimeML - ClearTK annotators for temporal information extraction - - cleartk - org.cleartk - 2.1.0-SNAPSHOT - .. - - - - com.lexicalscope.jewelcli - jewelcli - - - org.cleartk - cleartk-util - - - org.cleartk - cleartk-eval - - - org.cleartk - cleartk-ml - - - org.cleartk - cleartk-ml-liblinear - - - org.cleartk - cleartk-type-system - - - org.cleartk - cleartk-feature - - - org.cleartk - cleartk-corpus - - - org.cleartk - cleartk-token - - - org.cleartk - cleartk-snowball - - - org.cleartk - cleartk-opennlp-tools - + + 4.0.0 + cleartk-timeml + jar + ClearTK TimeML + ClearTK annotators for temporal information extraction + + cleartk + org.cleartk + 2.1.0-SNAPSHOT + .. + + + + com.lexicalscope.jewelcli + jewelcli + + + org.cleartk + cleartk-util + + + org.cleartk + cleartk-eval + + + org.cleartk + cleartk-ml + + + org.cleartk + cleartk-ml-liblinear + + + org.cleartk + cleartk-type-system + + + org.cleartk + cleartk-feature + + + org.cleartk + cleartk-corpus + + + org.cleartk + cleartk-token + + + org.cleartk + cleartk-snowball + + + org.cleartk + cleartk-opennlp-tools + + - - org.cleartk - cleartk-test-util - test - - - - + + org.cleartk + cleartk-test-util + test + + + org.xmlunit + xmlunit-assertj3 + test + + + + - - maven-surefire-plugin - - -Xmx512m - - - - maven-assembly-plugin - - - jar-with-dependencies - - - - org.cleartk.timeml.TimeMLAnnotate - - - - - - + + maven-surefire-plugin + + -Xmx512m + + + + maven-assembly-plugin + + + jar-with-dependencies + + + + org.cleartk.timeml.TimeMLAnnotate + + + + + + diff --git a/cleartk-timeml/src/test/java/org/cleartk/timeml/TimeMlAnnotateTest.java b/cleartk-timeml/src/test/java/org/cleartk/timeml/TimeMlAnnotateTest.java index d0a7d8182..b1c74ad47 100644 --- a/cleartk-timeml/src/test/java/org/cleartk/timeml/TimeMlAnnotateTest.java +++ b/cleartk-timeml/src/test/java/org/cleartk/timeml/TimeMlAnnotateTest.java @@ -27,9 +27,12 @@ import org.apache.commons.io.FileUtils; import org.junit.After; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import org.xmlunit.assertj3.XmlAssert; +import org.xmlunit.builder.Input; +import org.xmlunit.diff.DefaultNodeMatcher; +import org.xmlunit.diff.ElementSelectors; /** *
@@ -45,7 +48,8 @@ public class TimeMlAnnotateTest extends TimeMlTestBase{ private File outputFile; - @Before + @Override +@Before public void setUp() throws Exception { this.tempDir = File.createTempFile("TimeMLAnnotateTest", ""); this.tempDir.delete(); @@ -68,8 +72,7 @@ public void test() throws Exception { this.logger.info(BIG_MEMORY_TEST_MESSAGE); TimeMlAnnotate.main(this.inputFile.getPath(), this.tempDir.getPath()); - String output = FileUtils.readFileToString(this.outputFile); - output = output.replaceAll("\r\n", "\n"); + // @formatter:off String expected = "" + @@ -93,6 +96,9 @@ public void test() throws Exception { "" + ""; // @formatter:on - Assert.assertEquals("TimeML output should match", expected, output); + + XmlAssert.assertThat(Input.fromFile(outputFile)).and(expected) + .withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byNameAndAllAttributes)) + .areSimilar(); } } diff --git a/pom.xml b/pom.xml index d924627d8..9d5eecb41 100644 --- a/pom.xml +++ b/pom.xml @@ -106,15 +106,16 @@ 1.8 1.8 - + UTF-8 tksvmlight,svmlight - + 2.11.0 2.5.0 4.13.2 3.23.1 + 2.9.0 @@ -170,6 +171,11 @@ org.assertj assertj-core ${assertj-version} + + + org.xmlunit + xmlunit-assertj3 + ${xmlunit-version} @@ -299,7 +305,7 @@ - + From 48d702254910a6d876dc3e3223a9b094f326fec8 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Thu, 3 Nov 2022 16:02:06 +0100 Subject: [PATCH 5/5] Issue 448 - Update dependencies - common-io 2.7 -> 2.11.0 - maven-assembly-plugin 2.4 -> 3.4.2 - maven-clean-plugin 2.5 -> 3.2.0 - maven-compiler-plugin 3.1 -> 3.10.1 - maven-deploy-plugin 2.8.1 -> 3.0.0 - maven-gpg-plugin 1.5 -> 3.0.1 - maven-install-plugin 2.5.1 -> 3.0.1 - maven-jar-plugin 2.4 -> 3.3.0 - maven-javadoc-plugin 2.9.1 -> 3.4.1 - maven-plugin-plugin 3.3 -> 3.6.4 - maven-release-plugin 2.5 -> 3.0.0-M7 - maven-site-plugin 2.2.1 -> 3.2.1 - maven-source-plugin 2.2.1 -> 3.2.1 --- pom.xml | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 9d5eecb41..2c240d315 100644 --- a/pom.xml +++ b/pom.xml @@ -116,6 +116,7 @@ 4.13.2 3.23.1 2.9.0 + 2.11.0
@@ -160,7 +161,7 @@ commons-io commons-io - 2.7 + ${commons-io-version} junit @@ -311,15 +312,15 @@ maven-assembly-plugin - 2.4 + 3.4.2 maven-clean-plugin - 2.5 + 3.2.0 maven-compiler-plugin - 3.1 + 3.10.1 1.8 1.8 @@ -327,47 +328,43 @@ maven-deploy-plugin - 2.8.1 - - - maven-eclipse-plugin - 2.9 + 3.0.0 maven-gpg-plugin - 1.5 + 3.0.1 maven-install-plugin - 2.5.1 + 3.0.1 maven-jar-plugin - 2.4 + 3.3.0 maven-javadoc-plugin - 2.9.1 + 3.4.1 maven-plugin-plugin - 3.3 + 3.6.4 maven-release-plugin - 2.5 + 3.0.0-M7 maven-resources-plugin - 2.6 + 3.3.0 maven-site-plugin - 3.3 + 3.12.1 maven-source-plugin - 2.2.1 + 3.2.1 maven-surefire-plugin @@ -390,6 +387,7 @@ + @@ -456,7 +454,6 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.9.1 true