This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-398
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-398 by this push:
new bb17188 WIP on NLPCRAFT-398
bb17188 is described below
commit bb17188300702a16d30552d1e4dd91c80989c341
Author: Aaron Radzinski <[email protected]>
AuthorDate: Tue Aug 10 11:57:12 2021 -0700
WIP on NLPCRAFT-398
---
.../scala/org/apache/nlpcraft/model/NCIntent.java | 2 ++
.../org/apache/nlpcraft/model/NCIntentMatch.java | 2 ++
.../org/apache/nlpcraft/model/NCIntentRef.java | 2 ++
.../org/apache/nlpcraft/model/NCIntentSample.java | 2 ++
.../apache/nlpcraft/model/NCIntentSampleRef.java | 2 ++
.../org/apache/nlpcraft/model/NCIntentTerm.java | 2 ++
.../apache/nlpcraft/model/NCModelAddClasses.java | 26 +++++++++++++++++++++-
.../apache/nlpcraft/model/NCModelAddPackage.java | 26 +++++++++++++++++++++-
8 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntent.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntent.java
index 877f7d7..484a1d3 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntent.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntent.java
@@ -54,6 +54,8 @@ import static java.lang.annotation.RetentionPolicy.*;
* @see NCIntentTerm
* @see NCIntentSample
* @see NCIntentSampleRef
+ * @see NCModelAddClasses
+ * @see NCModelAddPackage
* @see NCIntentSkip
* @see NCIntentMatch
* @see NCModel#onMatchedIntent(NCIntentMatch)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentMatch.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentMatch.java
index 2f1d382..8268d75 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentMatch.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentMatch.java
@@ -32,6 +32,8 @@ import java.util.*;
* @see NCIntent
* @see NCIntentTerm
* @see NCIntentSkip
+ * @see NCModelAddClasses
+ * @see NCModelAddPackage
* @see NCIntentSample
* @see NCIntentSampleRef
* @see NCIntentRef
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentRef.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentRef.java
index 263f09f..3348ffe 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentRef.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentRef.java
@@ -46,6 +46,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* @see NCIntentTerm
* @see NCIntentSample
* @see NCIntentSampleRef
+ * @see NCModelAddClasses
+ * @see NCModelAddPackage
* @see NCIntentSkip
* @see NCIntentMatch
* @see NCModel#onMatchedIntent(NCIntentMatch)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentSample.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentSample.java
index e8d18c7..6d57d0d 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentSample.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentSample.java
@@ -76,6 +76,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* @see NCIntent
* @see NCIntentRef
* @see NCIntentTerm
+ * @see NCModelAddClasses
+ * @see NCModelAddPackage
* @see NCIntentSkip
* @see NCIntentMatch
* @see NCModel#onMatchedIntent(NCIntentMatch)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentSampleRef.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentSampleRef.java
index 2596611..a455b8a 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentSampleRef.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentSampleRef.java
@@ -75,6 +75,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* @see NCIntent
* @see NCIntentRef
* @see NCIntentTerm
+ * @see NCModelAddClasses
+ * @see NCModelAddPackage
* @see NCIntentSkip
* @see NCIntentMatch
* @see NCModel#onMatchedIntent(NCIntentMatch)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentTerm.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentTerm.java
index e864eb5..13832a0 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentTerm.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCIntentTerm.java
@@ -58,6 +58,8 @@ import static java.lang.annotation.RetentionPolicy.*;
* @see NCIntentRef
* @see NCIntentSample
* @see NCIntentSampleRef
+ * @see NCModelAddClasses
+ * @see NCModelAddPackage
* @see NCIntentSkip
* @see NCIntentMatch
* @see NCModel#onMatchedIntent(NCIntentMatch)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelAddClasses.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelAddClasses.java
index 33110e8..d8241d4 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelAddClasses.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelAddClasses.java
@@ -23,9 +23,33 @@ import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
-// TODO:
+/**
+ * Annotation to add one or more classes that contain intent callbacks. This
annotation should be applied to the main
+ * model class. When found the internal intent detection algorithm will scan
these additional classes searching
+ * for intent callbacks.
+ * <p>
+ * Additionally with {@link NCModelAddPackage} annotation, these two
annotations allowing to have model implementation,
+ * i.e. intent callbacks, in external classes not linked through sub-type
relationship to the main model class. This
+ * approach provides greater modularity, isolated testability and overall
coding efficiencies for the larger models
+ * <p>
+ * Read full documentation in <a target=_
href="https://nlpcraft.apache.org/intent-matching.html#binding">Intent
Matching</a> section and review
+ * <a target=_
href="https://github.com/apache/incubator-nlpcraft/tree/master/nlpcraft-examples">examples</a>.
+ *
+ * @see NCModelAddPackage
+ * @see NCIntentRef
+ * @see NCIntentTerm
+ * @see NCIntentSample
+ * @see NCIntentSampleRef
+ * @see NCIntentSkip
+ * @see NCIntentMatch
+ */
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface NCModelAddClasses {
+ /**
+ * Array of class instances to additionally scan for intent callbacks.
+ *
+ * @return Array of class instances to additionally scan for intent
callbacks.
+ */
Class<?>[] value();
}
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelAddPackage.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelAddPackage.java
index c8d4d69..5da8006 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelAddPackage.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelAddPackage.java
@@ -23,9 +23,33 @@ import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
-// TODO:
+/**
+ * Annotation to add one or more JVM packages that contain classes with intent
callbacks. This annotation should be
+ * applied to the main model class. When found the internal intent detection
algorithm will scan these additional
+ * packages and their classes searching for intent callbacks.
+ * <p>
+ * Additionally with {@link NCModelAddClasses} annotation, these two
annotations allowing to have model implementation,
+ * i.e. intent callbacks, in external classes not linked through sub-type
relationship to the main model class. This
+ * approach provides greater modularity, isolated testability and overall
coding efficiencies for the larger models
+ * <p>
+ * Read full documentation in <a target=_
href="https://nlpcraft.apache.org/intent-matching.html#binding">Intent
Matching</a> section and review
+ * <a target=_
href="https://github.com/apache/incubator-nlpcraft/tree/master/nlpcraft-examples">examples</a>.
+ *
+ * @see NCModelAddClasses
+ * @see NCIntentRef
+ * @see NCIntentTerm
+ * @see NCIntentSample
+ * @see NCIntentSampleRef
+ * @see NCIntentSkip
+ * @see NCIntentMatch
+ */
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface NCModelAddPackage {
+ /**
+ * Array of JVM package names to additionally scan for intent callbacks.
+ *
+ * @return Array of JVM package names to additionally scan for intent
callbacks.
+ */
String[] value();
}