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

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


The following commit(s) were added to refs/heads/NLPCRAFT-443 by this push:
     new 9e52aa1  WIP.
9e52aa1 is described below

commit 9e52aa1bebe33aefe408a01d9337348fa319e36f
Author: Sergey Kamov <[email protected]>
AuthorDate: Sat Sep 25 21:14:42 2021 +0300

    WIP.
---
 .../src/main/scala/org/apache/nlpcraft/probe/mgrs/NCProbeIdlToken.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/NCProbeIdlToken.scala 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/NCProbeIdlToken.scala
index b2a8310..37fea25 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/NCProbeIdlToken.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/NCProbeIdlToken.scala
@@ -27,7 +27,7 @@ import org.apache.nlpcraft.model.{NCToken, _}
   */
 case class NCProbeIdlToken(token: NCToken, word: NCNlpSentenceToken) {
     val (origText: String, wordIndexes: Set[Int], minIndex: Int, maxIndex: 
Int, isToken: Boolean, isWord: Boolean) =
-        if (isToken)
+        if (token != null)
             (token.origText, token.wordIndexes.toSet, token.wordIndexes.head, 
token.wordIndexes.last, true, false)
         else
             (word.origText, word.wordIndexes.toSet, word.wordIndexes.head, 
word.wordIndexes.last, false, true)

Reply via email to