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 2020/09/17 11:02:46 UTC
[incubator-nlpcraft] branch NLPCRAFT-127 updated: WIP.
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-127
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-127 by this push:
new 2e17436 WIP.
2e17436 is described below
commit 2e174367bc1cb8295b1adbfda1fcd88de53707fd
Author: Sergey Kamov <se...@apache.org>
AuthorDate: Thu Sep 17 14:02:40 2020 +0300
WIP.
---
.../main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentence.scala | 5 ++---
.../nlpcraft/probe/mgrs/nlp/enrichers/sort/NCSortEnricher.scala | 1 +
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentence.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentence.scala
index 15af813..58e7baa 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentence.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentence.scala
@@ -404,9 +404,8 @@ object NCNlpSentence {
val nsNotes: Map[String, Seq[Int]] = ns.tokens.flatten.map(p ⇒ p.noteType → p.tokenIndexes).toMap
for (
- t ← ns.tokens;
- stopReason ← t.stopsReasons
- if nsNotes.getOrElse(stopReason.noteType, Seq.empty) == stopReason.tokenIndexes
+ t ← ns.tokens; stopReason ← t.stopsReasons
+ if nsNotes.getOrElse(stopReason.noteType, Seq.empty) == stopReason.tokenIndexes
)
ns.fixNote(t.getNlpNote, "stopWord" → true)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/sort/NCSortEnricher.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/sort/NCSortEnricher.scala
index 34910a7..d40a6f8 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/sort/NCSortEnricher.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/sort/NCSortEnricher.scala
@@ -105,6 +105,7 @@ object NCSortEnricher extends NCProbeEnricher {
require(main.nonEmpty)
require(subjSeq.nonEmpty || bySeq.nonEmpty)
+ // Special case. Same elements found without ASC flag. Should be skipped as already processed.
def isSubCase(m: Match): Boolean =
// Stops skipped.
asc.isDefined &&