From fcf73cd0efe8bfb5e1f39798632d66ce1c92b937 Mon Sep 17 00:00:00 2001 From: Richard Zowalla Date: Mon, 20 Nov 2023 08:10:43 +0100 Subject: [PATCH 1/7] Fix Notice file in utils module --- dkpro-jwpl-util/NOTICE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dkpro-jwpl-util/NOTICE.txt b/dkpro-jwpl-util/NOTICE.txt index a2a524b1..09dc6ab7 100644 --- a/dkpro-jwpl-util/NOTICE.txt +++ b/dkpro-jwpl-util/NOTICE.txt @@ -1,6 +1,6 @@ Some classes in this module are taken from third parties: -parser.templates.util.org.dkpro.jwpl.SectionExtractor: +org.dkpro.jwpl.util.templates.parser.SectionExtractor: Derived from the TextConverter class which was published in the Sweble example project provided on http://http://sweble.org From 6767b85352c02d00941c7618b4a49dd812dd8c01 Mon Sep 17 00:00:00 2001 From: Richard Zowalla Date: Mon, 20 Nov 2023 08:12:22 +0100 Subject: [PATCH 2/7] Fix missing NOTICE for swc-engine shade --- dkpro-jwpl-deps/dkpro-jwpl-swc-engine-shade/NOTICE.txt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 dkpro-jwpl-deps/dkpro-jwpl-swc-engine-shade/NOTICE.txt diff --git a/dkpro-jwpl-deps/dkpro-jwpl-swc-engine-shade/NOTICE.txt b/dkpro-jwpl-deps/dkpro-jwpl-swc-engine-shade/NOTICE.txt new file mode 100644 index 00000000..e632bb02 --- /dev/null +++ b/dkpro-jwpl-deps/dkpro-jwpl-swc-engine-shade/NOTICE.txt @@ -0,0 +1,8 @@ +All classes from this module are taken from third parties. + +The classes were published by the Sweble project provided +via https://github.com/sweble/sweble-wikitext +by the Open Source Research Group, University of Erlangen-Nürnberg + +under the Apache License, Version 2.0 +(http://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file From 06d1649ab7113fbdc6f061077c3ee15bcf5ff491 Mon Sep 17 00:00:00 2001 From: Richard Zowalla Date: Mon, 20 Nov 2023 08:22:24 +0100 Subject: [PATCH 3/7] Fix leaking of integration test resources into final jars Remove executable JAR generation --- dkpro-jwpl-api/pom.xml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/dkpro-jwpl-api/pom.xml b/dkpro-jwpl-api/pom.xml index d6f699d1..2db4c5d4 100644 --- a/dkpro-jwpl-api/pom.xml +++ b/dkpro-jwpl-api/pom.xml @@ -182,13 +182,6 @@ **/* - - src/it/resources - true - - **/* - - @@ -270,24 +263,6 @@ - - maven-assembly-plugin - - - create-executable-jar - package - - single - - - false - - jar-with-dependencies - - - - - From 285313d37ba079c0257897ad6a8d82f6fee41111 Mon Sep 17 00:00:00 2001 From: Richard Zowalla Date: Mon, 20 Nov 2023 08:31:42 +0100 Subject: [PATCH 4/7] Remove executable JAR generation for module without a main class --- dkpro-jwpl-util/pom.xml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/dkpro-jwpl-util/pom.xml b/dkpro-jwpl-util/pom.xml index 1f925a67..856c764c 100644 --- a/dkpro-jwpl-util/pom.xml +++ b/dkpro-jwpl-util/pom.xml @@ -86,26 +86,4 @@ - - - - maven-assembly-plugin - - - create-executable-jar - package - - single - - - false - - jar-with-dependencies - - - - - - - \ No newline at end of file From 427274a521da12e1de4f38dd5bb6dbb6b3cc470f Mon Sep 17 00:00:00 2001 From: Richard Zowalla Date: Mon, 20 Nov 2023 08:31:59 +0100 Subject: [PATCH 5/7] Moves config examples of revisionmachine to README --- dkpro-jwpl-revisionmachine/README | 80 ++++++++++++++++--- .../configSamples/diffTool_config_sample.xml | 68 ---------------- .../indexGenerator_config_sample | 10 --- 3 files changed, 68 insertions(+), 90 deletions(-) delete mode 100644 dkpro-jwpl-revisionmachine/src/main/resources/configSamples/diffTool_config_sample.xml delete mode 100644 dkpro-jwpl-revisionmachine/src/main/resources/configSamples/indexGenerator_config_sample diff --git a/dkpro-jwpl-revisionmachine/README b/dkpro-jwpl-revisionmachine/README index 82685989..c5b2bd23 100644 --- a/dkpro-jwpl-revisionmachine/README +++ b/dkpro-jwpl-revisionmachine/README @@ -1,17 +1,73 @@ -Known Issues +# Config Examples -Please also see the issues on Google Code -http://code.google.com/p/jwpl/issues/list +## Diff Tool Config +```xml + + + 12 + 1000 + + + "D:\Programme\Utilities\7-Zip\7z.exe" + + + DISCARD_REVISION + UTF-8 + + SEVENZIP + "D:\simplewiki.7z" + 0 + + + + SQL + "" + 1000000000 + true + + + 5000000 + 1000000 + 1000000 + + + "" + + INFO + + + + false + false + false + + false + "" + + + + + + 0 + 1 + + + -I) -Handling of surrogate characters +``` -There are 4 possible modes of handling UTF8 surrogate characters. -Currently, the only reliable mode is "Discard Revision", in which any revision that contains surrogate characters is discarded. -The other three modes in "org.dkpro.jwpl.revisionmachine.difftool.data.SurrogateModes" have been disabled for now. -The corresponding config-section in the config tool has also been made invisible (org.dkpro.jwpl.revisionmachine.difftool.config.gui.panels.InputPanel) -The disabled parts are marked with TODO-markers +## Index Generator Config -In order to use the other three surrogate modes, which try to handle surrogate characters differently, -the corresponding code has to be checked. Afterwards, the modes can be reenables in the config tool (InputPanel.java) and the SurrogateModes-class \ No newline at end of file +``` +host=localhost +db=wiki_en_20110405_rev +user=student +password=student +output=target +outputDatabase=false +outputDatafile=false +charset=UTF8 +buffer=15000 +maxAllowedPackets=16760832 +``` \ No newline at end of file diff --git a/dkpro-jwpl-revisionmachine/src/main/resources/configSamples/diffTool_config_sample.xml b/dkpro-jwpl-revisionmachine/src/main/resources/configSamples/diffTool_config_sample.xml deleted file mode 100644 index 82ba033b..00000000 --- a/dkpro-jwpl-revisionmachine/src/main/resources/configSamples/diffTool_config_sample.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - 12 - 1000 - - - "D:\Programme\Utilities\7-Zip\7z.exe" - - - DISCARD_REVISION - UTF-8 - - SEVENZIP - "D:\simplewiki.7z" - 0 - - - - SQL - "" - 1000000000 - true - - - 5000000 - 1000000 - 1000000 - - - "" - - INFO - - - - false - false - false - - false - "" - - - - - - 0 - 1 - - - diff --git a/dkpro-jwpl-revisionmachine/src/main/resources/configSamples/indexGenerator_config_sample b/dkpro-jwpl-revisionmachine/src/main/resources/configSamples/indexGenerator_config_sample deleted file mode 100644 index 5f1de815..00000000 --- a/dkpro-jwpl-revisionmachine/src/main/resources/configSamples/indexGenerator_config_sample +++ /dev/null @@ -1,10 +0,0 @@ -host=localhost -db=wiki_en_20110405_rev -user=student -password=student -output=target -outputDatabase=false -outputDatafile=false -charset=UTF8 -buffer=15000 -maxAllowedPackets=16760832 \ No newline at end of file From 3dee429315a90c0ec87da9943a82c22fd5c09459 Mon Sep 17 00:00:00 2001 From: Richard Zowalla Date: Mon, 20 Nov 2023 08:38:31 +0100 Subject: [PATCH 6/7] Move "org.dkpro.jwpl.util" to "org.dkpro.jwpl.api.util" --- .../src/it/java/org/dkpro/jwpl/api/PerformanceTest.java | 2 +- .../src/main/java/org/dkpro/jwpl/api/CategoryGraph.java | 6 +++--- dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Page.java | 2 +- .../src/main/java/org/dkpro/jwpl/api/PageQueryIterable.java | 4 ++-- .../src/main/java/org/dkpro/jwpl/api/Wikipedia.java | 2 +- .../src/main/java/org/dkpro/jwpl/api/WikipediaInfo.java | 2 +- .../java/org/dkpro/jwpl/{ => api}/util/ApiUtilities.java | 2 +- .../java/org/dkpro/jwpl/{ => api}/util/CommonUtilities.java | 2 +- .../java/org/dkpro/jwpl/{ => api}/util/DbUtilities.java | 2 +- .../java/org/dkpro/jwpl/{ => api}/util/GraphUtilities.java | 2 +- .../org/dkpro/jwpl/{ => api}/util/HibernateUtilities.java | 2 +- .../src/main/java/org/dkpro/jwpl/{ => api}/util/OS.java | 2 +- .../java/org/dkpro/jwpl/{ => api}/util/StringUtils.java | 2 +- .../org/dkpro/jwpl/{ => api}/util/UnmodifiableArraySet.java | 2 +- .../{ => api}/util/distance/LevenshteinStringDistance.java | 2 +- .../dkpro/jwpl/{ => api}/util/distance/StringDistance.java | 2 +- .../generator/simple/WikipediaTemplateInfoGenerator.java | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) rename dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/{ => api}/util/ApiUtilities.java (98%) rename dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/{ => api}/util/CommonUtilities.java (98%) rename dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/{ => api}/util/DbUtilities.java (98%) rename dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/{ => api}/util/GraphUtilities.java (99%) rename dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/{ => api}/util/HibernateUtilities.java (98%) rename dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/{ => api}/util/OS.java (98%) rename dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/{ => api}/util/StringUtils.java (99%) rename dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/{ => api}/util/UnmodifiableArraySet.java (99%) rename dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/{ => api}/util/distance/LevenshteinStringDistance.java (98%) rename dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/{ => api}/util/distance/StringDistance.java (95%) diff --git a/dkpro-jwpl-api/src/it/java/org/dkpro/jwpl/api/PerformanceTest.java b/dkpro-jwpl-api/src/it/java/org/dkpro/jwpl/api/PerformanceTest.java index 57fa366d..375ab277 100644 --- a/dkpro-jwpl-api/src/it/java/org/dkpro/jwpl/api/PerformanceTest.java +++ b/dkpro-jwpl-api/src/it/java/org/dkpro/jwpl/api/PerformanceTest.java @@ -26,7 +26,7 @@ import java.util.Set; import org.dkpro.jwpl.api.exception.WikiApiException; -import org.dkpro.jwpl.util.GraphUtilities; +import org.dkpro.jwpl.api.util.GraphUtilities; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/CategoryGraph.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/CategoryGraph.java index f6029032..e0d479fc 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/CategoryGraph.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/CategoryGraph.java @@ -40,9 +40,9 @@ import org.dkpro.jwpl.api.exception.WikiPageNotFoundException; import org.dkpro.jwpl.api.exception.WikiTitleParsingException; import org.dkpro.jwpl.api.util.GraphSerialization; -import org.dkpro.jwpl.util.ApiUtilities; -import org.dkpro.jwpl.util.CommonUtilities; -import org.dkpro.jwpl.util.OS; +import org.dkpro.jwpl.api.util.ApiUtilities; +import org.dkpro.jwpl.api.util.CommonUtilities; +import org.dkpro.jwpl.api.util.OS; import org.jgrapht.GraphPath; import org.jgrapht.alg.connectivity.ConnectivityInspector; import org.jgrapht.alg.shortestpath.DijkstraShortestPath; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Page.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Page.java index dada990d..8d052010 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Page.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Page.java @@ -25,7 +25,7 @@ import org.dkpro.jwpl.api.exception.WikiTitleParsingException; import org.dkpro.jwpl.api.hibernate.PageDAO; import org.dkpro.jwpl.api.sweble.PlainTextConverter; -import org.dkpro.jwpl.util.UnmodifiableArraySet; +import org.dkpro.jwpl.api.util.UnmodifiableArraySet; import org.hibernate.LockOptions; import org.hibernate.Session; import org.hibernate.type.StandardBasicTypes; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/PageQueryIterable.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/PageQueryIterable.java index dc07d03f..45989dca 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/PageQueryIterable.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/PageQueryIterable.java @@ -24,8 +24,8 @@ import org.dkpro.jwpl.api.exception.WikiApiException; import org.dkpro.jwpl.api.exception.WikiPageNotFoundException; -import org.dkpro.jwpl.util.ApiUtilities; -import org.dkpro.jwpl.util.StringUtils; +import org.dkpro.jwpl.api.util.ApiUtilities; +import org.dkpro.jwpl.api.util.StringUtils; import org.hibernate.Session; import org.hibernate.query.Query; import org.slf4j.Logger; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Wikipedia.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Wikipedia.java index 2eae0d96..297f3a39 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Wikipedia.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Wikipedia.java @@ -34,7 +34,7 @@ import org.dkpro.jwpl.api.exception.WikiPageNotFoundException; import org.dkpro.jwpl.api.exception.WikiTitleParsingException; import org.dkpro.jwpl.api.hibernate.WikiHibernateUtil; -import org.dkpro.jwpl.util.distance.LevenshteinStringDistance; +import org.dkpro.jwpl.api.util.distance.LevenshteinStringDistance; import org.hibernate.Session; import org.hibernate.query.NativeQuery; import org.hibernate.type.StandardBasicTypes; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/WikipediaInfo.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/WikipediaInfo.java index 407eec43..3481890d 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/WikipediaInfo.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/WikipediaInfo.java @@ -28,7 +28,7 @@ import org.dkpro.jwpl.api.exception.WikiApiException; import org.dkpro.jwpl.api.exception.WikiPageNotFoundException; -import org.dkpro.jwpl.util.ApiUtilities; +import org.dkpro.jwpl.api.util.ApiUtilities; import org.hibernate.Session; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/ApiUtilities.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/ApiUtilities.java similarity index 98% rename from dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/ApiUtilities.java rename to dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/ApiUtilities.java index b26ce71b..d2c23e30 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/ApiUtilities.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/ApiUtilities.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dkpro.jwpl.util; +package org.dkpro.jwpl.api.util; import java.lang.invoke.MethodHandles; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/CommonUtilities.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/CommonUtilities.java similarity index 98% rename from dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/CommonUtilities.java rename to dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/CommonUtilities.java index e2420882..391a39a7 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/CommonUtilities.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/CommonUtilities.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dkpro.jwpl.util; +package org.dkpro.jwpl.api.util; import java.util.Arrays; import java.util.Map; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/DbUtilities.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/DbUtilities.java similarity index 98% rename from dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/DbUtilities.java rename to dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/DbUtilities.java index 2e273bd4..6cd3ffe7 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/DbUtilities.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/DbUtilities.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dkpro.jwpl.util; +package org.dkpro.jwpl.api.util; import java.lang.invoke.MethodHandles; import java.sql.Connection; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/GraphUtilities.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/GraphUtilities.java similarity index 99% rename from dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/GraphUtilities.java rename to dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/GraphUtilities.java index a87ce74f..c66ea71a 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/GraphUtilities.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/GraphUtilities.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dkpro.jwpl.util; +package org.dkpro.jwpl.api.util; import java.lang.invoke.MethodHandles; import java.util.HashSet; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/HibernateUtilities.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/HibernateUtilities.java similarity index 98% rename from dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/HibernateUtilities.java rename to dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/HibernateUtilities.java index f4c62d01..254a4610 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/HibernateUtilities.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/HibernateUtilities.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dkpro.jwpl.util; +package org.dkpro.jwpl.api.util; import java.util.HashMap; import java.util.Map; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/OS.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/OS.java similarity index 98% rename from dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/OS.java rename to dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/OS.java index 9b4c9e32..b0aeb68e 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/OS.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/OS.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dkpro.jwpl.util; +package org.dkpro.jwpl.api.util; public class OS { diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/StringUtils.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/StringUtils.java similarity index 99% rename from dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/StringUtils.java rename to dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/StringUtils.java index e2d16f7e..b14cee97 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/StringUtils.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/StringUtils.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dkpro.jwpl.util; +package org.dkpro.jwpl.api.util; import java.util.Collection; import java.util.Iterator; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/UnmodifiableArraySet.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/UnmodifiableArraySet.java similarity index 99% rename from dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/UnmodifiableArraySet.java rename to dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/UnmodifiableArraySet.java index b25200ad..809c67a5 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/UnmodifiableArraySet.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/UnmodifiableArraySet.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dkpro.jwpl.util; +package org.dkpro.jwpl.api.util; import java.util.Arrays; import java.util.Collection; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/distance/LevenshteinStringDistance.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/distance/LevenshteinStringDistance.java similarity index 98% rename from dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/distance/LevenshteinStringDistance.java rename to dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/distance/LevenshteinStringDistance.java index be32e77e..c4b2164a 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/distance/LevenshteinStringDistance.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/distance/LevenshteinStringDistance.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dkpro.jwpl.util.distance; +package org.dkpro.jwpl.api.util.distance; public class LevenshteinStringDistance implements StringDistance diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/distance/StringDistance.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/distance/StringDistance.java similarity index 95% rename from dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/distance/StringDistance.java rename to dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/distance/StringDistance.java index c5cf6cb8..b02ce5c4 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/util/distance/StringDistance.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/util/distance/StringDistance.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dkpro.jwpl.util.distance; +package org.dkpro.jwpl.api.util.distance; public interface StringDistance { diff --git a/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java b/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java index d1551cd5..57af443b 100644 --- a/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java +++ b/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java @@ -40,7 +40,7 @@ import org.dkpro.jwpl.revisionmachine.api.Revision; import org.dkpro.jwpl.revisionmachine.api.RevisionApi; import org.dkpro.jwpl.revisionmachine.api.RevisionIterator; -import org.dkpro.jwpl.util.StringUtils; +import org.dkpro.jwpl.api.util.StringUtils; import org.dkpro.jwpl.util.templates.WikipediaTemplateInfo; import org.dkpro.jwpl.util.templates.generator.GeneratorConstants; import org.slf4j.Logger; From 107fba0bde9428d8bdd2bef63d266c87c6a2384d Mon Sep 17 00:00:00 2001 From: Richard Zowalla Date: Mon, 20 Nov 2023 08:48:34 +0100 Subject: [PATCH 7/7] Adds an additional relocation to avoid package conflicts and fixes import order afterwards --- .../java/org/dkpro/jwpl/api/CategoryGraph.java | 2 +- .../src/main/java/org/dkpro/jwpl/api/Page.java | 8 ++++---- .../java/org/dkpro/jwpl/api/WikiConstants.java | 6 +++--- .../main/java/org/dkpro/jwpl/api/Wikipedia.java | 2 +- .../dkpro/jwpl/api/sweble/PlainTextConverter.java | 6 +++--- .../jwpl/api/sweble/TemplateNameExtractor.java | 4 ++-- .../java/org/dkpro/jwpl/api/WikiConfigTest.java | 2 +- .../dkpro-jwpl-swc-engine-shade/pom.xml | 5 ++++- .../db/wikiapi_simple_20090119_stripped.script | 2 +- .../simple/WikipediaTemplateInfoGenerator.java | 2 +- .../jwpl/util/templates/parser/ParseUtils.java | 14 +++++++------- .../util/templates/parser/SectionExtractor.java | 6 +++--- 12 files changed, 31 insertions(+), 28 deletions(-) diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/CategoryGraph.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/CategoryGraph.java index e0d479fc..12cd4ced 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/CategoryGraph.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/CategoryGraph.java @@ -39,9 +39,9 @@ import org.dkpro.jwpl.api.exception.WikiApiException; import org.dkpro.jwpl.api.exception.WikiPageNotFoundException; import org.dkpro.jwpl.api.exception.WikiTitleParsingException; -import org.dkpro.jwpl.api.util.GraphSerialization; import org.dkpro.jwpl.api.util.ApiUtilities; import org.dkpro.jwpl.api.util.CommonUtilities; +import org.dkpro.jwpl.api.util.GraphSerialization; import org.dkpro.jwpl.api.util.OS; import org.jgrapht.GraphPath; import org.jgrapht.alg.connectivity.ConnectivityInspector; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Page.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Page.java index 8d052010..a4cccbf9 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Page.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Page.java @@ -26,13 +26,13 @@ import org.dkpro.jwpl.api.hibernate.PageDAO; import org.dkpro.jwpl.api.sweble.PlainTextConverter; import org.dkpro.jwpl.api.util.UnmodifiableArraySet; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.PageId; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.PageTitle; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.WtEngineImpl; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.nodes.EngProcessedPage; import org.hibernate.LockOptions; import org.hibernate.Session; import org.hibernate.type.StandardBasicTypes; -import org.sweble.wikitext.engine.PageId; -import org.sweble.wikitext.engine.PageTitle; -import org.sweble.wikitext.engine.WtEngineImpl; -import org.sweble.wikitext.engine.nodes.EngProcessedPage; import de.fau.cs.osr.ptk.common.AstVisitor; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/WikiConstants.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/WikiConstants.java index b343772f..457b25d7 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/WikiConstants.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/WikiConstants.java @@ -22,9 +22,9 @@ import javax.xml.parsers.ParserConfigurationException; -import org.sweble.wikitext.engine.config.WikiConfig; -import org.sweble.wikitext.engine.utils.DefaultConfigEnWp; -import org.sweble.wikitext.engine.utils.LanguageConfigGenerator; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.config.WikiConfig; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.utils.DefaultConfigEnWp; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.utils.LanguageConfigGenerator; import org.xml.sax.SAXException; import com.neovisionaries.i18n.LanguageCode; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Wikipedia.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Wikipedia.java index 297f3a39..6e73910d 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Wikipedia.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/Wikipedia.java @@ -35,12 +35,12 @@ import org.dkpro.jwpl.api.exception.WikiTitleParsingException; import org.dkpro.jwpl.api.hibernate.WikiHibernateUtil; import org.dkpro.jwpl.api.util.distance.LevenshteinStringDistance; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.config.WikiConfig; import org.hibernate.Session; import org.hibernate.query.NativeQuery; import org.hibernate.type.StandardBasicTypes; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sweble.wikitext.engine.config.WikiConfig; /** * Provides access to Wikipedia articles and categories. diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/sweble/PlainTextConverter.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/sweble/PlainTextConverter.java index 7b810805..7e59c7d2 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/sweble/PlainTextConverter.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/sweble/PlainTextConverter.java @@ -23,11 +23,11 @@ import java.util.List; import java.util.regex.Pattern; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.PageTitle; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.config.WikiConfig; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.utils.DefaultConfigEnWp; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sweble.wikitext.engine.PageTitle; -import org.sweble.wikitext.engine.config.WikiConfig; -import org.sweble.wikitext.engine.utils.DefaultConfigEnWp; import org.sweble.wikitext.parser.nodes.WtBold; import org.sweble.wikitext.parser.nodes.WtExternalLink; import org.sweble.wikitext.parser.nodes.WtHorizontalRule; diff --git a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/sweble/TemplateNameExtractor.java b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/sweble/TemplateNameExtractor.java index 2f4e1503..06aa1425 100644 --- a/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/sweble/TemplateNameExtractor.java +++ b/dkpro-jwpl-api/src/main/java/org/dkpro/jwpl/api/sweble/TemplateNameExtractor.java @@ -29,8 +29,8 @@ import java.util.LinkedList; import java.util.List; -import org.sweble.wikitext.engine.config.WikiConfig; -import org.sweble.wikitext.engine.utils.DefaultConfigEnWp; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.config.WikiConfig; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.utils.DefaultConfigEnWp; import org.sweble.wikitext.parser.nodes.WtNode; import org.sweble.wikitext.parser.nodes.WtTemplate; diff --git a/dkpro-jwpl-api/src/test/java/org/dkpro/jwpl/api/WikiConfigTest.java b/dkpro-jwpl-api/src/test/java/org/dkpro/jwpl/api/WikiConfigTest.java index 6e5a9e76..e38eafc5 100644 --- a/dkpro-jwpl-api/src/test/java/org/dkpro/jwpl/api/WikiConfigTest.java +++ b/dkpro-jwpl-api/src/test/java/org/dkpro/jwpl/api/WikiConfigTest.java @@ -19,8 +19,8 @@ import static org.junit.jupiter.api.Assertions.assertSame; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.config.WikiConfig; import org.junit.jupiter.api.Test; -import org.sweble.wikitext.engine.config.WikiConfig; public class WikiConfigTest { diff --git a/dkpro-jwpl-deps/dkpro-jwpl-swc-engine-shade/pom.xml b/dkpro-jwpl-deps/dkpro-jwpl-swc-engine-shade/pom.xml index b84c6264..3c69328c 100644 --- a/dkpro-jwpl-deps/dkpro-jwpl-swc-engine-shade/pom.xml +++ b/dkpro-jwpl-deps/dkpro-jwpl-swc-engine-shade/pom.xml @@ -124,6 +124,10 @@ javax.xml.bind jakarta.xml.bind + + org.sweble.wikitext.engine + org.dkpro.jwpl.shade.org.sweble.wikitext.engine + @@ -146,7 +150,6 @@ --> org.codehaus.mojo build-helper-maven-plugin - 3.4.0 workaround-makeItVisibleOnIntellij diff --git a/dkpro-jwpl-revisionmachine/src/test/resources/db/wikiapi_simple_20090119_stripped.script b/dkpro-jwpl-revisionmachine/src/test/resources/db/wikiapi_simple_20090119_stripped.script index 4b1d0f6a..ba989eb7 100644 --- a/dkpro-jwpl-revisionmachine/src/test/resources/db/wikiapi_simple_20090119_stripped.script +++ b/dkpro-jwpl-revisionmachine/src/test/resources/db/wikiapi_simple_20090119_stripped.script @@ -29,7 +29,7 @@ SET FILES NIO TRUE SET FILES NIO SIZE 256 SET FILES LOG TRUE SET FILES LOG SIZE 200 -SET FILES CHECK 2802 +SET FILES CHECK 2888 SET DATABASE COLLATION "German" NO PAD CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e' CREATE SCHEMA PUBLIC AUTHORIZATION DBA diff --git a/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java b/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java index 57af443b..7133a422 100644 --- a/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java +++ b/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java @@ -32,6 +32,7 @@ import org.dkpro.jwpl.api.Wikipedia; import org.dkpro.jwpl.api.exception.WikiApiException; import org.dkpro.jwpl.api.exception.WikiInitializationException; +import org.dkpro.jwpl.api.util.StringUtils; import org.dkpro.jwpl.parser.ParsedPage; import org.dkpro.jwpl.parser.Template; import org.dkpro.jwpl.parser.mediawiki.MediaWikiParser; @@ -40,7 +41,6 @@ import org.dkpro.jwpl.revisionmachine.api.Revision; import org.dkpro.jwpl.revisionmachine.api.RevisionApi; import org.dkpro.jwpl.revisionmachine.api.RevisionIterator; -import org.dkpro.jwpl.api.util.StringUtils; import org.dkpro.jwpl.util.templates.WikipediaTemplateInfo; import org.dkpro.jwpl.util.templates.generator.GeneratorConstants; import org.slf4j.Logger; diff --git a/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/parser/ParseUtils.java b/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/parser/ParseUtils.java index d751cde2..cfcb795d 100644 --- a/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/parser/ParseUtils.java +++ b/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/parser/ParseUtils.java @@ -22,14 +22,14 @@ import java.util.regex.Pattern; import org.dkpro.jwpl.api.sweble.TemplateNameExtractor; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.EngineException; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.PageId; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.PageTitle; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.WtEngineImpl; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.config.WikiConfig; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.nodes.EngProcessedPage; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.utils.DefaultConfigEnWp; import org.dkpro.jwpl.util.templates.parser.SectionExtractor.ExtractedSection; -import org.sweble.wikitext.engine.EngineException; -import org.sweble.wikitext.engine.PageId; -import org.sweble.wikitext.engine.PageTitle; -import org.sweble.wikitext.engine.WtEngineImpl; -import org.sweble.wikitext.engine.config.WikiConfig; -import org.sweble.wikitext.engine.nodes.EngProcessedPage; -import org.sweble.wikitext.engine.utils.DefaultConfigEnWp; import org.sweble.wikitext.parser.parser.LinkTargetException; import de.fau.cs.osr.ptk.common.AstVisitor; diff --git a/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/parser/SectionExtractor.java b/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/parser/SectionExtractor.java index de52e01a..cd659e8c 100644 --- a/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/parser/SectionExtractor.java +++ b/dkpro-jwpl-util/src/main/java/org/dkpro/jwpl/util/templates/parser/SectionExtractor.java @@ -44,9 +44,9 @@ import java.util.ArrayList; import java.util.List; -import org.sweble.wikitext.engine.PageTitle; -import org.sweble.wikitext.engine.config.WikiConfig; -import org.sweble.wikitext.engine.utils.DefaultConfigEnWp; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.PageTitle; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.config.WikiConfig; +import org.dkpro.jwpl.shade.org.sweble.wikitext.engine.utils.DefaultConfigEnWp; import org.sweble.wikitext.parser.nodes.WtBold; import org.sweble.wikitext.parser.nodes.WtDefinitionList; import org.sweble.wikitext.parser.nodes.WtDefinitionListDef;