This is an automated email from the ASF dual-hosted git repository.

sergeykamov pushed a commit to branch NLPCRAFT-91-MODULES
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-91-MODULES by this 
push:
     new 2106d43  WIP.
2106d43 is described below

commit 2106d43d07958c1a45ba72e1118945640421c010
Author: Sergey Kamov <[email protected]>
AuthorDate: Fri Apr 23 20:23:34 2021 +0300

    WIP.
---
 .../{LightSwitchModel.scala => LightSwitchScalaModel.scala}          | 4 +++-
 nlpcraft-examples/lightswitch/src/main/resources/nlpcraft.conf       | 5 ++++-
 .../nlpcraft/examples/lightswitch/NCModelsValidationSpec.scala       | 3 ++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git 
a/nlpcraft-examples/lightswitch/src/main/java/org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala
 
b/nlpcraft-examples/lightswitch/src/main/java/org/apache/nlpcraft/examples/lightswitch/LightSwitchScalaModel.scala
similarity index 95%
rename from 
nlpcraft-examples/lightswitch/src/main/java/org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala
rename to 
nlpcraft-examples/lightswitch/src/main/java/org/apache/nlpcraft/examples/lightswitch/LightSwitchScalaModel.scala
index a8f65b1..69acdbe 100644
--- 
a/nlpcraft-examples/lightswitch/src/main/java/org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala
+++ 
b/nlpcraft-examples/lightswitch/src/main/java/org/apache/nlpcraft/examples/lightswitch/LightSwitchScalaModel.scala
@@ -31,7 +31,7 @@ import org.apache.nlpcraft.model.{NCIntentTerm, _}
   * <p>
   * See 'README.md' file in the same folder for running and testing 
instructions.
   */
-class LightSwitchModel extends NCModelFileAdapter("lightswitch_model.yaml") {
+class LightSwitchScalaModel extends 
NCModelFileAdapter("lightswitch_model.yaml") {
     /**
       * Intent and its on-match callback.
       *
@@ -72,4 +72,6 @@ class LightSwitchModel extends 
NCModelFileAdapter("lightswitch_model.yaml") {
         // By default - just return a descriptive action string.
         NCResult.text(s"Lights are [$status] in [${locations.toLowerCase}].")
     }
+
+    override def getId: String = s"${super.getId}.scala"
 }
diff --git a/nlpcraft-examples/lightswitch/src/main/resources/nlpcraft.conf 
b/nlpcraft-examples/lightswitch/src/main/resources/nlpcraft.conf
index e9babcf..9e07e82 100644
--- a/nlpcraft-examples/lightswitch/src/main/resources/nlpcraft.conf
+++ b/nlpcraft-examples/lightswitch/src/main/resources/nlpcraft.conf
@@ -106,7 +106,10 @@ nlpcraft {
         # Note that following models require 'google' on the server side.
         # See https://nlpcraft.apache.org/integrations.html#nlp for more 
details
         # on how to configure 3rd party token providers:
-        models = 
org.apache.nlpcraft.examples.lightswitch.LightSwitchKotlinModel
+        models = 
"""org.apache.nlpcraft.examples.lightswitch.LightSwitchJavaModel,
+                 
org.apache.nlpcraft.examples.lightswitch.LightSwitchGroovyModel,
+                 
org.apache.nlpcraft.examples.lightswitch.LightSwitchKotlinModel,
+                 
org.apache.nlpcraft.examples.lightswitch.LightSwitchScalaModel"""
 
         # Specify class names for probe life cycle components.
         # Each class should extend 'NCProbeLifecycle' interface and provide a 
no-arg constructor.
diff --git 
a/nlpcraft-examples/lightswitch/src/test/java/org/apache/nlpcraft/examples/lightswitch/NCModelsValidationSpec.scala
 
b/nlpcraft-examples/lightswitch/src/test/java/org/apache/nlpcraft/examples/lightswitch/NCModelsValidationSpec.scala
index 6aa3a0c..f737ca3 100644
--- 
a/nlpcraft-examples/lightswitch/src/test/java/org/apache/nlpcraft/examples/lightswitch/NCModelsValidationSpec.scala
+++ 
b/nlpcraft-examples/lightswitch/src/test/java/org/apache/nlpcraft/examples/lightswitch/NCModelsValidationSpec.scala
@@ -31,7 +31,8 @@ class NCModelsValidationSpec {
             "NLPCRAFT_TEST_MODELS",
                 
"org.apache.nlpcraft.examples.lightswitch.LightSwitchJavaModel," +
                 
"org.apache.nlpcraft.examples.lightswitch.LightSwitchGroovyModel," +
-                
"org.apache.nlpcraft.examples.lightswitch.LightSwitchKotlinModel"
+                
"org.apache.nlpcraft.examples.lightswitch.LightSwitchKotlinModel," +
+                
"org.apache.nlpcraft.examples.lightswitch.LightSwitchScalaModel"
         )
 
         // Start model auto-validator.

Reply via email to