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/05/25 19:45:56 UTC

[incubator-nlpcraft] branch master updated: Fixed NLPCRAFT-61.

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 2891f5e  Fixed NLPCRAFT-61.
2891f5e is described below

commit 2891f5e50efdc5a513c0d82214a2d0e5725cd76b
Author: Aaron Radzinzski <ar...@datalingvo.com>
AuthorDate: Mon May 25 12:45:45 2020 -0700

    Fixed NLPCRAFT-61.
---
 .../scala/org/apache/nlpcraft/examples/alarm/README.md | 15 ++++++++++-----
 .../scala/org/apache/nlpcraft/examples/echo/README.md  | 15 ++++++++++-----
 .../org/apache/nlpcraft/examples/helloworld/README.md  | 15 ++++++++++-----
 .../org/apache/nlpcraft/examples/lightswitch/README.md | 15 ++++++++++-----
 .../scala/org/apache/nlpcraft/examples/phone/README.md | 15 ++++++++++-----
 .../scala/org/apache/nlpcraft/examples/sql/README.md   | 18 +++++++++++++-----
 .../scala/org/apache/nlpcraft/examples/time/README.md  | 15 ++++++++++-----
 .../org/apache/nlpcraft/examples/weather/README.md     | 15 ++++++++++-----
 8 files changed, 83 insertions(+), 40 deletions(-)

diff --git a/src/main/scala/org/apache/nlpcraft/examples/alarm/README.md b/src/main/scala/org/apache/nlpcraft/examples/alarm/README.md
index 63c49a3..f6a770c 100644
--- a/src/main/scala/org/apache/nlpcraft/examples/alarm/README.md
+++ b/src/main/scala/org/apache/nlpcraft/examples/alarm/README.md
@@ -30,14 +30,19 @@ specific duration from now expressed in hours, minutes and/or seconds. You can s
 When the timers is up it will simply print out "BEEP BEEP BEEP" in the probe console.
 
 ### Running
-You can run this example from command line or IDE in a similar way.
-Note that you don't need to start Data Probe manually as unit test uses embedded probe and starts it automatically:
- 1. Run REST server:
+You can run necessary JVMs for this example similarly from command line or IDE.
+NOTE: that you don't need to start Data Probe standalone if you are only running the unit test as it uses the 
+embedded probe and starts it automatically:
+ *  Run REST server:
     * **Main class:** `org.apache.nlpcraft.NCStart`
     * **Program arguments:** `-server`
- 2. Run test:
+ * To run unit test with embedded probe:
     * **JUnit 5 test:** `org.apache.nlpcraft.examples.alarm.AlarmTest`
-    * or use NLPCraft [REST APIs](https://nlpcraft.apache.org/using-rest.html) with your favorite REST client
+ * To run probe standalone and use your own [REST client](https://nlpcraft.apache.org/using-rest.html):
+    * **Main class:** `org.apache.nlpcraft.NCStart`
+    * **VM arguments:** `-Dconfig.override_with_env_vars=true`
+    * **Environment variables:** `CONFIG_FORCE_nlpcraft_probe_models.0=org.apache.nlpcraft.examples.alarm.AlarmModel`
+    * **Program arguments:** `-probe`
 
 ### Documentation
 See [Getting Started](https://nlpcraft.apache.org/getting-started.html) guide for more instructions on how to run these examples.
diff --git a/src/main/scala/org/apache/nlpcraft/examples/echo/README.md b/src/main/scala/org/apache/nlpcraft/examples/echo/README.md
index be17387..bf5f9df 100644
--- a/src/main/scala/org/apache/nlpcraft/examples/echo/README.md
+++ b/src/main/scala/org/apache/nlpcraft/examples/echo/README.md
@@ -33,14 +33,19 @@ can operate on. This example can be useful during the development to see what
 object properties are available.
 
 ### Running
-You can run this example from command line or IDE in a similar way.
-Note that you don't need to start Data Probe manually as unit test uses embedded probe and starts it automatically:
- 1. Run REST server:
+You can run necessary JVMs for this example similarly from command line or IDE.
+NOTE: that you don't need to start Data Probe standalone if you are only running the unit test as it uses the 
+embedded probe and starts it automatically:
+ *  Run REST server:
     * **Main class:** `org.apache.nlpcraft.NCStart`
     * **Program arguments:** `-server`
- 2. Run test:
+ * To run unit test with embedded probe:
     * **JUnit 5 test:** `org.apache.nlpcraft.examples.echo.EchoTest`
-    * or use NLPCraft [REST APIs](https://nlpcraft.apache.org/using-rest.html) with your favorite REST client
+ * To run probe standalone and use your own [REST client](https://nlpcraft.apache.org/using-rest.html):
+    * **Main class:** `org.apache.nlpcraft.NCStart`
+    * **VM arguments:** `-Dconfig.override_with_env_vars=true`
+    * **Environment variables:** `CONFIG_FORCE_nlpcraft_probe_models.0=org.apache.nlpcraft.examples.echo.EchoModel`
+    * **Program arguments:** `-probe`
 
 ### Documentation  
 See [Getting Started](https://nlpcraft.apache.org/getting-started.html) guide for more instructions on how to run these examples.
diff --git a/src/main/scala/org/apache/nlpcraft/examples/helloworld/README.md b/src/main/scala/org/apache/nlpcraft/examples/helloworld/README.md
index 177cfcc..53dd45c 100644
--- a/src/main/scala/org/apache/nlpcraft/examples/helloworld/README.md
+++ b/src/main/scala/org/apache/nlpcraft/examples/helloworld/README.md
@@ -28,14 +28,19 @@ This trivial example simply responds with 'Hello World!' on any user input.
 This is the simplest and shortest user model that can be defined.
 
 ### Running
-You can run this example from command line or IDE in a similar way.
-Note that you don't need to start Data Probe manually as unit test uses embedded probe and starts it automatically:
- 1. Run REST server:
+You can run necessary JVMs for this example similarly from command line or IDE.
+NOTE: that you don't need to start Data Probe standalone if you are only running the unit test as it uses the 
+embedded probe and starts it automatically:
+ *  Run REST server:
     * **Main class:** `org.apache.nlpcraft.NCStart`
     * **Program arguments:** `-server`
- 2. Run test:
+ * To run unit test with embedded probe:
     * **JUnit 5 test:** `org.apache.nlpcraft.examples.helloworld.HelloWorldTest`
-    * or use NLPCraft [REST APIs](https://nlpcraft.apache.org/using-rest.html) with your favorite REST client
+ * To run probe standalone and use your own [REST client](https://nlpcraft.apache.org/using-rest.html):
+    * **Main class:** `org.apache.nlpcraft.NCStart`
+    * **VM arguments:** `-Dconfig.override_with_env_vars=true`
+    * **Environment variables:** `CONFIG_FORCE_nlpcraft_probe_models.0=org.apache.nlpcraft.examples.helloworld.HelloWorldModel`
+    * **Program arguments:** `-probe`
 
 ### Documentation
 See [Getting Started](https://nlpcraft.apache.org/getting-started.html) guide for more instructions on how to run these examples.
diff --git a/src/main/scala/org/apache/nlpcraft/examples/lightswitch/README.md b/src/main/scala/org/apache/nlpcraft/examples/lightswitch/README.md
index 5531b22..3755f49 100644
--- a/src/main/scala/org/apache/nlpcraft/examples/lightswitch/README.md
+++ b/src/main/scala/org/apache/nlpcraft/examples/lightswitch/README.md
@@ -30,14 +30,19 @@ You can easily modify intent callbacks to perform the actual light switching usi
 controllers.
 
 ### Running
-You can run this example from command line or IDE in a similar way.
-Note that you don't need to start Data Probe manually as unit test uses embedded probe and starts it automatically:
- 1. Run REST server:
+You can run necessary JVMs for this example similarly from command line or IDE.
+NOTE: that you don't need to start Data Probe standalone if you are only running the unit test as it uses the 
+embedded probe and starts it automatically:
+ *  Run REST server:
     * **Main class:** `org.apache.nlpcraft.NCStart`
     * **Program arguments:** `-server`
- 2. Run test:
+ * To run unit test with embedded probe:
     * **JUnit 5 test:** `org.apache.nlpcraft.examples.lightswitch.LightSwitchTest`
-    * or use NLPCraft [REST APIs](https://nlpcraft.apache.org/using-rest.html) with your favorite REST client
+ * To run probe standalone and use your own [REST client](https://nlpcraft.apache.org/using-rest.html):
+    * **Main class:** `org.apache.nlpcraft.NCStart`
+    * **VM arguments:** `-Dconfig.override_with_env_vars=true`
+    * **Environment variables:** `CONFIG_FORCE_nlpcraft_probe_models.0=org.apache.nlpcraft.examples.lightswitch.LightSwitchModel`
+    * **Program arguments:** `-probe`
 
 ### Blog
 Read the [blog post](https://nlpcraft.apache.org/blogs/lightswitch_with_natural_language_interface.html) explaining this example in greater details. 
diff --git a/src/main/scala/org/apache/nlpcraft/examples/phone/README.md b/src/main/scala/org/apache/nlpcraft/examples/phone/README.md
index c0fbd5a..75acc7d 100644
--- a/src/main/scala/org/apache/nlpcraft/examples/phone/README.md
+++ b/src/main/scala/org/apache/nlpcraft/examples/phone/README.md
@@ -29,18 +29,23 @@ It doesn't actually do a phone dialing, but it recognizes the recipient and retu
 can easily add access to the contact database and issue the call via many existing REST services.
 
 ### Running
-You can run this example from command line or IDE in a similar way.
-Note that you don't need to start Data Probe manually as unit test uses embedded probe and starts it automatically:
- 1. Run REST server:
+You can run necessary JVMs for this example similarly from command line or IDE.
+NOTE: that you don't need to start Data Probe standalone if you are only running the unit test as it uses the 
+embedded probe and starts it automatically:
+ *  Run REST server:
     * **Main class:** `org.apache.nlpcraft.NCStart`
     * **VM arguments:** `-Dconfig.override_with_env_vars=true`
     * **Environment variables:** 
       * `CONFIG_FORCE_nlpcraft_server_tokenProviders.0=nlpcraft`
       * `CONFIG_FORCE_nlpcraft_server_tokenProviders.1=google`
     * **Program arguments:** `-server`
- 2. Run test:
+ * To run unit test with embedded probe:
     * **JUnit 5 test:** `org.apache.nlpcraft.examples.phone.PhoneTest`
-    * or use NLPCraft [REST APIs](https://nlpcraft.apache.org/using-rest.html) with your favorite REST client
+ * To run probe standalone and use your own [REST client](https://nlpcraft.apache.org/using-rest.html):
+    * **Main class:** `org.apache.nlpcraft.NCStart`
+    * **VM arguments:** `-Dconfig.override_with_env_vars=true`
+    * **Environment variables:** `CONFIG_FORCE_nlpcraft_probe_models.0=org.apache.nlpcraft.examples.phone.PhoneModel`
+    * **Program arguments:** `-probe`
 
 ### Documentation  
 See [Getting Started](https://nlpcraft.apache.org/getting-started.html) guide for more instructions on how to run these examples.
diff --git a/src/main/scala/org/apache/nlpcraft/examples/sql/README.md b/src/main/scala/org/apache/nlpcraft/examples/sql/README.md
index 0ec2533..8a7017e 100644
--- a/src/main/scala/org/apache/nlpcraft/examples/sql/README.md
+++ b/src/main/scala/org/apache/nlpcraft/examples/sql/README.md
@@ -32,14 +32,22 @@ example itself) - it is designed in a such a way that it can be easily extended
 This example can be run the same way as other examples with one exception - it needs to run H2 database server. 
 The unit test for this example runs H2 database server automatically (which can be run manually, if necessary).
 You need to start H2 database server standalone when you are using `NCSqlModelGenerator` model generation utility.
-Note that you don't need to start Data Probe manually as unit test uses embedded probe and starts it automatically.
-You can run this example from command line or IDE in a similar way:
- 1. Run REST server:
+You can run necessary JVMs for this example similarly from command line or IDE.
+NOTE: that you don't need to start Data Probe standalone if you are only running the unit test as it uses the 
+embedded probe and starts it automatically:
+ *  Run REST server:
     * **Main class:** `org.apache.nlpcraft.NCStart`
     * **Program arguments:** `-server`
- 2. Run test:
+ * To run unit test with embedded probe:
     * **JUnit 5 test:** `org.apache.nlpcraft.examples.sql.SqlTest`
-    * or use NLPCraft [REST APIs](https://nlpcraft.apache.org/using-rest.html) with your favorite REST client
+ * To run probe standalone and use your own [REST client](https://nlpcraft.apache.org/using-rest.html):
+    * **Main class:** `org.apache.nlpcraft.NCStart`
+    * **VM arguments:** `-Dconfig.override_with_env_vars=true`
+    * **Environment variables:** `CONFIG_FORCE_nlpcraft_probe_models.0=org.apache.nlpcraft.examples.sql.SqlModel`
+    * **Program arguments:** `-probe`
+    
+    When running data probe standalone you need run H2 database sever manually (from command line or IDE):
+    * **Main class:** `org.apache.nlpcraft.examples.sql.db.SqlServerRunner`
 
 ### Documentation  
 See [Getting Started](https://nlpcraft.apache.org/getting-started.html) guide for more instructions on how to run these examples.
diff --git a/src/main/scala/org/apache/nlpcraft/examples/time/README.md b/src/main/scala/org/apache/nlpcraft/examples/time/README.md
index f757e2c..2bd34ef 100644
--- a/src/main/scala/org/apache/nlpcraft/examples/time/README.md
+++ b/src/main/scala/org/apache/nlpcraft/examples/time/README.md
@@ -28,14 +28,19 @@ This example data model answers the questions about current time, either local t
 It provides YAML response with time and timezone information and uses YAML model definition.
  
 ### Running
-You can run this example from command line or IDE in a similar way.
-Note that you don't need to start Data Probe manually as unit test uses embedded probe and starts it automatically:
- 1. Run REST server:
+You can run necessary JVMs for this example similarly from command line or IDE.
+NOTE: that you don't need to start Data Probe standalone if you are only running the unit test as it uses the 
+embedded probe and starts it automatically:
+ *  Run REST server:
     * **Main class:** `org.apache.nlpcraft.NCStart`
     * **Program arguments:** `-server`
- 2. Run test:
+ * To run unit test with embedded probe:
     * **JUnit 5 test:** `org.apache.nlpcraft.examples.time.TimeTest`
-    * or use NLPCraft [REST APIs](https://nlpcraft.apache.org/using-rest.html) with your favorite REST client
+ * To run probe standalone and use your own [REST client](https://nlpcraft.apache.org/using-rest.html):
+    * **Main class:** `org.apache.nlpcraft.NCStart`
+    * **VM arguments:** `-Dconfig.override_with_env_vars=true`
+    * **Environment variables:** `CONFIG_FORCE_nlpcraft_probe_models.0=org.apache.nlpcraft.examples.time.TimeModel`
+    * **Program arguments:** `-probe`
 
 ### Documentation  
 See [Getting Started](https://nlpcraft.apache.org/getting-started.html) guide for more instructions on how to run these examples.
diff --git a/src/main/scala/org/apache/nlpcraft/examples/weather/README.md b/src/main/scala/org/apache/nlpcraft/examples/weather/README.md
index 4eb0683..2ff1c0d 100644
--- a/src/main/scala/org/apache/nlpcraft/examples/weather/README.md
+++ b/src/main/scala/org/apache/nlpcraft/examples/weather/README.md
@@ -29,14 +29,19 @@ intent matching logic. It uses https://www.apixu.com REST service for the actual
 weather information.
 
 ### Running
-You can run this example from command line or IDE in a similar way.
-Note that you don't need to start Data Probe manually as unit test uses embedded probe and starts it automatically:
- 1. Run REST server:
+You can run necessary JVMs for this example similarly from command line or IDE.
+NOTE: that you don't need to start Data Probe standalone if you are only running the unit test as it uses the 
+embedded probe and starts it automatically:
+ *  Run REST server:
     * **Main class:** `org.apache.nlpcraft.NCStart`
     * **Program arguments:** `-server`
- 2. Run test:
+ * To run unit test with embedded probe:
     * **JUnit 5 test:** `org.apache.nlpcraft.examples.weather.WeatherTest`
-    * or use NLPCraft [REST APIs](https://nlpcraft.apache.org/using-rest.html) with your favorite REST client
+ * To run probe standalone and use your own [REST client](https://nlpcraft.apache.org/using-rest.html):
+    * **Main class:** `org.apache.nlpcraft.NCStart`
+    * **VM arguments:** `-Dconfig.override_with_env_vars=true`
+    * **Environment variables:** `CONFIG_FORCE_nlpcraft_probe_models.0=org.apache.nlpcraft.examples.weather.WeatherModel`
+    * **Program arguments:** `-probe`
 
 ### Documentation  
 See [Getting Started](https://nlpcraft.apache.org/getting-started.html) guide for more instructions on how to run these examples.