Skip to content

Commit 2795026

Browse files
authored
Upgrade opennlp and codec 10x (#14177)
* Upgrade OpenNLP from 2.3.2 to 2.5.3 (#14130) * Upgrade commons-codec from 1.13.0 to 1.17.2 (#14129)
1 parent 26af3b6 commit 2795026

File tree

11 files changed

+18
-14
lines changed

11 files changed

+18
-14
lines changed

lucene/CHANGES.txt

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ Other
6868

6969
* GITHUB#14116 Use CDL to block threads to avoid flaky tests. (Ao Li)
7070

71+
* GITHUB#14130: Upgrade OpenNLP from 2.3.2 to 2.5.3, which transitively upgrades Slf4j
72+
from 1.7.36 to 2.0.16. (Michael Froh)
73+
7174
======================= Lucene 10.1.0 =======================
7275

7376
API Changes

lucene/analysis.tests/src/test/module-info.java

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
requires org.apache.lucene.analysis.smartcn;
3434
requires org.apache.lucene.analysis.stempel;
3535
requires org.apache.lucene.test_framework;
36+
requires org.apache.commons.codec;
3637

3738
exports org.apache.lucene.analysis.tests;
3839
}

lucene/analysis/opennlp/src/java/org/apache/lucene/analysis/opennlp/tools/NLPPOSTaggerOp.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
package org.apache.lucene.analysis.opennlp.tools;
1919

20-
import java.io.IOException;
2120
import opennlp.tools.postag.POSModel;
21+
import opennlp.tools.postag.POSTagFormat;
2222
import opennlp.tools.postag.POSTagger;
2323
import opennlp.tools.postag.POSTaggerME;
2424

@@ -29,8 +29,8 @@
2929
public class NLPPOSTaggerOp {
3030
private final POSTagger tagger;
3131

32-
public NLPPOSTaggerOp(POSModel model) throws IOException {
33-
tagger = new POSTaggerME(model);
32+
public NLPPOSTaggerOp(POSModel model) {
33+
tagger = new POSTaggerME(model, POSTagFormat.PENN);
3434
}
3535

3636
public synchronized String[] getPOSTags(String[] words) {

lucene/licenses/commons-codec-1.13.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cd6bb9d856db5f61871a94d5801efd0b93b7fcb2

lucene/licenses/opennlp-tools-2.3.2.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4b544138ec079c1c73dc2c1b928506871c4b1b47

lucene/licenses/slf4j-api-1.7.36.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0172931663a09a1fa515567af5fbef00897d3c04

versions.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"main_dependencies" : {
55
"com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.8.1" : "fa9ef26b,refs=4",
66
"com.ibm.icu:icu4j:74.2" : "47ea4550,refs=6",
7-
"commons-codec:commons-codec:1.13" : "e9962aab,refs=4",
7+
"commons-codec:commons-codec:1.17.2" : "e9962aab,refs=4",
88
"io.sgr:s2-geometry-library-java:1.0.0" : "cbc357ab,refs=4",
99
"junit:junit:4.13.1" : "fa9ef26b,refs=4",
1010
"net.sf.jopt-simple:jopt-simple:5.0.4" : "85a1e4c6,refs=2",
1111
"net.sourceforge.nekohtml:nekohtml:1.9.17" : "5ce8cdc6,refs=2",
1212
"org.antlr:antlr4-runtime:4.11.1" : "d9953130,refs=4",
1313
"org.apache.commons:commons-compress:1.19" : "5ce8cdc6,refs=2",
1414
"org.apache.commons:commons-math3:3.6.1" : "85a1e4c6,refs=2",
15-
"org.apache.opennlp:opennlp-tools:2.3.2" : "2f760bab,refs=4",
15+
"org.apache.opennlp:opennlp-tools:2.5.3" : "2f760bab,refs=4",
1616
"org.carrot2:morfologik-fsa:2.1.9" : "79af844b,refs=4",
1717
"org.carrot2:morfologik-polish:2.1.9" : "fe494320,refs=3",
1818
"org.carrot2:morfologik-stemming:2.1.9" : "79af844b,refs=4",
@@ -22,7 +22,7 @@
2222
"org.ow2.asm:asm:9.6" : "d9953130,refs=4",
2323
"org.ow2.asm:asm-commons:9.6" : "d9953130,refs=4",
2424
"org.ow2.asm:asm-tree:9.6" : "d9953130,refs=4",
25-
"org.slf4j:slf4j-api:1.7.36" : "2f760bab,refs=4",
25+
"org.slf4j:slf4j-api:2.0.16" : "2f760bab,refs=4",
2626
"ua.net.nlp:morfologik-ukrainian-search:4.9.1" : "fe494320,refs=3",
2727
"xerces:xercesImpl:2.12.0" : "5ce8cdc6,refs=2"
2828
},
@@ -46,7 +46,7 @@
4646
"com.google.j2objc:j2objc-annotations:1.3" : "6897bc09,refs=38",
4747
"com.google.protobuf:protobuf-java:3.19.2" : "6897bc09,refs=38",
4848
"com.ibm.icu:icu4j:74.2" : "ffa00415,refs=8",
49-
"commons-codec:commons-codec:1.13" : "733734f0,refs=6",
49+
"commons-codec:commons-codec:1.17.2" : "733734f0,refs=6",
5050
"io.github.java-diff-utils:java-diff-utils:4.0" : "6897bc09,refs=38",
5151
"io.sgr:s2-geometry-library-java:1.0.0" : "1d5a4b2b,refs=4",
5252
"javax.inject:javax.inject:1" : "6897bc09,refs=38",
@@ -56,7 +56,7 @@
5656
"org.antlr:antlr4-runtime:4.11.1" : "6fbc4021,refs=5",
5757
"org.apache.commons:commons-compress:1.19" : "6f16ff86,refs=2",
5858
"org.apache.commons:commons-math3:3.6.1" : "152d9f78,refs=3",
59-
"org.apache.opennlp:opennlp-tools:2.3.2" : "b91715f0,refs=6",
59+
"org.apache.opennlp:opennlp-tools:2.5.3" : "b91715f0,refs=6",
6060
"org.assertj:assertj-core:3.21.0" : "b7ba1646,refs=2",
6161
"org.carrot2:morfologik-fsa:2.1.9" : "e077a675,refs=8",
6262
"org.carrot2:morfologik-polish:2.1.9" : "cb00cecf,refs=5",
@@ -73,7 +73,7 @@
7373
"org.ow2.asm:asm-commons:9.6" : "6fbc4021,refs=5",
7474
"org.ow2.asm:asm-tree:9.6" : "6fbc4021,refs=5",
7575
"org.pcollections:pcollections:3.1.4" : "6897bc09,refs=38",
76-
"org.slf4j:slf4j-api:1.7.36" : "b91715f0,refs=6",
76+
"org.slf4j:slf4j-api:2.0.16" : "b91715f0,refs=6",
7777
"ua.net.nlp:morfologik-ukrainian-search:4.9.1" : "cb00cecf,refs=5",
7878
"xerces:xercesImpl:2.12.0" : "6f16ff86,refs=2"
7979
}

versions.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
antlr = "4.11.1"
33
asm = "9.6"
44
assertj = "3.21.0"
5-
commons-codec = "1.13"
5+
commons-codec = "1.17.2"
66
commons-compress = "1.19"
77
ecj = "3.36.0"
88
errorprone = "2.18.0"
@@ -25,7 +25,7 @@ minJava = "21"
2525
morfologik = "2.1.9"
2626
morfologik-ukrainian = "4.9.1"
2727
nekohtml = "1.9.17"
28-
opennlp = "2.3.2"
28+
opennlp = "2.5.3"
2929
procfork = "1.0.6"
3030
randomizedtesting = "2.8.1"
3131
rat = "0.14"

0 commit comments

Comments
 (0)