Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 1 addition & 26 deletions opennlp-core/opennlp-ml/opennlp-dl-gpu/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,30 +102,5 @@
</plugins>
</build>

<profiles>
<profile>
<id>eval-tests</id>
<properties>
<opennlp.forkCount>0.5C</opennlp.forkCount>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx4g</argLine>
<includes>
<include>**/*Test.java</include>
<include>**/*Eval.java</include>
</includes>
<dependenciesToScan>
<dependency>org.apache.opennlp:opennlp-dl</dependency>
</dependenciesToScan>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
149 changes: 149 additions & 0 deletions opennlp-eval-tests/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
<?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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.opennlp</groupId>
<artifactId>opennlp</artifactId>
<version>3.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>opennlp-eval-tests</artifactId>
<packaging>jar</packaging>
<name>Apache OpenNLP :: Eval Tests</name>

<dependencies>
<!-- Internal dependencies -->
<dependency>
<groupId>org.apache.opennlp</groupId>
<artifactId>opennlp-tools</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.opennlp</groupId>
<artifactId>opennlp-tools</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.opennlp</groupId>
<artifactId>opennlp-dl</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<!-- External dependencies -->
<dependency>
<groupId>com.microsoft.onnxruntime</groupId>
<artifactId>onnxruntime</artifactId>
<version>${onnxruntime.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>test</scope>
</dependency>

<!-- TEST scoped -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx4g</argLine>
<forkCount>${opennlp.forkCount}</forkCount>
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
<includes>
<include>**/*Eval.java</include>
</includes>
<excludedGroups>opennlp.tools.HighMemoryUsage</excludedGroups>
</configuration>
</plugin>

<!-- No javadoc or source jars needed for test-only module -->
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<skipSource>true</skipSource>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<skipIfEmpty>true</skipIfEmpty>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>high-memory-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx20g</argLine>
<forkCount>1</forkCount>
<includes>
<include>**/*Eval.java</include>
</includes>
<excludedGroups combine.self="override"/>
<groups>opennlp.tools.HighMemoryUsage</groups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import opennlp.dl.AbstractDLTest;
import opennlp.dl.InferenceOptions;
import opennlp.dl.doccat.scoring.AverageClassificationScoringStrategy;
import opennlp.tools.eval.AbstractEvalTest;

public class DocumentCategorizerDLEval extends AbstractDLTest {
public class DocumentCategorizerDLEval extends AbstractEvalTest {

private static final Logger logger = LoggerFactory.getLogger(DocumentCategorizerDLEval.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import opennlp.dl.AbstractDLTest;
import opennlp.tools.eval.AbstractEvalTest;
import opennlp.tools.sentdetect.SentenceDetector;
import opennlp.tools.sentdetect.SentenceDetectorME;
import opennlp.tools.util.Span;

public class NameFinderDLEval extends AbstractDLTest {
public class NameFinderDLEval extends AbstractEvalTest {

private static final Logger logger = LoggerFactory.getLogger(NameFinderDLEval.class);
private final SentenceDetector sentenceDetector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import opennlp.dl.AbstractDLTest;
import opennlp.tools.eval.AbstractEvalTest;

public class SentenceVectorsDLEval extends AbstractDLTest {
public class SentenceVectorsDLEval extends AbstractEvalTest {

@Test
public void generateVectorsTest() throws Exception {
Expand Down
41 changes: 6 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -685,45 +685,16 @@
<properties>
<opennlp.forkCount>0.5C</opennlp.forkCount>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx4g</argLine>
<includes>
<include>**/*Test.java</include>
<include>**/*Eval.java</include>
</includes>
<excludedGroups>opennlp.tools.HighMemoryUsage</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>opennlp-eval-tests</module>
</modules>
</profile>

<profile>
<id>high-memory-tests</id>
<properties>
<opennlp.forkCount>1</opennlp.forkCount>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx20g</argLine>
<includes>
<include>**/*Test.java</include>
<include>**/*Eval.java</include>
</includes>
<groups>opennlp.tools.HighMemoryUsage</groups>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>opennlp-eval-tests</module>
</modules>
</profile>
</profiles>

Expand Down