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 61b0b6e8 WIP.
61b0b6e8 is described below

commit 61b0b6e8c37962ee140a4bd74528e63e10bf311c
Author: Sergey Kamov <[email protected]>
AuthorDate: Wed Dec 14 15:04:40 2022 +0400

    WIP.
---
 .../nlpcraft/nlp/enrichers/NCEnStopWordsTokenEnricher.scala    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/enrichers/NCEnStopWordsTokenEnricher.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/enrichers/NCEnStopWordsTokenEnricher.scala
index 367d96be..4312ea54 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/enrichers/NCEnStopWordsTokenEnricher.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/enrichers/NCEnStopWordsTokenEnricher.scala
@@ -517,13 +517,15 @@ class NCEnStopWordsTokenEnricher(
             var stop = true
 
             for (
-                (tok, idx) <- ns.zipWithIndex;
-                extra = extraToks(tok)
+                (tok, idx) <- ns.zipWithIndex; extra = extraToks(tok)
                 if
-                    idx != max && !isStopWord(tok) &&
+                    idx != max &&
+                    !isStopWord(tok) &&
                     !exclStems.contains(extra.stemTxt) &&
                     !exclStems.contains(extra.stemLemma) &&
-                    POSES.contains(getPos(tok)) && isStopWord(ns(idx + 1)))
+                    POSES.contains(getPos(tok)) &&
+                    isStopWord(ns(idx + 1))
+            )
                 stops += tok
                 stop = false
 

Reply via email to