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/05/20 07:28:29 UTC

[incubator-nlpcraft] 03/03: Utilities methods refactoring. Last iteration.

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

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

commit 0b0c2ad5c9d38cc4605a034450ada2c504ea10a8
Author: Sergey Kamov <se...@apache.org>
AuthorDate: Wed May 20 10:28:18 2020 +0300

    Utilities methods refactoring. Last iteration.
---
 src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentence.scala | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentence.scala b/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentence.scala
index 6b7c828..db05f0d 100644
--- a/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentence.scala
+++ b/src/main/scala/org/apache/nlpcraft/common/nlp/NCNlpSentence.scala
@@ -481,7 +481,6 @@ class NCNlpSentence(
       */
     def removeNote(note: NCNlpSentenceNote): Unit = this.foreach(_.remove(note))
 
-    //noinspection HashCodeUsesVar
     override def hashCode(): Int = {
         if (hash == null)
             hash = calcHash()
@@ -640,10 +639,10 @@ class NCNlpSentence(
     }
 
     /**
+      * Returns flag are note notes equal (or similar) or not. Reason of ignored difference can be stopwords tokens.
       *
-      * @param n1
-      * @param n2
-      * @return
+      * @param n1 First note.
+      * @param n2 Second note.
       */
     def notesEqualOrSimilar(n1: NCNlpSentenceNote, n2: NCNlpSentenceNote): Boolean =
         if (n1.noteType != n2.noteType)