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 2022/03/31 20:40:20 UTC
[incubator-nlpcraft] branch master updated: WIP javadoc.
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 5145f3b WIP javadoc.
5145f3b is described below
commit 5145f3bc2eaba6375ccfbc786a3c7d8b374d06ae
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Thu Mar 31 13:40:13 2022 -0700
WIP javadoc.
---
.../scala/org/apache/nlpcraft/NCEntityEnricher.java | 21 +++++++++++++++++----
.../main/scala/org/apache/nlpcraft/NCLifecycle.java | 13 +++++++++++--
.../main/scala/org/apache/nlpcraft/NCRequest.java | 2 +-
3 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCEntityEnricher.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCEntityEnricher.java
index 9ad2464..5574ce2 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCEntityEnricher.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCEntityEnricher.java
@@ -20,15 +20,28 @@ package org.apache.nlpcraft;
import java.util.List;
/**
+ * A pipeline components that enrichers entities by settings their properties.
+ * See {@link NCPipeline} for documentation on the overall processing pipeline. Note that this is
+ * an optional component in the pipeline.
*
+ * @see NCEntity
+ * @see NCToken
+ * @see NCTokenParser
+ * @see NCTokenEnricher
+ * @see NCTokenValidator
+ * @see NCEntityParser
+ * @see NCEntityEnricher
+ * @see NCEntityValidator
*/
public interface NCEntityEnricher extends NCLifecycle {
/**
+ * Enriches given list of entities by settings their properties.
*
- * @param req
- * @param cfg
- * @param ents
- * @throws NCException
+ * @param req Input request descriptor.
+ * @param cfg Configuration of the model this components is associated with.
+ * @param ents List of entities to enrich.
+ * @throws NCException Thrown in case of any errors.
+ * @see NCPropertyMap
*/
void enrich(NCRequest req, NCModelConfig cfg, List<NCEntity> ents);
}
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCLifecycle.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCLifecycle.java
index 3d9a97b..d564c98 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCLifecycle.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCLifecycle.java
@@ -18,20 +18,29 @@
package org.apache.nlpcraft;
/**
+ * Lifecycle callbacks for various pipeline components.
*
+ * @see NCTokenParser
+ * @see NCTokenEnricher
+ * @see NCTokenValidator
+ * @see NCEntityParser
+ * @see NCEntityEnricher
+ * @see NCEntityValidator
*/
public interface NCLifecycle {
/**
+ * Called when the component starts. Default implementation is no-op.
*
- * @param cfg
+ * @param cfg Configuration of the model this component is associated with.
*/
default void onStart(NCModelConfig cfg) {
// No-op.
}
/**
+ * Called when the component stops. Default implementation is no-op.
*
- * @param cfg
+ * @param cfg Configuration of the model this component is associated with.
*/
default void onStop(NCModelConfig cfg) {
// No-op.
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCRequest.java b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCRequest.java
index 17cfa58..9dc5587 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCRequest.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCRequest.java
@@ -20,7 +20,7 @@ package org.apache.nlpcraft;
import java.util.Map;
/**
- * Information about the user request.
+ * Descriptor for the input user request.
*
* @see NCContext#getRequest()
*/