This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-472
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-472 by this push:
new c1934ce Update NCStopWordsImpl.scala
c1934ce is described below
commit c1934ce15f96bd081523500600c85cbe5e7cfb6d
Author: Aaron Radzinski <[email protected]>
AuthorDate: Sun Jan 16 00:05:40 2022 -0800
Update NCStopWordsImpl.scala
---
.../apache/nlpcraft/nlp/token/enricher/en/impl/NCStopWordsImpl.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/en/impl/NCStopWordsImpl.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/en/impl/NCStopWordsImpl.scala
index 3fd36de..2ac3d3f 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/en/impl/NCStopWordsImpl.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/token/enricher/en/impl/NCStopWordsImpl.scala
@@ -129,7 +129,7 @@ object NCStopWordsImpl:
(for (subSeq <- seq) yield subSeq :+ Option(t)) ++ (if
isStopWord(t) then for (subSeq <- seq) yield subSeq :+ None else Seq.empty)
var res: Seq[Seq[Option[NCToken]]] = Seq.empty
- for (t <- toks) res = multiple(res, t) // TODO: are we missing
'+=' operator instead?
+ for (t <- toks) res = multiple(res, t)
res.map(_.flatten).filter(_.nonEmpty)
tokenMix(tokens, maxLen).
@@ -360,7 +360,7 @@ class NCStopWordsImpl(addStopsSet: JSet[String],
exclStopsSet: JSet[String]) ext
// 2. Accumulates data of each parsed line.
for (line <- lines)
- def throwError(msg: String): Unit = E(s"Invalid stop word
configuration [line=$line, reason=$msg]") // TODO: error texts.
+ def throwError(msg: String): Unit = E(s"Invalid stop word
configuration [line=$line, reason=$msg]")
var s = line.trim