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

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


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

commit 8dceb6bad1fdc6bc97546d4d9525946f0dbd6f51
Author: Sergey Kamov <[email protected]>
AuthorDate: Sun Oct 16 12:06:52 2022 +0400

    WIP.
---
 .../org/apache/nlpcraft/models/NCIntCalcModelSpec.scala   | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git 
a/nlpcraft-stanford/src/test/scala/org/apache/nlpcraft/models/NCIntCalcModelSpec.scala
 
b/nlpcraft-stanford/src/test/scala/org/apache/nlpcraft/models/NCIntCalcModelSpec.scala
index 5eb57bd9..a7a9a250 100644
--- 
a/nlpcraft-stanford/src/test/scala/org/apache/nlpcraft/models/NCIntCalcModelSpec.scala
+++ 
b/nlpcraft-stanford/src/test/scala/org/apache/nlpcraft/models/NCIntCalcModelSpec.scala
@@ -35,6 +35,13 @@ object NCIntCalcModelSpec:
 
         private var mem: Option[Int] = None
 
+        private def nne(e: NCEntity): Int = 
java.lang.Double.parseDouble(e[String]("stanford:number:nne")).intValue
+        private def mkProps(k: String, v: String): Properties =
+            val props = new Properties(); props.setProperty(k, v); props
+        private def calc(x: Int, op: String, y: Int): NCResult =
+            mem = Some(OPS.getOrElse(op, throw new 
IllegalStateException()).apply(x, y))
+            NCResult(mem.get)
+
         override val getPipeline: NCPipeline =
             val stanford = new StanfordCoreNLP(mkProps("annotators", 
"tokenize, ssplit, pos, lemma, ner"))
 
@@ -44,14 +51,6 @@ object NCIntCalcModelSpec:
                 withEntityParser(new NCStanfordNLPEntityParser(stanford, 
Set("number"))). // For numerics.
                 build
 
-        private def nne(e: NCEntity): Int = 
java.lang.Double.parseDouble(e[String]("stanford:number:nne")).intValue
-        private def mkProps(k: String, v: String): Properties =
-            val p = new Properties(); p.setProperty(k, v); p
-
-        private def calc(x: Int, op: String, y: Int): NCResult =
-            mem = Some(OPS.getOrElse(op, throw new 
IllegalStateException()).apply(x, y))
-            NCResult(mem.get)
-
         @NCIntent(
             "intent=calc options={ 'ordered': true }" +
             "  term(x)={# == 'stanford:number'} " +

Reply via email to