Use original Span class and implement Tokenizer interface from OpenNLP
Using maven assembly plugin to include the required classes into a jar
for binary distribution.
This makes it possible to use KorAPTokenizerImpl as tokenizer in OpenNLP
applications.
Change-Id: I627dcdd046334db1b1ae9dd60cf7104fd3a3c518
diff --git a/pom.xml b/pom.xml
index 67ac08b..fda28dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -107,10 +107,20 @@
</configuration>
</plugin>
<plugin>
- <!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>3.1.0</version>
+ <version>3.2.0</version>
+ <executions>
+ <execution>
+ <id>default-jar</id>
+ <!-- use assembly plugin to build the jar -->
+ <phase>none</phase>
+ <configuration>
+ <finalName>unwanted</finalName>
+ <classifier>unwanted</classifier>
+ </configuration>
+ </execution>
+ </executions>
<configuration>
<archive>
<manifest>
@@ -134,10 +144,43 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>3.3.0</version>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/assembly/src-distribution.xml</descriptor>
+ <descriptor>src/assembly/bin-distribution.xml</descriptor>
+ </descriptors>
+ <archive>
+ <manifest>
+ <mainClass>de.ids_mannheim.korap.tokenizer.KorAPTokenizerImpl</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<dependencies>
+ <!-- https://mvnrepository.com/artifact/org.apache.opennlp/opennlp-tools -->
+ <dependency>
+ <groupId>org.apache.opennlp</groupId>
+ <artifactId>opennlp-tools</artifactId>
+ <version>1.9.3</version>
+ </dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>