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-website.git
The following commit(s) were added to refs/heads/master by this push:
new 267f2f5 WIP.
267f2f5 is described below
commit 267f2f59be50a4862c83a0147f7a834dce2caf6a
Author: Aaron Radzinski <[email protected]>
AuthorDate: Sat Mar 27 21:26:39 2021 -0700
WIP.
---
_data/news.yml | 2 +-
examples/light_switch.html | 24 +++++++++++++-----------
examples/sql_model.html | 9 +++++----
examples/weather_bot.html | 17 +++++++++++++----
getting-started.html | 4 ++--
relnotes/release-notes-0.7.1.html | 10 +++++-----
server-and-probe.html | 6 ++++--
7 files changed, 43 insertions(+), 29 deletions(-)
diff --git a/_data/news.yml b/_data/news.yml
index 11c8a7f..06406aa 100644
--- a/_data/news.yml
+++ b/_data/news.yml
@@ -87,7 +87,7 @@
- title: 📢 Apache NLPCraft 0.7.2 Released
url: /relnotes/release-notes-0.7.2.html
- excerpt: Download NLPCraft 0.7.2. Over 11 tickets fixed 💪 First full public
release of the new <code>nlpcraft.{sh|cmd}</code> management utility.
+ excerpt: Download NLPCraft 0.7.2. Over 11 tickets fixed 💪 First full public
release of the new <a
href="/tools/script.html"><code>nlpcraft.{sh|cmd}</code></a> management utility.
publish_date: November 19, 2020
avatar_url: images/nlpcraft_logo.png
twitter_id: apachenlpcraft
diff --git a/examples/light_switch.html b/examples/light_switch.html
index 39d6221..5a7b513 100644
--- a/examples/light_switch.html
+++ b/examples/light_switch.html
@@ -128,19 +128,19 @@ intents:
<p>There are number of important points here:</p>
<ul>
<li>
- <code>Line 10</code> defines several macros that are used
later on throughout the model's elements
+ <code>Line 5</code> defines several macros that are used later
on throughout the model's elements
to shorten the synonym declarations. Note how macros coupled
with option groups
shorten overall synonym declarations 1000:1 vs. manually
listing all possible word permutations.
</li>
<li>
- <code>Lines 19, 26, 34</code> define three model elements: the
location of the light, and actions to turn
+ <code>Lines 14, 21, 29</code> define three model elements: the
location of the light, and actions to turn
the light on and off. Note that action elements belong to the
same group <code>act</code> which
will be used in our intent (<code>line 42</code>).
</li>
<li>
- On <code>line 42</code> we define a non-conversational intent
<code>ls</code> that requires
- one action (a token belonging to the group <code>act</code>)
and optional light location - we assume
- all lights by default.
+ On <code>line 37</code> we define a non-conversational intent
<code>ls</code> that requires
+ one action (a token belonging to the group <code>act</code>)
and optional list of light locations
+ (tokens with ID <code>ls:loc</code>) - by default we assume
all lights.
</li>
</ul>
<p>
@@ -151,7 +151,7 @@ intents:
<section id="code">
<h3 class="section-title">Model Class</h3>
<p>
- Open <code>src/main/scala/demo/<b>LightSwitch.scala</b></code>
with the following code:
+ Open <code>src/main/scala/demo/<b>LightSwitch.scala</b></code>
file and replace its content with the following code:
</p>
<pre class="brush: java, highlight: [5, 6, 7, 21, 22, 34]">
package demo
@@ -192,19 +192,20 @@ class LightSwitch extends
NCModelFileAdapter("light_switch.yaml") {
}
</pre>
<p>
- The intent callback logic is very simple - we simply return a
descriptive confirmation message
- back (explaining what lights were changed). With action and
location detected - you can add
+ The intent callback logic is very simple - we return a descriptive
confirmation message
+ back (explaining what lights were changed). With action and
location detected, you can add
the actual light switching using HomeKit or Arduino devices. Let's
review this implementation step by step:
</p>
<ul>
<li>
On <code>line 5</code> our class extends
<code>NCModelFileAdapter</code> that allows us to load most
of the model declaration from the external YAML file and only
provide functionality that we
- couldn't express in declarative portion in JSON.
+ couldn't express in declarative portion in YAML.
</li>
<li>
<code>Line 6</code> annotates method <code>onMatch</code> as a
callback for the intent <code>ls</code>
- when it is detected in the user input.
+ when it is detected in the user input. Note that intent
<code>ls</code> is defined in the <code>light_switch.yaml</code>
+ file that was loaded by <code>NCModelFileAdapter</code> class.
</li>
<li>
Note the line 7 where we use <a target="javadoc"
href="/apis/latest/org/apache/nlpcraft/model/NCIntentSample.html">@NCIntentSample</a>
@@ -262,7 +263,8 @@ class LightSwitch extends
NCModelFileAdapter("light_switch.yaml") {
</p>
<ul>
<li>
- <i style="color: #F39C12" class="fa
fa-exclamation-triangle"></i> REST server is a "fore-and-forget" component that
you generally need to start only once.
+ <i style="color: #F39C12" class="fa
fa-exclamation-triangle"></i> REST server is a "fore-and-forget" component that
you generally need to start only once
+ for this and other examples.
</li>
<li>
Run <code class="script">bin/nlpcraft.sh help
--cmd=start-server</code> to get a full help on this command.
diff --git a/examples/sql_model.html b/examples/sql_model.html
index 385234e..5bb82bd 100644
--- a/examples/sql_model.html
+++ b/examples/sql_model.html
@@ -45,7 +45,7 @@ id: sql_model
Many of modern existing natural language-to-SQL implementations
use variations of
deep learning approach where you first train the neural network on
a pre-created training set and
then get to use the trained network to provide (infer)
probabilistic answers for the new input sentences. Although the latest
- attempts to implement this approach are getting into 90%
percentile of accuracy - they remain largely
+ natural language-to-SQL attempts to implement this approach are
getting into 90% percentile of accuracy - they remain largely
unusable for the vast swath of enterprise applications where
non-deterministic nature of such systems
renders them practically useless. The apparent problem with
non-deterministic systems like that is that the user
never knows whether a given answer is correct or incorrect. In
these use cases users can't tolerate the fact that
@@ -67,7 +67,7 @@ id: sql_model
result without any ambiguity. In other words, if the answer is
given, it is deterministically guaranteed to be correct.
Another positive side-effect of this approach is the fact that
such matching logic is traceable, i.e.
the user can see why given user input was matched against a
certain intent (and not any other). Such
- traceability of the comprehension logic (or explainability vs
"black box" approach resulting from deep
+ traceability of the comprehension logic (or explainability vs
"black box" approach from deep
learning techniques) is often critical for many real-life business
applications.
</p>
<p>
@@ -75,7 +75,7 @@ id: sql_model
domain-specific model
for each SQL database (when dealing with SQL databases). Building
such a
model can be a non-trivial and time consuming experience. That is
where NLPCraft brings a lot of built-in tooling
- and machinery to simplify this task dramatically.
+ to simplify this task dramatically.
</p>
<div class="bq info">
<b>Source Code</b>
@@ -197,7 +197,8 @@ id: sql_model
</p>
<ul>
<li>
- <i style="color: #F39C12" class="fa
fa-exclamation-triangle"></i> REST server is a "fore-and-forget" component that
you generally need to start only once.
+ <i style="color: #F39C12" class="fa
fa-exclamation-triangle"></i> REST server is a "fore-and-forget" component
+ that you generally need to start only once for this and any
other examples.
</li>
<li>
Run <code class="script">bin/nlpcraft.sh help
--cmd=start-server</code> to get a full help on this command.
diff --git a/examples/weather_bot.html b/examples/weather_bot.html
index 9d711d0..d9b3f75 100644
--- a/examples/weather_bot.html
+++ b/examples/weather_bot.html
@@ -168,6 +168,15 @@ id: weather_bot
and third sentences.
</dd>
</dl>
+ <div class="bq info">
+ <p><b>Temporal <i class="amp">&</i> Geographical
Ambiguity</b></p>
+ <p>
+ Despite seeming triviality of these ambiguities for the human
comprehension, these represent a significant problem
+ for the most deep learning neural networks unless specifically
trained to resolve these particular cases. Procedural
+ (deterministic) approach - as shown below - often yields a
dramatically simpler and more robust solution, albeit the
+ one that works only in a specific context.
+ </p>
+ </div>
<p>
Open <code>src/main/java/demo/<b>Weather.java</b></code> file and
replace its content with the
following code:
@@ -245,10 +254,10 @@ public class Weather extends NCModelFileAdapter {
@NCIntent(
"intent=req " +
- "term~{tok_id() == 'wt:phen'}+ " + // One or more weather phenomenon
(at least is mandatory).
- "term(ind)~{has(tok_groups(), 'indicator')}* " + // Optional indicator
words (zero or more).
- "term(city)~{tok_id() == 'nlpcraft:city'}? " + // Optional city.
- "term(date)~{tok_id() == 'nlpcraft:date'}?" // Optional date
(overrides indicator words).
+ " term~{tok_id() == 'wt:phen'}* " + // Zero or more weather
phenomenon.
+ " term(ind)~{has(tok_groups(), 'indicator')}* " + // Optional
indicator words (zero or more).
+ " term(city)~{tok_id() == 'nlpcraft:city'}? " + // Optional city.
+ " term(date)~{tok_id() == 'nlpcraft:date'}?" // Optional date
(overrides indicator words).
)
@NCIntentSample({
"What's the local weather forecast?",
diff --git a/getting-started.html b/getting-started.html
index 80f07bb..a49e8a3 100644
--- a/getting-started.html
+++ b/getting-started.html
@@ -89,13 +89,13 @@ id: getting_started
<section id="querying">
<h2 class="section-title">Weather Forecast</h2>
<p>
- We'll be testing <a target="github"
href="https://github.com/apache/incubator-nlpcraft/tree/master/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/weather">Weather
Example</a>
+ We'll be testing <a href="/examples/weather_bot.html">Weather
Example</a>
to ask questions about weather forecast using REST APIs. This
example returns a JSON weather
data for variety of different inquiries about the past, present or
future weather conditions.
</p>
<p>
We will be using NLPCraft CLI script to issue REST calls. Let's
start NLPCraft CLI in interactive REPL mode
- by running <code>nlpcraft.{sh|cmd}</code> script with no argument:
+ by running <a
href="/tools/script.html"><code>nlpcraft.{sh|cmd}</code></a> script with no
argument:
</p>
<nav>
<div class="nav nav-tabs" role="tablist">
diff --git a/relnotes/release-notes-0.7.1.html
b/relnotes/release-notes-0.7.1.html
index c22f1bc..f74a0e5 100644
--- a/relnotes/release-notes-0.7.1.html
+++ b/relnotes/release-notes-0.7.1.html
@@ -31,12 +31,12 @@ layout: release-notes
<ul>
<li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-108'>NLPCRAFT-108</a> -
Create 'nlpcraft' CLI tool.</li>
<li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-139'>NLPCRAFT-139</a> -
Update LICENSE/NOTICE for <code>NCBlowfishHasher</code> implementation.</li>
- <li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-140'>NLPCRAFT-140</a> -
Add removal of <coed>${USER_HOME}/.nlpcraft</coed> to 'pre-clean' phase of
'clean' Maven lifecycle.</li>
+ <li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-140'>NLPCRAFT-140</a> -
Add removal of <code>${USER_HOME}/.nlpcraft</code> to 'pre-clean' phase of
'clean' Maven lifecycle.</li>
<li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-148'>NLPCRAFT-148</a> -
Add auto version update notifier.</li>
- <li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-155'>NLPCRAFT-155</a> -
Create 'sugsyn' command for <code>nlpcraft.{sh|cmd}</code> script.</li>
- <li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-156'>NLPCRAFT-156</a> -
Create 'signin' command for <code>nlpcraft.{sh|cmd}</code> script.</li>
- <li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-157'>NLPCRAFT-157</a> -
Create 'signout' command for <code>nlpcraft.{sh|cmd}</code> script.</li>
- <li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-158'>NLPCRAFT-158</a> -
Create 'ask' command for <code>nlpcraft.{sh|cmd}</code> script.</li>
+ <li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-155'>NLPCRAFT-155</a> -
Create 'sugsyn' command for <a
href="/tools/script.html"><code>nlpcraft.{sh|cmd}</code></a> script.</li>
+ <li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-156'>NLPCRAFT-156</a> -
Create 'signin' command for <a
href="/tools/script.html"><code>nlpcraft.{sh|cmd}</code></a> script.</li>
+ <li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-157'>NLPCRAFT-157</a> -
Create 'signout' command for <a
href="/tools/script.html"><code>nlpcraft.{sh|cmd}</code></a> script.</li>
+ <li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-158'>NLPCRAFT-158</a> -
Create 'ask' command for <a
href="/tools/script.html"><code>nlpcraft.{sh|cmd}</code></a> script.</li>
<li><a target="jira"
href='https://issues.apache.org/jira/browse/NLPCRAFT-159'>NLPCRAFT-159</a> -
Improve README on Github website.</li>
</ul>
</section>
diff --git a/server-and-probe.html b/server-and-probe.html
index 4df3ee8..b23cd4c 100644
--- a/server-and-probe.html
+++ b/server-and-probe.html
@@ -181,7 +181,8 @@ id: server_and_probe
</p>
<ul>
<li>
- <code>nlpcraft.{sh|cmd}</code> script automatically uses
<code>-Xms1024m</code> for <code>start-server</code> command.
+ <<a
href="/tools/script.html"><code>nlpcraft.{sh|cmd}</code></a> script
automatically uses
+ <code>-Xms1024m</code> for <code>start-server</code> command.
</li>
</ul>
<p>
@@ -212,7 +213,8 @@ id: server_and_probe
</p>
<ul>
<li>
- <code>nlpcraft.{sh|cmd}</code> script automatically uses these
options for <code>start-server</code> command.
+ <a
href="/tools/script.html"><code>nlpcraft.{sh|cmd}</code></a> script
automatically uses
+ these options for <code>start-server</code> command.
</li>
</ul>
</section>