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

aradzinski pushed a commit to branch scala-2.13
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/scala-2.13 by this push:
     new 4eefad2  WIP
4eefad2 is described below

commit 4eefad2d0388f8b4183fe7f21f67de0a4ed894e5
Author: Aaron Radzinzski <[email protected]>
AuthorDate: Wed May 19 17:03:17 2021 -0700

    WIP
---
 .../nlpcraft/server/nlp/enrichers/stopword/NCStopWordGenerator.scala  | 4 ++--
 .../org/apache/nlpcraft/server/nlp/preproc/NCPreProcessManager.scala  | 2 --
 .../org/apache/nlpcraft/server/nlp/wordnet/NCWordNetManager.scala     | 4 ++--
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/enrichers/stopword/NCStopWordGenerator.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/enrichers/stopword/NCStopWordGenerator.scala
index 96bef39..7fa12f8 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/enrichers/stopword/NCStopWordGenerator.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/enrichers/stopword/NCStopWordGenerator.scala
@@ -203,7 +203,7 @@ object NCStopWordGenerator extends App {
         for (w1 <- NOUN_WORDS; w2 <- NOUN_WORDS2)
             buf += s"$w1 $w2"
 
-        mkGzip(NOUN_WORDS_FILE, stem(buf))
+        mkGzip(NOUN_WORDS_FILE, stem(buf.toSeq))
     }
 
     private def stem(s: String): String =
@@ -342,7 +342,7 @@ object NCStopWordGenerator extends App {
         for (w0 <- DWORDS_PRE; w1 <- DWORDS; w2 <- DWORDS_SUP; w3 <- QWORDS)
             buf += s"$w0 $w1 $w2 $w3"
 
-        mkGzip(FIRST_WORDS_FILE, stem(buf))
+        mkGzip(FIRST_WORDS_FILE, stem(buf.toSeq))
     }
 
     mkFirstWords()
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/preproc/NCPreProcessManager.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/preproc/NCPreProcessManager.scala
index effefbc..bd3b504 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/preproc/NCPreProcessManager.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/preproc/NCPreProcessManager.scala
@@ -21,8 +21,6 @@ import io.opencensus.trace.Span
 import org.apache.nlpcraft.common._
 import org.apache.nlpcraft.server.nlp.spell.NCSpellCheckManager
 
-import scala.collection._
-
 /**
   * Centralized pre-processor for raw text coming from user.
   */
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/wordnet/NCWordNetManager.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/wordnet/NCWordNetManager.scala
index 7392244..0d94c01 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/wordnet/NCWordNetManager.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/nlp/wordnet/NCWordNetManager.scala
@@ -24,7 +24,7 @@ import net.sf.extjwnl.dictionary.{Dictionary, 
MorphologicalProcessor}
 import org.apache.nlpcraft.common._
 import org.apache.nlpcraft.common.NCService
 
-import scala.collection.JavaConverters._
+import scala.jdk.CollectionConverters.CollectionHasAsScala
 
 /**
   * WordNet manager.
@@ -60,7 +60,7 @@ object NCWordNetManager extends NCService {
                     else
                         Seq.empty
                 })
-            ).distinct
+            ).toSeq.distinct
         else
             Seq.empty[String]
     }

Reply via email to