This is an automated email from the ASF dual-hosted git repository. aradzinski pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/master by this push: new aaaf862 WIP Javadoc. aaaf862 is described below commit aaaf8621ba27c1e17b8cdedd47bab94cb9706239 Author: Aaron Radzinski <aradzin...@datalingvo.com> AuthorDate: Sat Mar 26 16:31:00 2022 -0700 WIP Javadoc. --- nlpcraft/src/main/scala/org/apache/nlpcraft/NCCuration.java | 7 ++++++- nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCCuration.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCCuration.java index 58e07f2..04acff7 100644 --- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCCuration.java +++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCCuration.java @@ -18,7 +18,12 @@ package org.apache.nlpcraft; /** - * + * A type of rejection indicating that human curation is required. Curation is typically an indication that input + * query is likely valid but needs a human correction like a type fix, slang resolution, etc. + * <p> + * Note that NLPCraft does not handle the curation process itself but only allows to indicate the curation + * request by throwing this exception. Curation is a special type of rejection. User code is responsible for the actual + * handling of the curation logic. */ public class NCCuration extends NCRejection { /** diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala index f26e7e5..28db2ce 100644 --- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala +++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCGlobals.scala @@ -19,6 +19,8 @@ package org.apache.nlpcraft import org.apache.nlpcraft.* +import scala.annotation.targetName + /** * Global syntax sugar for throwing [[NCException]]. * @@ -31,8 +33,10 @@ def E[T](msg: String, cause: Throwable = null): T = throw new NCException(msg, c final val DEEP_DEBUG = false extension[T](opt: Option[T]) + @targetName("equalEqualEqualOpt") def === (x: Option[T]): Boolean = opt.isDefined && x.isDefined && opt.get == x.get - def === (x: T): Boolean = opt.isDefined && opt.get == x + @targetName("equalEqualEqual") + def ===(x: T): Boolean = opt.isDefined && opt.get == x extension(v: Int) def MS: Int = v