This is an automated email from the ASF dual-hosted git repository.
sergeykamov 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 040e798 WIP.
040e798 is described below
commit 040e798b6753209251a82c0147392d495a2fa620
Author: Sergey Kamov <[email protected]>
AuthorDate: Mon Aug 9 18:46:14 2021 +0300
WIP.
---
.../apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala | 11 +++++++----
.../nlpcraft/probe/mgrs/deploy/NCModelNestedSamplesSpec.scala | 4 ++--
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
index fb65b47..efee3e0 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
@@ -1549,7 +1549,7 @@ object NCDeployManager extends NCService {
}
def processClass(cls: Class[_]): Unit =
- if (cls != null)
+ if (cls != null && !Modifier.isAbstract(cls.getModifiers))
try
for (
ann <- cls.getAnnotationsByType(CLS_INTENT);
@@ -1561,7 +1561,8 @@ object NCDeployManager extends NCService {
s"origin=${mdl.getOrigin}, " +
s"class=$cls, " +
s"id=${intent.id}" +
- s"]")
+ s"]"
+ )
else
intentDecls += intent
catch {
@@ -1598,7 +1599,8 @@ object NCDeployManager extends NCService {
s"origin=${mdl.getOrigin}, " +
s"callback=$mtdStr, " +
s"id=${intent.id}" +
- s"]")
+ s"]"
+ )
else
bindIntent(intent, prepareCallback(mo, mdl, intent))
@@ -1614,7 +1616,8 @@ object NCDeployManager extends NCService {
s"origin=${mdl.getOrigin}, " +
s"refId=$refId, " +
s"callback=$mtdStr" +
- s"]")
+ s"]"
+ )
}
}
}
diff --git
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCModelNestedSamplesSpec.scala
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCModelNestedSamplesSpec.scala
index 6ceab8f..017adba 100644
---
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCModelNestedSamplesSpec.scala
+++
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCModelNestedSamplesSpec.scala
@@ -22,9 +22,9 @@ import org.apache.nlpcraft.model.{NCIntent, NCIntentSample,
NCModelAdapter, NCRe
import org.apache.nlpcraft.probe.mgrs.model.NCModelManager
import org.junit.jupiter.api.Test
-class NCModelNested extends NCModelAdapter("nlpcraft.samples.test.mdl", "Test
Model", "1.0") {
+abstract class NCModelNested extends
NCModelAdapter("nlpcraft.samples.test.mdl", "Test Model", "1.0") {
@NCIntentSample(Array("a"))
- @NCIntent("intent=ss term={tok_id() == 'a'}*")
+ @NCIntent("intent=nested term={tok_id() == 'a'}*")
def m(): NCResult = NCResult.text("OK")
}