This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-520
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-520 by this push:
new 077df702 Test recovered.
077df702 is described below
commit 077df7021cc0e01e0676dbf2dda5fa6c4f635d38
Author: Sergey Kamov <[email protected]>
AuthorDate: Sun Jan 8 17:42:26 2023 +0400
Test recovered.
---
.../nlp/parsers/NCSemanticEntityParserSpec.scala | 41 +++++++++-------------
1 file changed, 16 insertions(+), 25 deletions(-)
diff --git
a/nlpcraft/src/test/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticEntityParserSpec.scala
b/nlpcraft/src/test/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticEntityParserSpec.scala
index 8bdabdc3..e813a45f 100644
---
a/nlpcraft/src/test/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticEntityParserSpec.scala
+++
b/nlpcraft/src/test/scala/org/apache/nlpcraft/nlp/parsers/NCSemanticEntityParserSpec.scala
@@ -21,7 +21,6 @@ import org.apache.nlpcraft.*
import annotations.*
import nlp.parsers.*
import nlp.util.*
-import org.apache.nlpcraft.nlp.stemmer.NCEnStemmer
import org.scalatest.funsuite.AnyFunSuite
import scala.collection.mutable
@@ -49,9 +48,7 @@ class NCSemanticEntityParserSpec extends AnyFunSuite:
// Regex.
NCSemanticTestElement("t7", synonyms = Set("x //[a-d]+//")),
// Empty synonyms.
- NCSemanticTestElement("t8", synonyms = Set("{A|_} {B|_}")),
-
- NCSemanticTestElement("t9", synonyms = Set("go"))
+ NCSemanticTestElement("t8", synonyms = Set("{A|_} {B|_}"))
)
)
@@ -110,25 +107,19 @@ class NCSemanticEntityParserSpec extends AnyFunSuite:
*
*/
test("test") {
-// check("t1", "t1")
-// check("the t1", "t1")
-// check("t2", "t2")
-// check("the t2", "t2")
-// check("t3 t3", "t3")
-// check("t3 the t3", "t3") // With stopword inside.
-// check("value4", "t4", value = "value4".?)
-// check("value the 5", "t5", value = "value5".?) // With stopword
inside.
-// check("t6", "t6", elemData = Map("testKey" -> "testValue").?)
-// check("the x abc x abe", "t7") // `x abc` should be matched, `x abe`
shouldn't.
-// check("A B", "t8")
-// check("A", "t8")
-// check("B", "t8")
-//
-// checkMultiple("t1 the x abc the x the abc", "t1", "t7", "t7")
- val s = new NCEnStemmer
-
- println(s.stem("argue"))
- println(s.stem("argued"))
- println(s.stem("argues"))
- println(s.stem("arguing"))
+ check("t1", "t1")
+ check("the t1", "t1")
+ check("t2", "t2")
+ check("the t2", "t2")
+ check("t3 t3", "t3")
+ check("t3 the t3", "t3") // With stopword inside.
+ check("value4", "t4", value = "value4".?)
+ check("value the 5", "t5", value = "value5".?) // With stopword inside.
+ check("t6", "t6", elemData = Map("testKey" -> "testValue").?)
+ check("the x abc x abe", "t7") // `x abc` should be matched, `x abe`
shouldn't.
+ check("A B", "t8")
+ check("A", "t8")
+ check("B", "t8")
+
+ checkMultiple("t1 the x abc the x the abc", "t1", "t7", "t7")
}
\ No newline at end of file