This is an automated email from the ASF dual-hosted git repository.

sergeykamov pushed a commit to branch NLPCRAFT-471
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-471 by this push:
     new 3de230f  WIP.
3de230f is described below

commit 3de230f62abbb055302218997b036c084d0214cd
Author: Sergey Kamov <[email protected]>
AuthorDate: Tue Dec 28 20:25:03 2021 +0300

    WIP.
---
 .../nlp/entity/parser/opennlp/NCOpenNlpEntityParser.java      | 11 +++--------
 .../nlpcraft/internal/nlp/benchmark/NCBenchmarkAdapter.java   |  2 +-
 .../nlp/entity/parser/opennlp/NCOpenNlpEntityParserSpec.scala |  2 +-
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/nlp/entity/parser/opennlp/NCOpenNlpEntityParser.java
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/nlp/entity/parser/opennlp/NCOpenNlpEntityParser.java
index dece633..3425af8 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/nlp/entity/parser/opennlp/NCOpenNlpEntityParser.java
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/nlp/entity/parser/opennlp/NCOpenNlpEntityParser.java
@@ -17,21 +17,16 @@
 
 package org.apache.nlpcraft.internal.nlp.entity.parser.opennlp;
 
-import org.apache.nlpcraft.NCEntity;
-import org.apache.nlpcraft.NCEntityParser;
-import org.apache.nlpcraft.NCModelConfig;
-import org.apache.nlpcraft.NCRequest;
-import org.apache.nlpcraft.NCToken;
+import org.apache.nlpcraft.*;
 import 
org.apache.nlpcraft.internal.nlp.entity.parser.opennlp.impl.NCOpenNlpEntityParserImpl;
 
 import java.io.File;
-import java.util.List;
-import java.util.Objects;
+import java.util.*;
 
 /**
  * Generates entities with
  *  - ID `opennlp:{name}` where 'name' is element model name (from trained 
file or resource) and
- *  - one property opennlp:{name}:probability, where probability value is 
double between 0 and 1.
+ *  - one property `opennlp:{name}:probability`, where probability is double 
value between 0 and 1.
  *
  * <p>
  * Models can be download here: http://opennlp.sourceforge.net/models-1.5/ or 
trained.
diff --git 
a/nlpcraft/src/test/java/org/apache/nlpcraft/internal/nlp/benchmark/NCBenchmarkAdapter.java
 
b/nlpcraft/src/test/java/org/apache/nlpcraft/internal/nlp/benchmark/NCBenchmarkAdapter.java
index 3bf2f63..c81a80d 100644
--- 
a/nlpcraft/src/test/java/org/apache/nlpcraft/internal/nlp/benchmark/NCBenchmarkAdapter.java
+++ 
b/nlpcraft/src/test/java/org/apache/nlpcraft/internal/nlp/benchmark/NCBenchmarkAdapter.java
@@ -40,7 +40,7 @@ import java.util.concurrent.TimeUnit;
 public class NCBenchmarkAdapter {
     @State(Scope.Thread)
     public static class NCBenchmarkAdapterState {
-        public NCRequest request = NCTestRequest.apply(
+        public final NCRequest request = NCTestRequest.apply(
             "I am developing an integrated Benchmarking into an application, I 
want to use JMH as my framework."
         );
     }
diff --git 
a/nlpcraft/src/test/java/org/apache/nlpcraft/internal/nlp/entity/parser/opennlp/NCOpenNlpEntityParserSpec.scala
 
b/nlpcraft/src/test/java/org/apache/nlpcraft/internal/nlp/entity/parser/opennlp/NCOpenNlpEntityParserSpec.scala
index 1737b51..0192085 100644
--- 
a/nlpcraft/src/test/java/org/apache/nlpcraft/internal/nlp/entity/parser/opennlp/NCOpenNlpEntityParserSpec.scala
+++ 
b/nlpcraft/src/test/java/org/apache/nlpcraft/internal/nlp/entity/parser/opennlp/NCOpenNlpEntityParserSpec.scala
@@ -64,7 +64,7 @@ class NCOpenNlpEntityParserSpec:
         val res = resSeq.head
 
         NCTestUtils.printEntities(txt, res)
-        
require(res.exists(_.getOpt(s"opennlp:${expected}:probability").isPresent))
+        
require(res.exists(_.getOpt(s"opennlp:$expected:probability").isPresent))
 
     @Test
     def test(): Unit =

Reply via email to