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 9c0b4a3 WIP.
9c0b4a3 is described below
commit 9c0b4a3af9f6c9c6d0f47c305e771f921d0620a6
Author: Aaron Radzinski <[email protected]>
AuthorDate: Tue Jan 5 11:25:02 2021 -0800
WIP.
---
_scss/three-cols.scss | 2 +-
docs.html | 14 ++--
getting-started.html | 148 +++++++++++-----------------------------
images/getting_started_fig1.png | Bin 0 -> 89779 bytes
images/getting_started_fig2.png | Bin 0 -> 55077 bytes
images/getting_started_fig3.png | Bin 0 -> 52237 bytes
tools/script.html | 65 +++++++++++++-----
use-cases.html | 4 +-
8 files changed, 96 insertions(+), 137 deletions(-)
diff --git a/_scss/three-cols.scss b/_scss/three-cols.scss
index e18d5fa..56960b3 100644
--- a/_scss/three-cols.scss
+++ b/_scss/three-cols.scss
@@ -77,7 +77,7 @@
.section-sub-title {
color: $color-slack2;
font-weight: 700;
- margin-top: 0;
+ margin-top: 25px;
display: block;
font-size: 110%;
margin-bottom: 5px;
diff --git a/docs.html b/docs.html
index 952b77a..cffef50 100644
--- a/docs.html
+++ b/docs.html
@@ -33,13 +33,13 @@ id: overview
</p>
<p>
One of the key features of NLPCraft is its use of advance semantic
modelling that is tailor made for
- domain-specific natural language interface. It doesn't require
traditional ML
- approach involving model training or corpora development leading
to much <em>simpler <span class="amp">&</span> faster</em>
+ domain-specific natural language interface. It doesn't force
developers to use direct ML/DL
+ approach involving time consuming model training or corpora
development leading to much <em>simpler <span class="amp">&</span> faster</em>
implementation.
</p>
<p>
- Another key aspect of NLPCraft is its singular focus on processing
English language. Although it may sound
- counterintuitive, this narrow focus enables NLPCraft to deliver
unprecedented ease of use combined with
+ Another key aspect of NLPCraft is its focus on processing English
language. Although it may sound
+ counterintuitive, this narrower focus enables NLPCraft to deliver
unprecedented ease of use combined with
unparalleled comprehension capabilities for English input
out-of-the-box. It's been shown that
support for multiple languages in a single framework leads to
either watered down functionality or overly
complicated configuration, training and usage. It's also important
to note that English language is spoken by more
@@ -73,7 +73,7 @@ id: overview
<p>
Typically, declarative portion of the model will be stored in a
separate JSON or YAML file
for simpler maintenance. There are no practical limitation on how
complex or simple a model
- can be, or what other tools it can use. Data models use <a
href="/intent-matching.html">intent-based matching</a>
+ can be, or what other tools it can use. Data models use
comprehensive <a href="/intent-matching.html">intent-based matching</a>
provided by NLPCraft out-of-the-box.
</p>
<p>
@@ -83,7 +83,7 @@ id: overview
<section id="data-probe">
<h3 class="section-title">Data Probe</h3>
<p>
- Data probe is a light-weight container application designed to
securely deploy and manage data models.
+ Data probe is a light-weight container designed to securely deploy
and manage data models.
Each probe can deploy and manage multiple models and many probes
can be connected to the REST server (or a cluster of REST servers).
The main purpose of the data probe is to separate data model
hosting from managing REST calls from the clients.
While you would typically have just one REST server, you may have
multiple data probes deployed
@@ -106,7 +106,7 @@ id: overview
<p>
Unlike data probe that gets restarted every time the model is
changed, i.e. during development, the
REST server is a "start-and-forget" component that can be launched
once while various data probes can
- continuously reconnect to it. It can typically run as a Docker
image locally on premise or on the cloud.
+ continuously reconnect to it. It can typically run as a Docker
image locally on premise or in the cloud.
</p>
<p>
Learn more about <a href="data-model.html">data model</a>,
diff --git a/getting-started.html b/getting-started.html
index 9c61986..c3b3906 100644
--- a/getting-started.html
+++ b/getting-started.html
@@ -28,7 +28,8 @@ id: getting_started
In this section we'll take a quick 10 minutes look at running and
testing <a
href="https://github.com/apache/incubator-nlpcraft/tree/master/nlpcraft/src/main/scala/org/apache/nlpcraft/examples"
target="github">examples</a>
shipped with NLPCraft along with
- running the main components of NLPCraft - data probe and REST
server. We assume the following:
+ running the main components of NLPCraft - data probe and REST
server - using <code>nlpcraft.{sh|cmd}</code> script.
+ We assume the following:
</p>
<ul>
<li>You <a href="/download.html">downloaded</a> NLPCraft
{{site.latest_version}} as a ZIP archive.</li>
@@ -43,9 +44,20 @@ id: getting_started
cluster of servers) is used to accept client REST calls and route
them to the data model deployed on data probes.
</p>
<p>
- Both data probe and the REST server start the same way. NLPCraft
ships with all-inclusive
- single executable JAR file. We'll use command line to start the
both.
- Open two console windows and start server first and then data
probe by typing these commands:
+ Data probe and REST server are both Java applications and
therefore can be started in many different ways.
+ In this quick tutorial, we'll use <code>nlpcraft.{sh|cmd}</code>
script that comes with NLPCraft and acts as a central management
+ utility responsible for executing most of the routine tasks in
NLPCraft in most simple and productive way.
+ </p>
+ <p>
+ To start REST server and data probe (with default configurations)
let's execute following two commands one
+ after another:
+ </p>
+ <pre class="brush: bash">
+ $ bin/nlpcraft.sh start-server
+ $ bin/nlpcraft.sh start-probe
+ </pre>
+ <p>
+ ...and you will get the following output:
</p>
<nav>
<div class="nav nav-tabs" role="tablist">
@@ -55,109 +67,14 @@ id: getting_started
</nav>
<div class="tab-content">
<div class="tab-pane fade show active" id="nav-srv-start"
role="tabpanel">
- <pre class="brush: plain">
- $ cd build
- $ java -jar
apache-nlpcraft-incubating-{{site.latest_version}}-all-deps.jar -server
- </pre>
-<!-- <p>-->
-<!-- Alternatively, you can can also start it via Docker:-->
-<!-- </p>-->
-<!-- <pre class="brush: plain">-->
-<!-- $ docker run -m 8G -p 8081:8081 -p 8201:8201 -p
8202:8202 nlpcraftserver/server:{{site.latest_version}}-->
-<!-- </pre>-->
- <p>
- REST server starts with default configuration
(<code>nlpcraft.conf</code> and
- <code>ignite.xml</code> files located in the same folder
as <code>apache-nlpcraft-incubating-{{site.latest_version}}-all-deps.jar</code>
- file). You should see the output similar to this:
+ <p style="margin-top: 15px">
+ <img class="non-fluid-img"
src="/images/getting_started_fig1.png" alt="">
</p>
- <pre class="brush: plain">
- _ ____ ______ ______
- / | / / /___ / ____/________ _/ __/ /_
- / |/ / / __ \/ / / ___/ __ `/ /_/ __/
- / /| / / /_/ / /___/ / / /_/ / __/ /_
- /_/ |_/_/ .___/\____/_/ \__,_/_/ \__/
- /_/
-
- Server
- Version: {{site.latest_version}}
- Copyright (C) 2021 Apache Software Foundation.
-
- ...
-
- +-------------------------+
- | Server started [19.35s] |
- +-------------------------+
-
-
- Mar-11 23:21:04 [INFO ] REST server is listening on
'localhost:8081'.
- </pre>
</div>
<div class="tab-pane fade show" id="nav-probe-start"
role="tabpanel">
- <pre class="brush: plain">
- $ cd build
- $ java -jar
apache-nlpcraft-incubating-{{site.latest_version}}-all-deps.jar -probe
- </pre>
- <p>
- Data probe starts with default configuration (file
<code>nlpcraft.conf</code> located in the same folder
- as
<code>apache-nlpcraft-incubating-{{site.latest_version}}-all-deps.jar</code>
file) that deploys
- all example models shipped with NLPCraft. You should see
the output similar to this:
+ <p style="margin-top: 15px">
+ <img class="non-fluid-img"
src="/images/getting_started_fig2.png" alt="">
</p>
- <pre class="brush: plain">
- _ ____ ______ ______
- / | / / /___ / ____/________ _/ __/ /_
- / |/ / / __ \/ / / ___/ __ `/ /_/ __/
- / /| / / /_/ / /___/ / / /_/ / __/ /_
- /_/ |_/_/ .___/\____/_/ \__,_/_/ \__/
- /_/
-
- Data Probe
- Version: {{site.latest_version}}
- Copyright (C) 2021 Apache Software Foundation.
-
- Mar-11 23:25:52 [INFO ] Probe Configuration:
-
+-------------------------------------------------------------------------+
- | Probe ID | all.examples
|
- | Probe Token | 3141592653589793
|
- | API Version | 0.7.0, 2020-09-29
|
- | Down-Link | localhost:8202
|
- | Up-Link | localhost:8201
|
-
+-------------+-----------------------------------------------------------+
- | Models | org.apache.nlpcraft.examples.echo.EchoModel
|
- | | org.apache.nlpcraft.examples.alarm.AlarmModel
|
- | |
org.apache.nlpcraft.examples.helloworld.HelloWorldModel |
- | | org.apache.nlpcraft.examples.time.TimeModel
|
- | |
org.apache.nlpcraft.examples.weather.WeatherModel |
- | |
org.apache.nlpcraft.examples.lightswitch.LightSwitchModel |
-
+-------------+-----------------------------------------------------------+
- | Lifecycle |
|
- | JARs Folder |
|
-
+-------------------------------------------------------------------------+
-
- ...
-
- Mar-11 23:25:56 [INFO ] Models deployed: 6
-
-
+===================================================================================+
- | Model ID | Name | Ver.
| Elements | Synonyms |
-
+===================================================================================+
- | nlpcraft.alarm.ex | Alarm Example Model | 1.0
| 1 | 419 |
- | nlpcraft.weather.ex | Weather Example Model | 1.0
| 3 | 9045 |
- | nlpcraft.lightswitch.ex | Light Switch Example Model | 1.0
| 3 | 643 |
- | nlpcraft.helloworld.ex | HelloWorld Example Model | 1.0
| 0 | 0 |
- | nlpcraft.time.ex | Time Example Model | 1.0
| 1 | 432 |
- | nlpcraft.echo.ex | Echo Example Model | 1.0
| 0 | 0 |
-
+-----------------------------------------------------------------------------------+
-
- ...
-
- +--------------------------+
- | Probe started [5.12 sec] |
- +--------------------------+
-
- ...
-
- Mar-11 23:25:58 [INFO ] Server connection established.
- </pre>
</div>
</div>
<p>
@@ -173,13 +90,26 @@ id: getting_started
data for variety of different inquiries about the past, present or
future weather conditions.
</p>
<p>
- There are <a target=_
href="https://medium.com/@alicealdaine/top-10-api-testing-tools-rest-soap-services-5395cb03cfa9">many
ways</a> to issue
- and test REST calls - for our examples we'll use standard
- <a target="wiki"
href="https://en.wikipedia.org/wiki/CURL">cURL</a> utility which you can simply
use from the
- command line in any OS.
- NLPCraft comes with a convenient wrapper script
<code>bin/nccurl.sh</code> that shortens
- command line of the standard <code>cURL</code>.
+ We will be using <code>nlpcraft.{sh|cmd}</code> script to issue
REST calls. Let's start by running <code>nlpcraft.{sh|cmd}</code>
+ in REPL mode so that we can conveniently issue multiple commands.
To get into REPL mode simply launch the <code>nlpcraft.{sh|cmd}</code>
+ script with no argument:
</p>
+ <pre class="brush: bash">
+ $ bin/nlpcraft.sh
+ </pre>
+ <p>
+ ...with the following output (keep in mind that your REST server
and data probe are already started and
+ connected to each other):
+ </p>
+ <p>
+ <img class="non-fluid-img" src="/images/getting_started_fig3.png"
alt="">
+ </p>
+
+
+
+
+
+
<h3 class="section-title">Sign In</h3>
<p>
First, we need to sign in and obtain <b>access token</b>. We'll
use <code>/signin</code>
diff --git a/images/getting_started_fig1.png b/images/getting_started_fig1.png
new file mode 100644
index 0000000..775066d
Binary files /dev/null and b/images/getting_started_fig1.png differ
diff --git a/images/getting_started_fig2.png b/images/getting_started_fig2.png
new file mode 100644
index 0000000..ad39fdf
Binary files /dev/null and b/images/getting_started_fig2.png differ
diff --git a/images/getting_started_fig3.png b/images/getting_started_fig3.png
new file mode 100644
index 0000000..325f768
Binary files /dev/null and b/images/getting_started_fig3.png differ
diff --git a/tools/script.html b/tools/script.html
index 2f8f233..bc5a273 100644
--- a/tools/script.html
+++ b/tools/script.html
@@ -25,7 +25,7 @@ id: script
<section id="overview">
<h2 class="section-title">Overview</h2>
<p>
- <code>bin/nlpcraft.{sh|cmd}</code> script is a <b>central
management utility</b> for NLPCraft that supports
+ <code>bin/nlpcraft.{sh|cmd}</code> script (NLPCraft CLI) is a
<b>central management utility</b> for NLPCraft that supports
REPL (interactive) and command line modes. Most of the functions
this script does can be done through running
Java applications or using REST API - yet using this script you
can perform the same tasks much simpler and quicker.
From starting and managing REST server and probes, running various
built-in tools, to testing models via REST API -
@@ -47,7 +47,7 @@ id: script
</div>
<p>
The script is located in <code>/bin</code> sub-folder of the
installation root and is available for
- Unix/Linux (<code>nlpcraft.sh</code>) and Windows
(<code>nlpcraft.cmd</code>) environments. Both versions
+ Unix/Linux/MacOS (<code>nlpcraft.sh</code>) and Windows
(<code>nlpcraft.cmd</code>) environments. Both versions
provide identical functionality.
</p>
</section>
@@ -75,8 +75,7 @@ id: script
<img class="non-fluid-img" src="/images/cli1.png" alt="">
</p>
<p>
- Script starts in the REPL mode by default. Note that in REPL mode
the command prompt always shows REST
- server status, local probe status, REST access token (if any) as
well as current working directory.
+ Script starts in the REPL mode by default.
</p>
<div class="bq info">
<b>REPL Prompt</b>
@@ -91,7 +90,7 @@ id: script
</ul>
<p>
Note that when using <code>start-server</code> command the
default user account is automatically signed in
- upon server start and the access token is obtained. You can
sign in with different user account, if necessary.
+ upon the server start and the access token is obtained. You
can sign in with different user account, if necessary.
</p>
</div>
<h2 class="section-sub-title">Get Command List</h2>
@@ -150,27 +149,57 @@ id: script
<section id="tips">
<h2 class="tips">Tips <span class="amp">&</span> Tricks</h2>
<p>
- <code>bin/nlpcraft.{sh|cmd}</code> is standard command line
utility that can be used in the familiar ways both in
- Linux/Unix and Window environments. Note that only Windows 10 has
been tested.
+ NLPCraft CLI is standard command line utility that can be used in
the familiar ways both in
+ Linux/Unix/MacOS and Window environments. Note that only Windows
10 has been tested.
</p>
- <h2 class="section-sub-title">Using <code>start-server</code>
Command</h2>
+ <span class="section-sub-title">Typical Development Workflow</span>
+ <p>
+ Here's the typical workflow of working with NLPCraft using
NLPCraft CLI. Note that although all of these
+ steps can be performed from IDE or just a command line - NLPCraft
CLI in REPL model provides the easiest
+ way to accomplish these tasks:
+ </p>
+ <ol>
+ <li>
+ <code>gen-project</code> command generates new
Maven/Gradle/Sbt project for either Java, Scala, Groovy
+ or Kotlin that is ready to run.
+ </li>
+ <li>
+ <code>start-server</code> command starts the local REST server.
+ </li>
+ <li>
+ Modify <span class="amp">&</span> build the project using
IDE or editor of your choice. You can
+ <a href="#os_commands">launch</a> the editor and build tooling
right from NLPCraft CLI.
+ </li>
+ <li>
+ <code>test-model</code> command runs auto-validator for your
model automatically starting and stopping an
+ embedded data probe. Alternatively, <code>start-probe</code>
and <code>ask</code> commands allow to manually
+ start the local data probe and issue REST requests.
+ </li>
+ <li>
+ <code>stop</code> command stops both local REST server and
data probe.
+ </li>
+ </ol>
+ <div class="bq info">
+ <p>
+ Steps 3 and 5 define a typical development cycle for change,
build and test.
+ </p>
+ </div>
+ <span class="section-sub-title">Using <code>start-server</code>
Command</span>
<p>
REST server is a fire-and-forget component in NLPCraft. You can
start it once and you only need to restart it
if you change the server configuration. It is customary to add
<code>bin/nlpcraft.{sh|cmd} start-server</code>
call to the OS init script to have it started automatically on
boot up.
</p>
- <h2 class="section-sub-title">Using Default
<code>nlpcraft.conf</code></h2>
+ <span class="section-sub-title">Using Default
<code>nlpcraft.conf</code></span>
<p>
- It is recommended to modify the standard
<code>nlpcraft.conf</code> configuration file (i.e. <em>in a standard
- installation location</em>). Commands like
<code>start-server</code>, <code>start-probe</code> and
- <code>test-model</code> use this default location by default and
you will not have to specify alternative
+ It is recommended to modify the standard
<code>nlpcraft.conf</code> configuration file, i.e. <em>in a standard
+ installation location</em>. Commands like
<code>start-server</code>, <code>start-probe</code> and
+ <code>test-model</code> use this location by default and you will
not have to specify alternative
location or provide other overrides every time you run these
commands.
- </p>
- <p>
If you keep all your configuration modifications in the standard
<code>nlpcraft.conf</code> file you can simply
run these commands without any additional arguments -
significantly simplifying their usage.
</p>
- <h2 class="section-sub-title">Using <code>bin/nlpcraft.{sh|cmd}</code>
In Scripts</h2>
+ <span class="section-sub-title">Using NLPCraft CLI In Scripts</span>
<p>
All of the commands that utilize REST API produce JSON responses:
</p>
@@ -185,10 +214,10 @@ id: script
$ bin/nlpcraft.sh no-ansi no-logo signin [email protected]
--passwd=admin | tail -n +2 | jq -M '.acsTok' | tr -d '"'
</pre>
<p>
- ... and the result access token is:
+ ...and the access token is:
</p>
<pre class="brush: bash">
- kkoXBAn8yruEzXrj8Kja5
+ bjok7yraypseyk86KgGae
</pre>
<p>
<b>NOTES:</b>
@@ -199,7 +228,7 @@ id: script
output so that it would be easier to parse the resulting JSON.
</li>
<li>
- We use <code>tail -n +2</code> to skip the 1st line of the
output that contains HTTP return code.
+ We use <code>tail -n +2</code> Unix command to skip the 1st
line of the output that contains HTTP return code.
</li>
<li>
We use <a target=_blank
href="https://stedolan.github.io/jq/">jq</a> utility to parse JSON inline to
extract
diff --git a/use-cases.html b/use-cases.html
index ebf0d83..da34d34 100644
--- a/use-cases.html
+++ b/use-cases.html
@@ -46,9 +46,9 @@ layout: interior
<div class="container-fluid">
<div class="row">
<div class="col-6">
- <div id="search"
class="sub-section-title">NLI-Enhanced Search</div>
+ <div id="search" class="sub-section-title">Natural
Language Enhanced Search</div>
<p class="subhead">
- NLI-enhanced search, filter and sort is one area
where NLI has been successful
+ Natural Language enhanced search is one area where
NLI has been successful
for a number of years already. Look at Google
Analytics, GMail, JIRA, or many
other applications that allow you to search,
filter or sort their content with
natural language queries. This use case is a
perfect application of NLI as it