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

aradzinski pushed a commit to branch NLPCRAFT-513
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft-website.git


The following commit(s) were added to refs/heads/NLPCRAFT-513 by this push:
     new 501829e  Some cleanup.
501829e is described below

commit 501829eb46ccfd7bde481a1f1b9da58e6add83ee
Author: Aaron Radzinski <[email protected]>
AuthorDate: Sat Oct 15 14:20:14 2022 -0700

    Some cleanup.
---
 _config.yml                |  5 ++--
 examples/light_switch.html | 66 ++++++++++++++++++++++------------------------
 2 files changed, 35 insertions(+), 36 deletions(-)

diff --git a/_config.yml b/_config.yml
index 4e2da93..16ddc88 100644
--- a/_config.yml
+++ b/_config.yml
@@ -27,8 +27,9 @@ github_username:  nlpcraft
 
 # Manually update to the latest version:
 # ===================
-latest_version: 0.9.0
-java_client_latest_version: 0.9.0
+latest_version: 1.0.0
+# TODO: remove it.
+java_client_latest_version: 1.0.0
 # ===================
 
 # SASS settings.
diff --git a/examples/light_switch.html b/examples/light_switch.html
index d60700d..e66022f 100644
--- a/examples/light_switch.html
+++ b/examples/light_switch.html
@@ -26,10 +26,10 @@ fa_icon: fa-cube
     <section id="overview">
         <h2 class="section-title">Overview <a href="#"><i class="top-link fas 
fa-fw fa-angle-double-up"></i></a></h2>
         <p>
-            This example provides very simple implementation for NLI-powered 
light switch. You can say something like
+            This example provides a very simple implementation for NLI-powered 
light switch. You can say something like
             "Turn the lights off in the entire house" or "Switch on the 
illumination in the master bedroom closet".
-            You can modify intent callbacks to perform the actual light 
switching using HomeKit or Arduino-based
-            controllers.
+            By modifying intent callbacks using, for example, HomeKit or 
Arduino-based controllers you can provide the
+            actual light switching.
         </p>
         <p>
             <b>Complexity:</b> <span class="complexity-one-star"><i class="fas 
fa-star"></i> <i class="far fa-star"></i> <i class="far 
fa-star"></i></span><br/>
@@ -41,7 +41,7 @@ fa_icon: fa-cube
         <h2 class="section-title">Create New Project <a href="#"><i 
class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
         <p>
             You can create new Scala projects in many ways - we'll use SBT
-            to accomplish this task:
+            to accomplish this task. Make sure that <code>build.sbt</code> 
file has the following content:
         </p>
         <pre class="brush: js, highlight: []">
             ThisBuild / version := "0.1.0-SNAPSHOT"
@@ -49,42 +49,37 @@ fa_icon: fa-cube
             lazy val root = (project in file("."))
               .settings(
                 name := "NLPCraft LightSwitch Example",
-                version := "1.0.0",
-                libraryDependencies += "org.apache.nlpcraft" % "nlpcraft" % 
"1.0.0",
+                version := "{{site.latest_version}}",
+                libraryDependencies += "org.apache.nlpcraft" % "nlpcraft" % 
"{{site.latest_version}}",
                 libraryDependencies += "org.scalatest" %% "scalatest" % 
"3.2.14" % "test"
               )
         </pre>
-        <p> Make in prepared project following files: </p>
+        <p><b>NOTE: </b>use the latest versions of Scala and ScalaTest.</p>
+        <p>Create the following files so that resulting project structure 
would look like the following:</p>
         <ul>
             <li><code>lightswitch_model.yaml</code> - YAML configuration file, 
which contains model description.</li>
-            <li><code>LightSwitchScalaModel.scala</code> - scala class, model 
representation.</li>
-            <li><code>NCModelValidationSpec.scala</code> - scala tests class, 
which allows to test your model.</li>
+            <li><code>LightSwitchScalaModel.scala</code> - Scala class, model 
implementation.</li>
+            <li><code>LightSwitchScalaModelSpec.scala</code> - Scala tests 
class, which allows to test your model.</li>
         </ul>
-        <p> Look at the result SBT project files structure below: </p>
-        <pre class="brush: js, highlight: [10, 18, 27]">
-            C:.
-            |   build.sbt
-            |
-            +---project
-            |       build.properties
-            |
-            \---src
-                +---main
-                |   +---resources
-                |   |       lightswitch_model.yaml
-                |   |
-                |   \---scala
-                |       \---demo
-                |               LightSwitchScalaModel.scala
-                |
+        <pre class="brush: plain, highlight: [7, 10, 14]">
+            |  build.sbt
+            +--project
+            |    build.properties
+            \--src
+                +--main
+                |   +--resources
+                |   |  lightswitch_model.yaml
+                |   \--scala
+                |       \--demo
+                |          LightSwitchScalaModel.scala
                 \---test
                     \---scala
                         \---demo
-                                NCModelValidationSpec.scala
+                            LightSwitchScalaModelSpec.scala
         </pre>
     </section>
     <section id="model">
-        <h2 class="section-title">Data Model Description<a href="#"><i 
class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
+        <h2 class="section-title">Data Model<a href="#"><i class="top-link fas 
fa-fw fa-angle-double-up"></i></a></h2>
         <p>
             We are going to start with declaring the static part of our model 
using YAML which we will later load using
             <code>NCModelAdapter</code> in our Scala-based model 
implementation.
@@ -138,14 +133,17 @@ fa_icon: fa-cube
             <li>
                 <code>Lines 10, 17, 25</code> define three model elements: the 
location of the light, and actions to turn
                 the light on and off. Action elements belong to the same group 
<code>act</code> which
-                will be used in our intent, defined in 
<code>LightSwitchScalaModel</code>. Note that these model elements are defined 
mostly
-                through macros we have provided above.
+                will be used in our intent, defined in 
<code>LightSwitchScalaModel</code> class. Note that these model
+                elements are defined mostly through macros we have defined 
above.
             </li>
         </ul>
-        <p>
-            Note that this YAML model elements description is optional and all 
elements definitions can be provided inside
-            Scala model <code>LightSwitchScalaModel</code>.
-        </p>
+        <div class="bq info">
+            <p><b>YAML vs. API</b></p>
+            <p>
+                As usual, this YAML-based static model definition is 
convenient but totally optional. All elements definitions
+                can be provided programmatically inside Scala model 
<code>LightSwitchScalaModel</code> class as well.
+            </p>
+        </div>
     </section>
     <section id="code">
         <h2 class="section-title">Model Class <a href="#"><i class="top-link 
fas fa-fw fa-angle-double-up"></i></a></h2>

Reply via email to