You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by se...@apache.org on 2022/06/20 10:32:51 UTC

[incubator-nlpcraft] branch scala updated: Scala initial minor fixes.

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

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


The following commit(s) were added to refs/heads/scala by this push:
     new 21e41202 Scala initial minor fixes.
21e41202 is described below

commit 21e412027d5aef1238ea6a2d9f3d5863330f70c0
Author: Sergey Kamov <sk...@gmail.com>
AuthorDate: Mon Jun 20 13:32:43 2022 +0300

    Scala initial minor fixes.
---
 .../main/scala/org/apache/nlpcraft/internal/impl/NCModelScanner.scala  | 2 +-
 .../apache/nlpcraft/nlp/token/enricher/NCEnBracketsTokenEnricher.scala | 2 +-
 .../nlpcraft/nlp/token/enricher/NCEnDictionaryTokenEnricher.scala      | 2 +-
 .../apache/nlpcraft/nlp/token/enricher/NCEnQuotesTokenEnricher.scala   | 2 +-
 .../nlpcraft/nlp/token/enricher/NCEnStopWordsTokenEnricher.scala       | 2 +-
 .../nlpcraft/nlp/token/enricher/NCEnSwearWordsTokenEnricher.scala      | 3 ++-
 6 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/impl/NCModelScanner.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/impl/NCModelScanner.scala
index d1eb49ca..1ceae1e8 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/impl/NCModelScanner.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/impl/NCModelScanner.scala
@@ -510,7 +510,7 @@ object NCModelScanner extends LazyLogging:
 
         def processClassAnnotations(cls: Class[_]): Unit =
             if cls != null && processed.add(cls) then
-                for (ann <- cls.getAnnotationsByType(CLS_INTENT).reverse; intent <- NCIDLCompiler.compile(ann.value, cfg, class2Str(cls)))
+                for (ann <- cls.getAnnotationsByType(CLS_INTENT); intent <- NCIDLCompiler.compile(ann.value, cfg, class2Str(cls)))
                     addDecl(intent)
 
                 processClassAnnotations(cls.getSuperclass)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnBracketsTokenEnricher.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnBracketsTokenEnricher.scala
index 4a5b54ce..b55d1f6d 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnBracketsTokenEnricher.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnBracketsTokenEnricher.scala
@@ -24,7 +24,7 @@ import java.io.*
 import scala.collection.mutable
 
 /**
-  *
+  * TODO: enriches with <code>brackets</code> property.
   */
 class NCEnBracketsTokenEnricher extends NCTokenEnricher with LazyLogging:
     override def enrich(req: NCRequest, cfg: NCModelConfig, toks: List[NCToken]): Unit =
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnDictionaryTokenEnricher.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnDictionaryTokenEnricher.scala
index 221606bb..ce649ffc 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnDictionaryTokenEnricher.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnDictionaryTokenEnricher.scala
@@ -21,7 +21,7 @@ import org.apache.nlpcraft.*
 import org.apache.nlpcraft.internal.util.NCUtils
 
 /**
-  *
+  * TODO: enriches with <code>dict</code> property.
   */
 class NCEnDictionaryTokenEnricher extends NCTokenEnricher:
     private var dict: Set[String] = _
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnQuotesTokenEnricher.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnQuotesTokenEnricher.scala
index 9ea12182..94117620 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnQuotesTokenEnricher.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnQuotesTokenEnricher.scala
@@ -21,7 +21,7 @@ import com.typesafe.scalalogging.LazyLogging
 import org.apache.nlpcraft.*
 
 /**
-  *
+  * TODO: enriches with <code>quoted</code> property.
   */
 class NCEnQuotesTokenEnricher extends NCTokenEnricher with LazyLogging:
     private final val Q_POS: Set[String] = Set("``", "''")
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnStopWordsTokenEnricher.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnStopWordsTokenEnricher.scala
index 4955e99c..b184f807 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnStopWordsTokenEnricher.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnStopWordsTokenEnricher.scala
@@ -29,7 +29,7 @@ import scala.collection.*
 import scala.concurrent.ExecutionContext
 
 /**
-  *
+  * TODO: enriches with <code>stopword</code> property.
   */
 object NCEnStopWordsTokenEnricher:
     // Condition types.
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnSwearWordsTokenEnricher.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnSwearWordsTokenEnricher.scala
index 4df1de0c..6882048f 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnSwearWordsTokenEnricher.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/NCEnSwearWordsTokenEnricher.scala
@@ -26,7 +26,8 @@ import java.io.*
 import java.util.Objects
 
 /**
-  * 
+  * TODO: enriches with <code>swear</code> property.
+  *
   * @param res
   */
 class NCEnSwearWordsTokenEnricher(res: String) extends NCTokenEnricher with LazyLogging: