You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jz...@apache.org on 2023/01/01 16:46:47 UTC
[opennlp] branch main updated: OPENNLP-1358 - Failing tests on Windows 11 and Java 17 (#476)
This is an automated email from the ASF dual-hosted git repository.
jzemerick pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opennlp.git
The following commit(s) were added to refs/heads/main by this push:
new 04028e95 OPENNLP-1358 - Failing tests on Windows 11 and Java 17 (#476)
04028e95 is described below
commit 04028e9551f8e7c86710bc67ba7e55065d26187c
Author: Richard Zowalla <13...@users.noreply.github.com>
AuthorDate: Sun Jan 1 17:46:40 2023 +0100
OPENNLP-1358 - Failing tests on Windows 11 and Java 17 (#476)
---
.gitattributes | 48 +++++
.github/workflows/maven.yml | 9 +-
.../builder/MorfologikDictionaryBuilderTest.java | 7 +-
opennlp-tools/lang/ml/MaxentQNTrainerParams.txt | 78 +++----
.../java/opennlp/tools/AbstractTempDirTest.java | 43 ++++
.../tokenizer/TokenizerTrainerToolTest.java | 14 +-
.../convert/FileToStringSampleStreamTest.java | 14 +-
.../tools/formats/DirectorySampleStreamTest.java | 21 +-
.../opennlp/maxent/io/rvfes-bug-data-broken.txt | 4 +-
.../data/opennlp/maxent/io/rvfes-bug-data-ok.txt | 4 +-
.../maxent/real-valued-weights-training-data.txt | 40 ++--
.../maxent/repeat-weighting-training-data.txt | 40 ++--
.../opennlp/tools/formats/conll2003-en.sample | 30 +--
.../test-descriptors/OrganizationNameFinder.xml | 238 ++++++++++-----------
.../test-descriptors/PersonNameFinder.xml | 238 ++++++++++-----------
15 files changed, 453 insertions(+), 375 deletions(-)
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..39bfc13c
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,48 @@
+# Handle line endings automatically for files detected as text
+# and leave all files detected as binary untouched.
+* text=auto
+
+#
+# The above will handle all files NOT found below
+#
+# These files are text and should be normalized (Convert crlf => lf)
+*.adoc text eol=lf
+*.html text eol=lf
+*.java text eol=lf
+*.jspf text eol=lf
+*.md text eol=lf
+*.properties text eol=lf
+*.sh text eol=lf
+*.txt text eol=lf
+*.xml text eol=lf
+*.xsd text eol=lf
+*.xsl text eol=lf
+*.yml text eol=lf
+
+LICENSE text eol=lf
+NOTICE text eol=lf
+
+# These files are binary and should be left untouched
+# (binary is a macro for -text -diff)
+*.class binary
+*.dll binary
+*.ear binary
+*.gif binary
+*.ico binary
+*.jar binary
+*.jpg binary
+*.jpeg binary
+*.png binary
+*.ser binary
+*.so binary
+*.war binary
+*.zip binary
+*.exe binary
+*.gz binary
+
+#Windows
+*.bat text eol=crlf
+*.cmd text eol=crlf
+
+#Unix/Linux
+*.sh text eol=lf
\ No newline at end of file
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index a0538484..f11de986 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -23,7 +23,7 @@ jobs:
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
- os: [ubuntu-latest]
+ os: [ubuntu-latest, windows-latest]
java: [ 11, 17, 18, 19 ]
experimental: [false]
# include:
@@ -47,9 +47,4 @@ jobs:
- name: Build with Maven
run: mvn -V clean test install --no-transfer-progress -Pjacoco
- name: Jacoco
- run: mvn jacoco:report
- - name: Coveralls
- uses: coverallsapp/github-action@master
- continue-on-error: true
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
+ run: mvn jacoco:report
\ No newline at end of file
diff --git a/opennlp-morfologik-addon/src/test/java/opennlp/morfologik/builder/MorfologikDictionaryBuilderTest.java b/opennlp-morfologik-addon/src/test/java/opennlp/morfologik/builder/MorfologikDictionaryBuilderTest.java
index 6de83f73..9228e367 100644
--- a/opennlp-morfologik-addon/src/test/java/opennlp/morfologik/builder/MorfologikDictionaryBuilderTest.java
+++ b/opennlp-morfologik-addon/src/test/java/opennlp/morfologik/builder/MorfologikDictionaryBuilderTest.java
@@ -17,8 +17,8 @@
package opennlp.morfologik.builder;
+import java.io.File;
import java.nio.file.Path;
-import java.nio.file.Paths;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
@@ -41,9 +41,10 @@ public class MorfologikDictionaryBuilderTest extends AbstractMorfologikTest {
// file with same name, but .info extension
// this will build a binary dictionary located in compiledLemmaDictionary
- Path compiledLemmaDictionary = new MorfologikDictionaryBuilder().build(
- Paths.get(getResource("/dictionaryWithLemma.txt").getPath()));
+ final Path rawLemmaDictionary =
+ new File(getResource("/dictionaryWithLemma.txt").getFile()).toPath();
+ Path compiledLemmaDictionary = new MorfologikDictionaryBuilder().build(rawLemmaDictionary);
// Part 2: load a MorfologikLemmatizer and use it
MorfologikLemmatizer lemmatizer = new MorfologikLemmatizer(compiledLemmaDictionary);
diff --git a/opennlp-tools/lang/ml/MaxentQNTrainerParams.txt b/opennlp-tools/lang/ml/MaxentQNTrainerParams.txt
index 5c4165de..c1c7bfd5 100644
--- a/opennlp-tools/lang/ml/MaxentQNTrainerParams.txt
+++ b/opennlp-tools/lang/ml/MaxentQNTrainerParams.txt
@@ -1,40 +1,40 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Sample machine learning properties file
-
-Algorithm=MAXENT_QN
-Iterations=100
-Cutoff=0
-
-# Number of threads
-Threads=1
-
-# Costs for L1- and L2-regularization. These parameters must be larger or
-# equal to zero. The higher they are, the more penalty will be imposed to
-# avoid overfitting. The parameters can be set as follows:
-# if L1Cost = 0 and L2Cost = 0, no regularization will be used,
-# if L1Cost > 0 and L2Cost = 0, L1 will be used,
-# if L1Cost = 0 and L2Cost > 0, L2 will be used,
-# if both paramters are set to be larger than 0, Elastic Net
-# (i.e. L1 and L2 combined) will be used.
-L1Cost=0.1
-L2Cost=0.1
-
-# Number of Hessian updates to store
-NumOfUpdates=15
-
-# Maximum number of objective function's evaluations
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Sample machine learning properties file
+
+Algorithm=MAXENT_QN
+Iterations=100
+Cutoff=0
+
+# Number of threads
+Threads=1
+
+# Costs for L1- and L2-regularization. These parameters must be larger or
+# equal to zero. The higher they are, the more penalty will be imposed to
+# avoid overfitting. The parameters can be set as follows:
+# if L1Cost = 0 and L2Cost = 0, no regularization will be used,
+# if L1Cost > 0 and L2Cost = 0, L1 will be used,
+# if L1Cost = 0 and L2Cost > 0, L2 will be used,
+# if both paramters are set to be larger than 0, Elastic Net
+# (i.e. L1 and L2 combined) will be used.
+L1Cost=0.1
+L2Cost=0.1
+
+# Number of Hessian updates to store
+NumOfUpdates=15
+
+# Maximum number of objective function's evaluations
MaxFctEval=30000
\ No newline at end of file
diff --git a/opennlp-tools/src/test/java/opennlp/tools/AbstractTempDirTest.java b/opennlp-tools/src/test/java/opennlp/tools/AbstractTempDirTest.java
new file mode 100644
index 00000000..baba5932
--- /dev/null
+++ b/opennlp-tools/src/test/java/opennlp/tools/AbstractTempDirTest.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package opennlp.tools;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+
+// TODO: OPENNLP-1430 Remove workaround for @TempDir
+// after https://github.com/junit-team/junit5/issues/2811 is fixed.
+public abstract class AbstractTempDirTest {
+
+ protected Path tempDir;
+
+ @BeforeEach
+ public void before() throws IOException {
+ tempDir = Files.createTempDirectory(this.getClass().getSimpleName());
+ }
+
+ @AfterEach
+ void after() {
+ tempDir.toFile().deleteOnExit();
+ }
+
+}
diff --git a/opennlp-tools/src/test/java/opennlp/tools/cmdline/tokenizer/TokenizerTrainerToolTest.java b/opennlp-tools/src/test/java/opennlp/tools/cmdline/tokenizer/TokenizerTrainerToolTest.java
index b079bf64..9a5f1138 100644
--- a/opennlp-tools/src/test/java/opennlp/tools/cmdline/tokenizer/TokenizerTrainerToolTest.java
+++ b/opennlp-tools/src/test/java/opennlp/tools/cmdline/tokenizer/TokenizerTrainerToolTest.java
@@ -24,7 +24,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.nio.charset.StandardCharsets;
-import java.nio.file.Path;
import org.apache.commons.io.FileUtils;
@@ -32,8 +31,8 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.io.TempDir;
+import opennlp.tools.AbstractTempDirTest;
import opennlp.tools.cmdline.StreamFactoryRegistry;
import opennlp.tools.cmdline.TerminateToolException;
import opennlp.tools.dictionary.Dictionary;
@@ -42,13 +41,10 @@ import opennlp.tools.util.InvalidFormatException;
/**
* Tests for the {@link TokenizerTrainerTool} class.
*/
-public class TokenizerTrainerToolTest {
+public class TokenizerTrainerToolTest extends AbstractTempDirTest {
private TokenizerTrainerTool tokenizerTrainerTool;
- @TempDir
- public Path tempFolder;
-
private String sampleSuccessData =
"Pierre Vinken<SPLIT>, 61 years old<SPLIT>, will join the board as a nonexecutive " +
"director Nov. 29<SPLIT>.\n" +
@@ -89,7 +85,7 @@ public class TokenizerTrainerToolTest {
@Test()
public void testTestRunHappyCase() throws IOException {
- File model = tempFolder.resolve("model-en.bin").toFile();
+ File model = tempDir.resolve("model-en.bin").toFile();
String[] args =
new String[] { "-model" , model.getAbsolutePath() , "-alphaNumOpt" , "false" , "-lang" , "en" ,
@@ -111,7 +107,7 @@ public class TokenizerTrainerToolTest {
@Test
public void testTestRunExceptionCase() throws IOException {
- File model = tempFolder.resolve("model-en.bin").toFile();
+ File model = tempDir.resolve("model-en.bin").toFile();
model.deleteOnExit();
String[] args =
@@ -133,7 +129,7 @@ public class TokenizerTrainerToolTest {
private File prepareDataFile(String input) throws IOException {
// This is guaranteed to be deleted after the test finishes.
- File dataFile = tempFolder.resolve("data-en.train").toFile();
+ File dataFile = tempDir.resolve("data-en.train").toFile();
FileUtils.writeStringToFile(dataFile , input , "ISO-8859-1");
return dataFile;
}
diff --git a/opennlp-tools/src/test/java/opennlp/tools/convert/FileToStringSampleStreamTest.java b/opennlp-tools/src/test/java/opennlp/tools/convert/FileToStringSampleStreamTest.java
index a8d1c2d6..5b95cc33 100644
--- a/opennlp-tools/src/test/java/opennlp/tools/convert/FileToStringSampleStreamTest.java
+++ b/opennlp-tools/src/test/java/opennlp/tools/convert/FileToStringSampleStreamTest.java
@@ -21,22 +21,18 @@ import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
-import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.io.TempDir;
+import opennlp.tools.AbstractTempDirTest;
import opennlp.tools.formats.DirectorySampleStream;
import opennlp.tools.formats.convert.FileToStringSampleStream;
-public class FileToStringSampleStreamTest {
-
- @TempDir
- public Path directory;
+public class FileToStringSampleStreamTest extends AbstractTempDirTest {
@Test
public void readFileTest() throws IOException {
@@ -47,12 +43,12 @@ public class FileToStringSampleStreamTest {
List<String> sentences = Arrays.asList(sentence1, sentence2);
DirectorySampleStream directorySampleStream =
- new DirectorySampleStream(directory.toFile(), null, false);
+ new DirectorySampleStream(tempDir.toFile(), null, false);
- File tempFile1 = directory.resolve("tempFile1").toFile();
+ File tempFile1 = tempDir.resolve("tempFile1").toFile();
FileUtils.writeStringToFile(tempFile1, sentence1, StandardCharsets.UTF_8);
- File tempFile2 = directory.resolve("tempFile2").toFile();
+ File tempFile2 = tempDir.resolve("tempFile2").toFile();
FileUtils.writeStringToFile(tempFile2, sentence2, StandardCharsets.UTF_8);
try (FileToStringSampleStream stream =
diff --git a/opennlp-tools/src/test/java/opennlp/tools/formats/DirectorySampleStreamTest.java b/opennlp-tools/src/test/java/opennlp/tools/formats/DirectorySampleStreamTest.java
index b49671fd..04b931db 100644
--- a/opennlp-tools/src/test/java/opennlp/tools/formats/DirectorySampleStreamTest.java
+++ b/opennlp-tools/src/test/java/opennlp/tools/formats/DirectorySampleStreamTest.java
@@ -29,12 +29,11 @@ import java.util.UUID;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.io.TempDir;
-public class DirectorySampleStreamTest {
+import opennlp.tools.AbstractTempDirTest;
+
+public class DirectorySampleStreamTest extends AbstractTempDirTest {
- @TempDir
- Path tempDirectory;
private FileFilter filter;
@BeforeEach
@@ -53,7 +52,7 @@ public class DirectorySampleStreamTest {
File temp2 = createTempFile();
files.add(temp2);
- DirectorySampleStream stream = new DirectorySampleStream(tempDirectory.toFile(), filter, false);
+ DirectorySampleStream stream = new DirectorySampleStream(tempDir.toFile(), filter, false);
File file = stream.read();
Assertions.assertTrue(files.contains(file));
@@ -79,7 +78,7 @@ public class DirectorySampleStreamTest {
File temp2 = createTempFile();
files.add(temp2);
- DirectorySampleStream stream = new DirectorySampleStream(tempDirectory.toFile(), null, false);
+ DirectorySampleStream stream = new DirectorySampleStream(tempDir.toFile(), null, false);
File file = stream.read();
Assertions.assertTrue(files.contains(file));
@@ -106,7 +105,7 @@ public class DirectorySampleStreamTest {
File temp2 = Files.createTempFile(tempSubDirectory.toPath(), "sub1", ".tmp").toFile();
files.add(temp2);
- DirectorySampleStream stream = new DirectorySampleStream(tempDirectory.toFile(), filter, true);
+ DirectorySampleStream stream = new DirectorySampleStream(tempDir.toFile(), filter, true);
File file = stream.read();
Assertions.assertTrue(files.contains(file));
@@ -132,7 +131,7 @@ public class DirectorySampleStreamTest {
File temp2 = createTempFile();
files.add(temp2);
- DirectorySampleStream stream = new DirectorySampleStream(tempDirectory.toFile(), filter, false);
+ DirectorySampleStream stream = new DirectorySampleStream(tempDir.toFile(), filter, false);
File file = stream.read();
Assertions.assertTrue(files.contains(file));
@@ -155,7 +154,7 @@ public class DirectorySampleStreamTest {
@Test
public void emptyDirectoryTest() throws IOException {
- DirectorySampleStream stream = new DirectorySampleStream(tempDirectory.toFile(), filter, false);
+ DirectorySampleStream stream = new DirectorySampleStream(tempDir.toFile(), filter, false);
Assertions.assertNull(stream.read());
stream.close();
@@ -177,7 +176,7 @@ public class DirectorySampleStreamTest {
private File createTempFolder(String name) {
- Path subDir = tempDirectory.resolve(name);
+ Path subDir = tempDir.resolve(name);
try {
Files.createDirectory(subDir);
@@ -191,7 +190,7 @@ public class DirectorySampleStreamTest {
private File createTempFile() {
- Path tempFile = tempDirectory.resolve(UUID.randomUUID() + ".tmp");
+ Path tempFile = tempDir.resolve(UUID.randomUUID() + ".tmp");
try {
Files.createFile(tempFile);
diff --git a/opennlp-tools/src/test/resources/data/opennlp/maxent/io/rvfes-bug-data-broken.txt b/opennlp-tools/src/test/resources/data/opennlp/maxent/io/rvfes-bug-data-broken.txt
index e9a77e70..9d3c51af 100644
--- a/opennlp-tools/src/test/resources/data/opennlp/maxent/io/rvfes-bug-data-broken.txt
+++ b/opennlp-tools/src/test/resources/data/opennlp/maxent/io/rvfes-bug-data-broken.txt
@@ -1,2 +1,2 @@
-C goodbye=1.0
-C goodbye
+C goodbye=1.0
+C goodbye
diff --git a/opennlp-tools/src/test/resources/data/opennlp/maxent/io/rvfes-bug-data-ok.txt b/opennlp-tools/src/test/resources/data/opennlp/maxent/io/rvfes-bug-data-ok.txt
index 22f505c8..e1d99cc5 100644
--- a/opennlp-tools/src/test/resources/data/opennlp/maxent/io/rvfes-bug-data-ok.txt
+++ b/opennlp-tools/src/test/resources/data/opennlp/maxent/io/rvfes-bug-data-ok.txt
@@ -1,2 +1,2 @@
-C goodbye
-C goodbye=1.0
+C goodbye
+C goodbye=1.0
diff --git a/opennlp-tools/src/test/resources/data/opennlp/maxent/real-valued-weights-training-data.txt b/opennlp-tools/src/test/resources/data/opennlp/maxent/real-valued-weights-training-data.txt
index 6ea20aa4..62e4a18c 100644
--- a/opennlp-tools/src/test/resources/data/opennlp/maxent/real-valued-weights-training-data.txt
+++ b/opennlp-tools/src/test/resources/data/opennlp/maxent/real-valued-weights-training-data.txt
@@ -1,20 +1,20 @@
-A feature1=4.0 feature3=10.0 feature4=2.0
-A feature1=2.0 feature2=4.0 feature4=3.0
-A feature2=5.0 feature3=12.0 feature4=4.0
-A feature1=1.0 feature3=11.0 feature4=3.0
-A feature1=4.0 feature2=5.0 feature4=2.0
-A feature1=3.0 feature2=4.0 feature3=9.0
-A feature2=3.0 feature3=11.0 feature4=2.0
-A feature1=1.0 feature3=12.0
-A feature2=6.0 feature3=12.0 feature4=3.0
-A feature1=3.0 feature2=7.0 feature3=11.0
-B feature5=4.0 feature2=1.0 feature4=10.0
-B feature2=1.0 feature3=11.0
-B feature5=3.0 feature4=12.0
-B feature2=1.0 feature3=11.0
-B feature5=4.0 feature4=10.0
-B feature2=1.0 feature3=9.0
-B feature5=2.0 feature4=11.0
-B feature2=1.0 feature3=12.0
-B feature5=4.0 feature4=12.0
-B feature2=1.0 feature3=11.0 feature4=4.0
+A feature1=4.0 feature3=10.0 feature4=2.0
+A feature1=2.0 feature2=4.0 feature4=3.0
+A feature2=5.0 feature3=12.0 feature4=4.0
+A feature1=1.0 feature3=11.0 feature4=3.0
+A feature1=4.0 feature2=5.0 feature4=2.0
+A feature1=3.0 feature2=4.0 feature3=9.0
+A feature2=3.0 feature3=11.0 feature4=2.0
+A feature1=1.0 feature3=12.0
+A feature2=6.0 feature3=12.0 feature4=3.0
+A feature1=3.0 feature2=7.0 feature3=11.0
+B feature5=4.0 feature2=1.0 feature4=10.0
+B feature2=1.0 feature3=11.0
+B feature5=3.0 feature4=12.0
+B feature2=1.0 feature3=11.0
+B feature5=4.0 feature4=10.0
+B feature2=1.0 feature3=9.0
+B feature5=2.0 feature4=11.0
+B feature2=1.0 feature3=12.0
+B feature5=4.0 feature4=12.0
+B feature2=1.0 feature3=11.0 feature4=4.0
diff --git a/opennlp-tools/src/test/resources/data/opennlp/maxent/repeat-weighting-training-data.txt b/opennlp-tools/src/test/resources/data/opennlp/maxent/repeat-weighting-training-data.txt
index 1d9454d9..44b37989 100644
--- a/opennlp-tools/src/test/resources/data/opennlp/maxent/repeat-weighting-training-data.txt
+++ b/opennlp-tools/src/test/resources/data/opennlp/maxent/repeat-weighting-training-data.txt
@@ -1,20 +1,20 @@
-A feature1 feature1 feature1 feature1 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4
-A feature1 feature1 feature2 feature2 feature2 feature2 feature4 feature4 feature4
-A feature2 feature2 feature2 feature2 feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4 feature4 feature4
-A feature1 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4 feature4
-A feature1 feature1 feature1 feature1 feature2 feature2 feature2 feature2 feature2 feature4 feature4
-A feature1 feature1 feature1 feature2 feature2 feature2 feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
-A feature2 feature2 feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4
-A feature1 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
-A feature2 feature2 feature2 feature2 feature2 feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4 feature4
-A feature1 feature1 feature1 feature2 feature2 feature2 feature2 feature2 feature2 feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
-B feature5 feature5 feature5 feature5 feature2 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4
-B feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
-B feature5 feature5 feature5 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4
-B feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
-B feature5 feature5 feature5 feature5 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4
-B feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
-B feature5 feature5 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4
-B feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
-B feature5 feature5 feature5 feature5 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4
-B feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4 feature4 feature4
+A feature1 feature1 feature1 feature1 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4
+A feature1 feature1 feature2 feature2 feature2 feature2 feature4 feature4 feature4
+A feature2 feature2 feature2 feature2 feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4 feature4 feature4
+A feature1 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4 feature4
+A feature1 feature1 feature1 feature1 feature2 feature2 feature2 feature2 feature2 feature4 feature4
+A feature1 feature1 feature1 feature2 feature2 feature2 feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
+A feature2 feature2 feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4
+A feature1 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
+A feature2 feature2 feature2 feature2 feature2 feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4 feature4
+A feature1 feature1 feature1 feature2 feature2 feature2 feature2 feature2 feature2 feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
+B feature5 feature5 feature5 feature5 feature2 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4
+B feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
+B feature5 feature5 feature5 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4
+B feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
+B feature5 feature5 feature5 feature5 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4
+B feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
+B feature5 feature5 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4
+B feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3
+B feature5 feature5 feature5 feature5 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4 feature4
+B feature2 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature3 feature4 feature4 feature4 feature4
diff --git a/opennlp-tools/src/test/resources/opennlp/tools/formats/conll2003-en.sample b/opennlp-tools/src/test/resources/opennlp/tools/formats/conll2003-en.sample
index aca1ce80..3e04695d 100644
--- a/opennlp-tools/src/test/resources/opennlp/tools/formats/conll2003-en.sample
+++ b/opennlp-tools/src/test/resources/opennlp/tools/formats/conll2003-en.sample
@@ -1,15 +1,15 @@
--DOCSTART- -X- O O
-
-EU NNP I-NP I-ORG
-rejects VBZ I-VP O
-German JJ I-NP I-MISC
-call NN I-NP O
-to TO I-VP O
-boycott VB I-VP O
-British JJ I-NP I-MISC
-lamb NN I-NP O
-. . O O
-
-Peter NNP I-NP I-PER
-Blackburn NNP I-NP I-PER
-
+-DOCSTART- -X- O O
+
+EU NNP I-NP I-ORG
+rejects VBZ I-VP O
+German JJ I-NP I-MISC
+call NN I-NP O
+to TO I-VP O
+boycott VB I-VP O
+British JJ I-NP I-MISC
+lamb NN I-NP O
+. . O O
+
+Peter NNP I-NP I-PER
+Blackburn NNP I-NP I-PER
+
diff --git a/opennlp-uima/src/test/resources/test-descriptors/OrganizationNameFinder.xml b/opennlp-uima/src/test/resources/test-descriptors/OrganizationNameFinder.xml
index 0afe1fc7..15d9cb52 100644
--- a/opennlp-uima/src/test/resources/test-descriptors/OrganizationNameFinder.xml
+++ b/opennlp-uima/src/test/resources/test-descriptors/OrganizationNameFinder.xml
@@ -1,119 +1,119 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
- <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
- <primitive>true</primitive>
- <annotatorImplementationName>opennlp.uima.namefind.NameFinder</annotatorImplementationName>
- <analysisEngineMetaData>
- <name>Organization Name Finder</name>
- <version>1.5.2-incubating</version>
- <vendor>Apache Software Foundation</vendor>
- <configurationParameters>
-
- <configurationParameter>
- <name>opennlp.uima.SentenceType</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
-
- <configurationParameter>
- <name>opennlp.uima.TokenType</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
-
- <configurationParameter>
- <name>opennlp.uima.NameType</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- </configurationParameters>
-
- <configurationParameterSettings>
-
- <nameValuePair>
- <name>opennlp.uima.SentenceType</name>
- <value>
- <string>uima.tcas.DocumentAnnotation</string>
- </value>
- </nameValuePair>
-
- <nameValuePair>
- <name>opennlp.uima.TokenType</name>
- <value>
- <string>opennlp.uima.Token</string>
- </value>
- </nameValuePair>
-
- <nameValuePair>
- <name>opennlp.uima.NameType</name>
- <value>
- <string>opennlp.uima.Organization</string>
- </value>
- </nameValuePair>
- </configurationParameterSettings>
-
- <typeSystemDescription>
- <imports>
- <import location="TypeSystem.xml" />
- </imports>
- </typeSystemDescription>
-
- <capabilities>
- <capability>
- <inputs />
- <outputs />
- <languagesSupported>
- <language>en</language>
- </languagesSupported>
- </capability>
- </capabilities>
- </analysisEngineMetaData>
-
- <externalResourceDependencies>
- <externalResourceDependency>
- <key>opennlp.uima.ModelName</key>
- <interfaceName>opennlp.uima.namefind.TokenNameFinderModelResource</interfaceName>
- </externalResourceDependency>
- </externalResourceDependencies>
-
- <resourceManagerConfiguration>
- <externalResources>
- <externalResource>
- <name>OrganizationModel</name>
- <fileResourceSpecifier>
- <fileUrl>file:test-models/en-ner-organization.bin</fileUrl>
- </fileResourceSpecifier>
- <implementationName>opennlp.uima.namefind.TokenNameFinderModelResourceImpl</implementationName>
- </externalResource>
- </externalResources>
- <externalResourceBindings>
- <externalResourceBinding>
- <key>opennlp.uima.ModelName</key>
- <resourceName>OrganizationModel</resourceName>
- </externalResourceBinding>
- </externalResourceBindings>
- </resourceManagerConfiguration>
-</analysisEngineDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>true</primitive>
+ <annotatorImplementationName>opennlp.uima.namefind.NameFinder</annotatorImplementationName>
+ <analysisEngineMetaData>
+ <name>Organization Name Finder</name>
+ <version>1.5.2-incubating</version>
+ <vendor>Apache Software Foundation</vendor>
+ <configurationParameters>
+
+ <configurationParameter>
+ <name>opennlp.uima.SentenceType</name>
+ <type>String</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>opennlp.uima.TokenType</name>
+ <type>String</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>opennlp.uima.NameType</name>
+ <type>String</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+ </configurationParameters>
+
+ <configurationParameterSettings>
+
+ <nameValuePair>
+ <name>opennlp.uima.SentenceType</name>
+ <value>
+ <string>uima.tcas.DocumentAnnotation</string>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>opennlp.uima.TokenType</name>
+ <value>
+ <string>opennlp.uima.Token</string>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>opennlp.uima.NameType</name>
+ <value>
+ <string>opennlp.uima.Organization</string>
+ </value>
+ </nameValuePair>
+ </configurationParameterSettings>
+
+ <typeSystemDescription>
+ <imports>
+ <import location="TypeSystem.xml" />
+ </imports>
+ </typeSystemDescription>
+
+ <capabilities>
+ <capability>
+ <inputs />
+ <outputs />
+ <languagesSupported>
+ <language>en</language>
+ </languagesSupported>
+ </capability>
+ </capabilities>
+ </analysisEngineMetaData>
+
+ <externalResourceDependencies>
+ <externalResourceDependency>
+ <key>opennlp.uima.ModelName</key>
+ <interfaceName>opennlp.uima.namefind.TokenNameFinderModelResource</interfaceName>
+ </externalResourceDependency>
+ </externalResourceDependencies>
+
+ <resourceManagerConfiguration>
+ <externalResources>
+ <externalResource>
+ <name>OrganizationModel</name>
+ <fileResourceSpecifier>
+ <fileUrl>file:test-models/en-ner-organization.bin</fileUrl>
+ </fileResourceSpecifier>
+ <implementationName>opennlp.uima.namefind.TokenNameFinderModelResourceImpl</implementationName>
+ </externalResource>
+ </externalResources>
+ <externalResourceBindings>
+ <externalResourceBinding>
+ <key>opennlp.uima.ModelName</key>
+ <resourceName>OrganizationModel</resourceName>
+ </externalResourceBinding>
+ </externalResourceBindings>
+ </resourceManagerConfiguration>
+</analysisEngineDescription>
diff --git a/opennlp-uima/src/test/resources/test-descriptors/PersonNameFinder.xml b/opennlp-uima/src/test/resources/test-descriptors/PersonNameFinder.xml
index 659a3f4a..250629e7 100644
--- a/opennlp-uima/src/test/resources/test-descriptors/PersonNameFinder.xml
+++ b/opennlp-uima/src/test/resources/test-descriptors/PersonNameFinder.xml
@@ -1,119 +1,119 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
- <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
- <primitive>true</primitive>
- <annotatorImplementationName>opennlp.uima.namefind.NameFinder</annotatorImplementationName>
- <analysisEngineMetaData>
- <name>Person Name Finder</name>
- <version>1.5.2-incubating</version>
- <vendor>Apache Software Foundation</vendor>
- <configurationParameters>
-
- <configurationParameter>
- <name>opennlp.uima.SentenceType</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
-
- <configurationParameter>
- <name>opennlp.uima.TokenType</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
-
- <configurationParameter>
- <name>opennlp.uima.NameType</name>
- <type>String</type>
- <multiValued>false</multiValued>
- <mandatory>true</mandatory>
- </configurationParameter>
- </configurationParameters>
-
- <configurationParameterSettings>
-
- <nameValuePair>
- <name>opennlp.uima.SentenceType</name>
- <value>
- <string>uima.tcas.DocumentAnnotation</string>
- </value>
- </nameValuePair>
-
- <nameValuePair>
- <name>opennlp.uima.TokenType</name>
- <value>
- <string>opennlp.uima.Token</string>
- </value>
- </nameValuePair>
-
- <nameValuePair>
- <name>opennlp.uima.NameType</name>
- <value>
- <string>opennlp.uima.Person</string>
- </value>
- </nameValuePair>
- </configurationParameterSettings>
-
- <typeSystemDescription>
- <imports>
- <import location="TypeSystem.xml" />
- </imports>
- </typeSystemDescription>
-
- <capabilities>
- <capability>
- <inputs />
- <outputs />
- <languagesSupported>
- <language>en</language>
- </languagesSupported>
- </capability>
- </capabilities>
- </analysisEngineMetaData>
-
- <externalResourceDependencies>
- <externalResourceDependency>
- <key>opennlp.uima.ModelName</key>
- <interfaceName>opennlp.uima.namefind.TokenNameFinderModelResource</interfaceName>
- </externalResourceDependency>
- </externalResourceDependencies>
-
- <resourceManagerConfiguration>
- <externalResources>
- <externalResource>
- <name>PersonModel</name>
- <fileResourceSpecifier>
- <fileUrl>file:test-models/en-ner-person.bin</fileUrl>
- </fileResourceSpecifier>
- <implementationName>opennlp.uima.namefind.TokenNameFinderModelResourceImpl</implementationName>
- </externalResource>
- </externalResources>
- <externalResourceBindings>
- <externalResourceBinding>
- <key>opennlp.uima.ModelName</key>
- <resourceName>PersonModel</resourceName>
- </externalResourceBinding>
- </externalResourceBindings>
- </resourceManagerConfiguration>
-</analysisEngineDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>true</primitive>
+ <annotatorImplementationName>opennlp.uima.namefind.NameFinder</annotatorImplementationName>
+ <analysisEngineMetaData>
+ <name>Person Name Finder</name>
+ <version>1.5.2-incubating</version>
+ <vendor>Apache Software Foundation</vendor>
+ <configurationParameters>
+
+ <configurationParameter>
+ <name>opennlp.uima.SentenceType</name>
+ <type>String</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>opennlp.uima.TokenType</name>
+ <type>String</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>opennlp.uima.NameType</name>
+ <type>String</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+ </configurationParameters>
+
+ <configurationParameterSettings>
+
+ <nameValuePair>
+ <name>opennlp.uima.SentenceType</name>
+ <value>
+ <string>uima.tcas.DocumentAnnotation</string>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>opennlp.uima.TokenType</name>
+ <value>
+ <string>opennlp.uima.Token</string>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>opennlp.uima.NameType</name>
+ <value>
+ <string>opennlp.uima.Person</string>
+ </value>
+ </nameValuePair>
+ </configurationParameterSettings>
+
+ <typeSystemDescription>
+ <imports>
+ <import location="TypeSystem.xml" />
+ </imports>
+ </typeSystemDescription>
+
+ <capabilities>
+ <capability>
+ <inputs />
+ <outputs />
+ <languagesSupported>
+ <language>en</language>
+ </languagesSupported>
+ </capability>
+ </capabilities>
+ </analysisEngineMetaData>
+
+ <externalResourceDependencies>
+ <externalResourceDependency>
+ <key>opennlp.uima.ModelName</key>
+ <interfaceName>opennlp.uima.namefind.TokenNameFinderModelResource</interfaceName>
+ </externalResourceDependency>
+ </externalResourceDependencies>
+
+ <resourceManagerConfiguration>
+ <externalResources>
+ <externalResource>
+ <name>PersonModel</name>
+ <fileResourceSpecifier>
+ <fileUrl>file:test-models/en-ner-person.bin</fileUrl>
+ </fileResourceSpecifier>
+ <implementationName>opennlp.uima.namefind.TokenNameFinderModelResourceImpl</implementationName>
+ </externalResource>
+ </externalResources>
+ <externalResourceBindings>
+ <externalResourceBinding>
+ <key>opennlp.uima.ModelName</key>
+ <resourceName>PersonModel</resourceName>
+ </externalResourceBinding>
+ </externalResourceBindings>
+ </resourceManagerConfiguration>
+</analysisEngineDescription>