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 2021/06/05 04:44:45 UTC

[incubator-nlpcraft-website] branch web-site updated: Update.

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

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


The following commit(s) were added to refs/heads/web-site by this push:
     new 6681125  Update.
6681125 is described below

commit 6681125cfa9e6869349da8d5ab0020d8912008df
Author: Aaron Radzinski <ar...@apache.org>
AuthorDate: Fri Jun 4 21:44:36 2021 -0700

    Update.
---
 assets/css/style.css                               |   2 +-
 assets/css/style.css.map                           |   4 +-
 blogs.html                                         |   2 +-
 blogs/nlpcraft-idl-intent-definition-language.html |  93 +++++++++++++++++++++
 download.html                                      |   8 +-
 feed.xml                                           |   2 +-
 first-example.html                                 |   2 +-
 images/ru-flag-16.png                              | Bin 0 -> 1250 bytes
 images/ru-flag-24.png                              | Bin 0 -> 1342 bytes
 index.html                                         |   2 +-
 intent-matching.html                               |   8 +-
 11 files changed, 109 insertions(+), 14 deletions(-)

diff --git a/assets/css/style.css b/assets/css/style.css
index 10854bd..c5fd1fb 100644
--- a/assets/css/style.css
+++ b/assets/css/style.css
@@ -1,3 +1,3 @@
-@font-face{font-family:'CanaroBlack';src:url("../../fonts/rene_bieder_-_canaro_black-webfont.eot");src:url("../../fonts/rene_bieder_-_canaro_black-webfont.eot?#iefix") format("embedded-opentype"),url("../../fonts/rene_bieder_-_canaro_black-webfont.woff") format("woff"),url("../../fonts/rene_bieder_-_canaro_black-webfont.ttf") format("truetype"),url("../../fonts/rene_bieder_-_canaro_black-webfont.svg#canaroblack") format("svg");font-weight:normal;font-style:normal}@font-face{font-family:' [...]
+@font-face{font-family:'CanaroBlack';src:url("../../fonts/rene_bieder_-_canaro_black-webfont.eot");src:url("../../fonts/rene_bieder_-_canaro_black-webfont.eot?#iefix") format("embedded-opentype"),url("../../fonts/rene_bieder_-_canaro_black-webfont.woff") format("woff"),url("../../fonts/rene_bieder_-_canaro_black-webfont.ttf") format("truetype"),url("../../fonts/rene_bieder_-_canaro_black-webfont.svg#canaroblack") format("svg");font-weight:normal;font-style:normal}@font-face{font-family:' [...]
 
 /*# sourceMappingURL=style.css.map */
\ No newline at end of file
diff --git a/assets/css/style.css.map b/assets/css/style.css.map
index 2a2f6c2..c6fa199 100644
--- a/assets/css/style.css.map
+++ b/assets/css/style.css.map
@@ -29,7 +29,7 @@
 		"/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License.  You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\ [...]
 		"/*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements.  See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the \"License\"); you may not use this file except in compliance with\r\n * the License.  You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/ [...]
 		"/*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements.  See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the \"License\"); you may not use this file except in compliance with\r\n * the License.  You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/ [...]
-		"/*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements.  See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the \"License\"); you may not use this file except in compliance with\r\n * the License.  You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/ [...]
+		"/*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements.  See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the \"License\"); you may not use this file except in compliance with\r\n * the License.  You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/ [...]
 		"/*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements.  See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the \"License\"); you may not use this file except in compliance with\r\n * the License.  You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/ [...]
 		"/*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements.  See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the \"License\"); you may not use this file except in compliance with\r\n * the License.  You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/ [...]
 		"/*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements.  See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the \"License\"); you may not use this file except in compliance with\r\n * the License.  You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/ [...]
@@ -50,5 +50,5 @@
 		"/*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements.  See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the \"License\"); you may not use this file except in compliance with\r\n * the License.  You may obtain a copy of the License at\r\n *\r\n *      http://www.apache.org/licenses/ [...]
 	],
 	"names": [],
-	"mappings": "ACiBA,UAAU,CACN,WAAW,CAAE,aAAa,CAC1B,GAAG,CAAE,yDAAyD,CAC9D,GAAG,CAAE,gEAAgE,CAAC,2BAA2B,CAC7F,0DAA0D,CAAC,cAAc,CACzE,yDAAyD,CAAC,kBAAkB,CAC5E,qEAAqE,CAAC,aAAa,CACvF,WAAW,CAAE,MAAM,CACnB,UAAU,CAAE,MAAM,CAGtB,UAAU,CACN,WAAW,CAAE,YAAY,CACzB,GAAG,CAAE,wDAAwD,CAC7D,GAAG,CAAE,+DAA+D,CAAC,2BAA2B,CAC5F,yDAAyD,CAAC,cAAc,CACxE,wDAAwD,CAAC,kBAAkB,CAC3E,wEAAwE,CAAC,aAAa,CAC1F,WAAW,CAAE,MAAM,CACnB,UAAU,CAAE,MAAM,CAGtB,UAAU,CACN,WAAW,CAAE,YAAY,CACzB,GAAG,CAAE,wDAAwD,CAC7D,GAAG,CAAE,+DAA [...]
+	"mappings": "ACiBA,UAAU,CACN,WAAW,CAAE,aAAa,CAC1B,GAAG,CAAE,yDAAyD,CAC9D,GAAG,CAAE,gEAAgE,CAAC,2BAA2B,CAC7F,0DAA0D,CAAC,cAAc,CACzE,yDAAyD,CAAC,kBAAkB,CAC5E,qEAAqE,CAAC,aAAa,CACvF,WAAW,CAAE,MAAM,CACnB,UAAU,CAAE,MAAM,CAGtB,UAAU,CACN,WAAW,CAAE,YAAY,CACzB,GAAG,CAAE,wDAAwD,CAC7D,GAAG,CAAE,+DAA+D,CAAC,2BAA2B,CAC5F,yDAAyD,CAAC,cAAc,CACxE,wDAAwD,CAAC,kBAAkB,CAC3E,wEAAwE,CAAC,aAAa,CAC1F,WAAW,CAAE,MAAM,CACnB,UAAU,CAAE,MAAM,CAGtB,UAAU,CACN,WAAW,CAAE,YAAY,CACzB,GAAG,CAAE,wDAAwD,CAC7D,GAAG,CAAE,+DAA [...]
 }
\ No newline at end of file
diff --git a/blogs.html b/blogs.html
index dca1b7f..93734a6 100644
--- a/blogs.html
+++ b/blogs.html
@@ -15,4 +15,4 @@
  limitations under the License.
 -->
 
-<!doctype html><html lang="en"> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-180663034-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-180663034-1'); </script><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="An open sourc [...]
+<!doctype html><html lang="en"> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-180663034-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-180663034-1'); </script><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="An open sourc [...]
diff --git a/blogs/nlpcraft-idl-intent-definition-language.html b/blogs/nlpcraft-idl-intent-definition-language.html
new file mode 100644
index 0000000..47d522d
--- /dev/null
+++ b/blogs/nlpcraft-idl-intent-definition-language.html
@@ -0,0 +1,93 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!doctype html><html lang="en"> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-180663034-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-180663034-1'); </script><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="An open sourc [...]
+        intent=xa
+           flow="^(?:login)(^:logout)*$"
+           meta={'enabled': true}
+           term(a)={!(tok_id()) != "z"}[1,3]
+           term(b)={
+              meta_intent('enabled') == true && // Must be active.
+              month() == 1 // January.
+           }
+           term(c)~{
+                // Variables.
+                @tokId = tok_id()
+                @usrTypes = meta_model('user_types')
+
+                // Predicate.
+                (tokId == 'order' || tokId == 'order_cancel') &&
+                has_all(@usrTypes, list(1, 2, 3) &&
+                abs(meta_tok('order:size')) > 10)
+    </pre><p><b>NOTES:</b></p><ul class="fixed"><li> The intent name is <code>xa</code>.<li> The intent contains three terms. Term is an element that defines a predicate, each of which must pass for the intent to be selected:<ul class="fixed"><li> <code>term(a)</code> - the parsed request must contain between one and three tokens with identifiers other than <code>z</code>, without taking into account data from the dialogue history (term type <code>=</code>).<li> <code>term(b)</code> - th [...]
+        intent=xb
+           flow=/#flowModelMethod/
+           ordered=true
+           term(a)=/org.mypackage.MyClass#termMethod/?
+           fragment(frag)
+    </pre><p><b>NOTES:</b></p><ul class="fixed"><li> The intent name is <code>xb</code>.<li> <code>term(a)</code> The intent can contain one optional term (<code>?</code> quantifier, detailed explanations will be given below), defined in the code - <code>org.mypackage.MyClass#termMethod</code> method.<li> <code>fragment(frag)</code> Fragment with identifier <code>frag</code> extends the list of terms of the intent with additional terms that are defined elsewhere (in <code>fragment</code> [...]
+        import('http://mysite.com/nlp/idls/external.idl)
+    </pre><b><code>fragment</code> Statement</b><p> It contains the <code>fragment</code> keyword with the name and a list of terms. Terms can be parameterized. An example of a simple fragment:</p><pre class="brush: idl">
+        fragment=buzz term~{tok_id() == 'x:alarm'}
+    </pre><p> An example of a parameterized fragment with arguments <code>a</code> and <code>b</code>:</p><pre class="brush: idl">
+        fragment=p1
+        term={
+            meta_frag('a') &&
+            has_any(get(meta_frag('b'), 'Москва'), list(1, 2))
+        }
+    </pre><p> Below is an example of using this fragment in an intent. Note that fragment’s parameters (its metadata) is passed using JSON format:</p><pre class="brush: idl">
+        intent=i1
+        fragment(p1, {'a': true, 'b': {'Москва': [1, 2, 3]}})
+    </pre><b><code>intent</code> Statement</b><p> This statement is the core element of IDL allowing to declare the intent. Here's the example of the simple intent:</p><pre class="brush: idl">
+        intent=xa
+           flow="^(?:login)(^:logout)*$"
+           meta={'enabled': true}
+           term(a)={!(tok_id()) != "z"}[1,3]
+    </pre><p> Every intent statement consists of the following elements:</p><ul class="fixed"><li><p><b>Intent Name</b></p><p> Required element. The name is a unique identifier within the model. Below is an example of using a reference to the <code>xa</code> intent.</p><pre class="brush: java">
+                @NCIntentRef("xa")
+                fun onTimeMatch(
+                    ctx: NCIntentMatch,
+                    @NCIntentTerm("a") tok: NCToken
+                ): NCResult { ... }
+            </pre><li><p><b>Intent Terms</b></p><p> At least one term is required. Term is the main element of the intent definition. Term consists of the predicate over a token (term body). The constituent parts of the predicate can be based on the token or on some other factors.</p><p> Here's how an intent's term is defined:</p><ul class="fixed"><li>The <code>term</code> keyword. Required element.<li> Name in parentheses. Optional. Used to create references to the found token in the ca [...]
+                        term(nums)~{tok_id() == 'nlpcraft:num'} // Conversational '~' term.
+                        term(nums)={tok_id() != 'z'} // Non-conversational '=' term.
+                    </pre><li><p> The term body. Required element. There are two ways to define the term body: using IDL script with built-in functions or in external Java-based code:</p><pre class="brush: idl">
+                        term(nums)={tok_id() == 'nlpcraft:num'} // IDL script.
+                        term(yes)~{true} // IDL script.
+                        term~/org.mypackage.MyClass#termMethod/? // Reference to external code.
+                    </pre><p> Note the special syntax for the last term. The existing set of built-in functions are typically enough to define many terms of the intent. But, if necessary, the programmer can create her own predicates in Java, Scala, Kotlin, Groovy or any other Java based language and write them in the term body. That is, NLPCraft IDL can have snippets of code written entirely in other languages:</p><pre class="brush: idl">
+                        term~/org.mypackage.MyClass#termMethod/? // Reference to external code.
+                    </pre><p> This function <code>termMethod</code> receives an argument that contains all the necessary data on the user's request, and as the output it should return the value of a specific type.</p><li><p> Quantifier. Optional. The default value is <code>[1, 1]</code>. The following types of quantifiers are supported:</p><ul class="fixed"><li><code>[M, N]</code> - the term must be found from <code>N</code> to <code>M</code> times.<li><code>*</code> - the term must be f [...]
+                        term(nums)={tok_id() == 'nlpcraft:num'}[1,2] // The request must contain one or two tokens with the ID “nlpcraft: num”.
+                        term(nums)={tok_id() == 'nlpcraft:num'}* // The request must contain zero or more tokens with the ID “nlpcraft: num”.
+                    </pre></ul><li><p><b>IDL Built-In Functions</b></p><p> NLPCraft IDL provides over 140 <a href="/intent-matching.html#idl_functions">built-in functions</a> that can be used in term definition. These functions can be conventionally classified into the following categories:</p><ul class="fixed"><li>Based on base tokens properties - token IDs, groups, parent, hierarchy, etc. Examples: <code>tok_id()</code>, <code>tok_groups()</code>, <code>tok_parent()</code>.<li>NLP-base [...]
+                term(t2)={
+                    @a = meta_model('a')
+                    @list = list(1, 2, 3, 4)
+
+                    (@a == 42 || @a == 44) && has_all(@list, list(3, 2))
+                }
+            </pre><p> Local variables are defined and used with the special prefix <code>@</code>. They used to avoid repeated computations and shortening/simplifying of the IDL term predicate expressions.</p><li><p><b>Intent Fragments</b></p><p> Fragment is a named set of terms that is created to be reusable across intents. See example by following this <a href="/intent-matching.html#idl">link</a>.</p><li><p><b>Intent Flow</b></p><p> Here we define an additional intent selection rule ba [...]
+                flow="^(?:login)(^:logout)*$"
+            </pre><p> This rule means that for the intent to be matched, it is necessary that within the current session the intent with the <code>login</code> identifier has already been matched before, and not with identifier <code>logout</code>.</p><p> If it is necessary to define more complex logic, it can also be moved into user code written in any Java-based language, like the term body:</p><pre class="brush: scala">
+                @NCIntent("intent=x
+                    flow=/com.company.dialog.Flow#customFlow/
+                    term~{tok_id() == 'some_id'}"
+                )
+                def onX(): NCResult = { .. }
+            </pre><p> The predicate defined in the method <code>customFlow()</code> receives at the input a list with all intents information, previously matched within the current session, and returns a boolean value.</p><li><p><b>Intent Metadata</b></p><p> Optional element. A additional dataset that can be used by term predicates presented in JSON format.</p><li><p><b>Ordered Flag</b></p><p> Optional element. The default is <code>false</code>. Defines whether or not the order of the te [...]
diff --git a/download.html b/download.html
index d922040..df67945 100644
--- a/download.html
+++ b/download.html
@@ -51,15 +51,15 @@
             </pre><div class="bq warn"><p> <b>GitHub vs. Apache Release</b></p><p> Note that cloned GitHub repository is NOT an official Apache release and it does not come with the guarantees made by the official <a href="#src">Apache release</a> in terms of the licensing. GitHub repository may include content not licensed under ASL 2.0. Only the official <a href="#src">Apache source release</a> is guaranteed to be cleanly licensed under ASL 2.0.</p></div></section><section id="java-cli [...]
                     &lt;dependency&gt;
                         &lt;groupId&gt;org.apache.nlpcraft&lt;/groupId&gt;
-                        &lt;artifactId&gt;nlpcraft-java-client&lt;/artifactId&gt;
+                        &lt;artifactId&gt;java-client&lt;/artifactId&gt;
                         &lt;version&gt;0.7.5&lt;/version&gt;
                     &lt;/dependency&gt;
                     </pre></div><div class="tab-pane fade" id="nav-java-client-grape" role="tabpanel"><pre class="brush: java">
-                    @Grab ('org.apache.nlpcraft:nlpcraft-java-client:0.7.5')
+                    @Grab ('org.apache.nlpcraft:java-client:0.7.5')
                     </pre></div><div class="tab-pane fade" id="nav-java-client-gradle" role="tabpanel"><pre class="brush: java">
                     dependencies {
-                        runtime group: 'org.apache.nlpcraft', name: 'nlpcraft-java-client', version: '0.7.5'
+                        runtime group: 'org.apache.nlpcraft', name: 'java-client', version: '0.7.5'
                     }
                     </pre></div><div class="tab-pane fade" id="nav-java-client-sbt" role="tabpanel"><pre class="brush: scala">
-                    libraryDependencies += "org.apache.nlpcraft" % "nlpcraft-java-client" % "0.7.5"
+                    libraryDependencies += "org.apache.nlpcraft" % "java-client" % "0.7.5"
                     </pre></div></div><div class="bq info"><p> <b>Latest Version</b></p><p> <code>0.7.5</code> is the latest Java Client version. You can replace it with a desired version.</p></div></section></div><div class="col-md-2 third-column"><ul class="side-nav"><li class="side-nav-title">On This Page<li><a href="#src">Source Release</a><li><a href="#zip">Binary Release</a><li><a href="#build">Building Binaries</a><li><a href="#verification">Verification</a><li><a href="#maven">Ma [...]
diff --git a/feed.xml b/feed.xml
index 98e846c..23a8981 100644
--- a/feed.xml
+++ b/feed.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.1.1">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2021-05-25T08:22:57-07:00</updated><id>http://localhost:4000/feed.xml</id><title type="html">Apache NLPCraft</title></feed>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.1.1">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2021-06-04T21:39:47-07:00</updated><id>http://localhost:4000/feed.xml</id><title type="html">Apache NLPCraft</title></feed>
\ No newline at end of file
diff --git a/first-example.html b/first-example.html
index 0615698..7d831c4 100644
--- a/first-example.html
+++ b/first-example.html
@@ -190,5 +190,5 @@ class LightSwitchKotlinModel : NCModelFileAdapter("lightswitch_model.yaml") {
         </pre></section><section id="server"><h2 class="section-title">Start Server <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2><p> Start local REST server, if it hasn't been started already:</p><nav><div class="nav nav-tabs" role="tablist"> <a class="nav-item nav-link active" data-toggle="tab" href="#nav-srv-cmd" role="tab">Command</a> <a class="nav-item nav-link" data-toggle="tab" href="#nav-srv-out" role="tab">Output <i class="fa fa-desktop output"></i></ [...]
                     $ bin/nlpcraft.sh start-server
                 </pre></div><div class="tab-pane fade show" id="nav-srv-out" role="tabpanel"><p></p><p> <img class="img-fluid" alt="" src="/images/first_example_fig2.png"></p></div></div></section><section id="test"><h2 class="section-title">Testing <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2><p> Recall the <a target="javadoc" href="/apis/latest/org/apache/nlpcraft/model/NCIntentSample.html">@NCIntentSample</a> annotation we have used in our code next to int [...]
-                    $ bin/nlpcraft.sh test-model --cp=~/LightSwitch/target/classes --mdls=demo.LightSwitch
+                    $ bin/nlpcraft.sh test-model --cp=~/LightSwitch/target/classes --mdls=demo.LightSwitchModel
                 </pre></div><div class="tab-pane fade show" id="nav-test-out" role="tabpanel"><p></p><p> <img style="max-width: 910px !important;" class="img-fluid" alt="" src="/images/first_example_fig4.png"></p></div></div></section><section><h2 class="section-title">Congratulation! 👌 <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2><p> You've created your first data model, started the REST server and tested the model using built-in model auto-validator.</p></s [...]
diff --git a/images/ru-flag-16.png b/images/ru-flag-16.png
new file mode 100644
index 0000000..15a0078
Binary files /dev/null and b/images/ru-flag-16.png differ
diff --git a/images/ru-flag-24.png b/images/ru-flag-24.png
new file mode 100644
index 0000000..c43b0d7
Binary files /dev/null and b/images/ru-flag-24.png differ
diff --git a/index.html b/index.html
index eb70347..87ca8aa 100644
--- a/index.html
+++ b/index.html
@@ -15,4 +15,4 @@
  limitations under the License.
 -->
 
-<!doctype html><html lang="en"> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-180663034-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-180663034-1'); </script><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="An open sourc [...]
+<!doctype html><html lang="en"> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-180663034-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-180663034-1'); </script><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="An open sourc [...]
diff --git a/intent-matching.html b/intent-matching.html
index c480b1e..9ef1c6a 100644
--- a/intent-matching.html
+++ b/intent-matching.html
@@ -15,8 +15,10 @@
  limitations under the License.
 -->
 
-<!doctype html><html lang="en"> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-180663034-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-180663034-1'); </script><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="An open sourc [...]
-            intent=x term(a)~{tok_id() == 'my_elm'} term(b)={has(tok_groups(), "my_group")}
+<!doctype html><html lang="en"> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-180663034-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-180663034-1'); </script><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="An open sourc [...]
+            intent=x
+                term(a)~{tok_id() == 'my_elm'}
+                term(b)={has(tok_groups(), "my_group")}
         </pre><p> IDL intent defines a match between the parsed input utterance, i.e. the collection of <a class="not-code" target="javadoc" href="/apis/latest/org/apache/nlpcraft/model/NCToken.html">tokens</a>, and the user-define callback method. To accomplish that, IDL through its <a href="#idl_functions">functions</a> provides access to the following information:</p><ul><li> Basic <a class="not-code" target="javadoc" href="/apis/latest/org/apache/nlpcraft/model/NCToken.html">token pr [...]
                     intent=xa
                         flow="^(?:login)(^:logout)*$"
@@ -518,7 +520,7 @@ or_else(meta_model('some_prop'), @dflt)
                     }
                 ],
                 "intents": [
-                    "intent=alarm term~{tok_id()=='x:alarm'} term(nums)~{tok_id()=='nlpcraft:num' && ~nlpcraft:num:unittype=='datetime' && ~nlpcraft:num:isequalcondition==true}[0,7]"
+                    "intent=alarm term~{tok_id()=='x:alarm'} term(nums)~{tok_id() == 'nlpcraft:num' && meta_tok('nlpcraft:num:unittype') == 'datetime' && meta_tok('nlpcraft:num:isequalcondition') == true}[0,7]"
                 ]
             }
         </pre><pre class="brush: java, highlight: [1]">