You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2020/10/25 19:15:10 UTC
[incubator-nlpcraft] 01/02: javadoc fixes.
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
commit 882ed10e9d88b6da12e865bc9ed4b6dd62c471d6
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Sun Oct 25 12:10:20 2020 -0700
javadoc fixes.
---
.../src/main/scala/org/apache/nlpcraft/model/NCContext.java | 2 +-
.../src/main/scala/org/apache/nlpcraft/model/NCToken.java | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCContext.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCContext.java
index 385c834..9e5028d 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCContext.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCContext.java
@@ -24,7 +24,7 @@ import java.util.*;
* Data model query context. This context defines fully processed user input and its associated data that
* the model's intents need to process and return the result.
*
- * @see NCIntentMatch
+ * @see NCIntentMatch#getContext()
*/
public interface NCContext extends Serializable {
/**
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCToken.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCToken.java
index c51d093..4913286 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCToken.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCToken.java
@@ -20,10 +20,17 @@ package org.apache.nlpcraft.model;
import java.util.*;
/**
- * Detected model element. A token is a detected model element and is a part of a
- * parsed user input. Sequence of tokens represents fully parsed (see {@link NCContext#getVariants()} method) user input. A single
+ * Detected model element. A token is a detected model element and is a part of the
+ * parsed user input. Sequence of tokens represents a fully parsed (see {@link NCContext#getVariants()} method) user input. A single
* token corresponds to a one or more words, sequential or not, in the user sentence.
* <p>
+ * Note that tokens can be used to define other tokens (i.e. tokens are composable). Because of that tokens naturally
+ * form a tree hierarchy - see methods {@link #findPartTokens(String...)}, {@link #getAliases()}, {@link #isOfAlias(String)}
+ * and {@link #getPartTokens()}.
+ * Note also that detected model elements that tokens represent also form another hierarchy, namely a model element hierarchy that
+ * user can also access via {@link #getAncestors()}, {@link #getParentId()} methods. These two hierarchies should be not
+ * be confused.
+ * <p>
* <b>Configuring Token Providers</b><br>
* Token providers (built-in or 3rd party) have to be enabled in the REST server <a href="https://nlpcraft.apache.org/server-and-probe.html">configuration</a>.
* Data models also have to specify tokens they are expecting the REST server and probe to detect. This is done to