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 2021/04/08 19:48:38 UTC
[incubator-nlpcraft] 03/07: WIP.
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-287
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit a1084902c83f96f7c55868cc2f9d82f56d78322b
Author: Sergey Kamov <sk...@gmail.com>
AuthorDate: Wed Apr 7 20:58:16 2021 +0300
WIP.
---
.../apache/nlpcraft/probe/mgrs/sentence/NCSentenceManager.scala | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/sentence/NCSentenceManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/sentence/NCSentenceManager.scala
index 7d011a0..2776677 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/sentence/NCSentenceManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/sentence/NCSentenceManager.scala
@@ -23,11 +23,10 @@ import org.apache.nlpcraft.common.nlp.pos.NCPennTreebank
import org.apache.nlpcraft.common.nlp.{NCNlpSentence, NCNlpSentenceNote, NCNlpSentenceToken}
import org.apache.nlpcraft.common.{NCE, NCService, U}
import org.apache.nlpcraft.model.NCModel
-import org.apache.nlpcraft.model.impl.NCTokenLogger
-import java.io.{Serializable => JSerializable}
+import java.io.{Serializable ⇒ JSerializable}
import java.util
-import java.util.{List => JList}
+import java.util.{List ⇒ JList}
import scala.collection.JavaConverters.{asScalaBufferConverter, _}
import scala.collection.{Map, Seq, mutable}
import scala.language.implicitConversions
@@ -679,7 +678,7 @@ object NCSentenceManager extends NCService {
var sens =
if (delCombs.nonEmpty) {
- val toksByIdx: Seq[Set[NCNlpSentenceNote]] =
+ val toksByIdx =
delCombs.flatMap(note ⇒ note.wordIndexes.map(_ → note)).
groupBy { case (idx, _) ⇒ idx }.
map { case (_, seq) ⇒ seq.map { case (_, note) ⇒ note }.toSet }.