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/01/11 02:50:06 UTC
[incubator-nlpcraft-website] branch master updated: Fixes for the
first exampe doc.
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 f2cad61 Fixes for the first exampe doc.
f2cad61 is described below
commit f2cad6188f2609dfb870565a2e45b0fc14b02c83
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Sun Jan 10 18:49:53 2021 -0800
Fixes for the first exampe doc.
---
first-example.html | 24 ++++++++++--------------
server-and-probe.html | 25 +++++++++++++++++--------
2 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/first-example.html b/first-example.html
index c68c703..24a02c2 100644
--- a/first-example.html
+++ b/first-example.html
@@ -44,7 +44,7 @@ id: first_example
<section id="new_project">
<h3 class="section-title">New Project</h3>
<p>
- Run <code>nlpcraft.sh</code> script from NLPCraft home directory to create a new project stub:
+ Run <code>nlpcraft.sh</code> script from NLPCraft installation directory to create a new project stub (the script is located in <code>bin</code> sub-directory):
</p>
<nav>
<div class="nav nav-tabs" role="tablist">
@@ -214,17 +214,8 @@ class LightSwitchModel extends NCModelFileAdapter("light_switch.yaml") {
</li>
<li>
Line 7 uses <a target="javadoc" href="/apis/latest/org/apache/nlpcraft/model/NCIntentSample.html">@NCIntentSample</a>
- annotation that provides a list of sample inputs that should satisfy the intent above. Although this
- annotation is optional, the list of samples serves two important purposes:
- <ul>
- <li>
- It provides documentation for the intent by listing examples of input sentences that this intent should match on.
- </li>
- <li>
- It can also be used for auto-testing of the model. See below the <a href="#test">testing</a>
- section for details.
- </li>
- </ul>
+ annotation that is used for auto-testing of the model. See below the <a href="#test">testing</a>
+ section for details.
</li>
</ul>
</li>
@@ -260,7 +251,7 @@ class LightSwitchModel extends NCModelFileAdapter("light_switch.yaml") {
<section id="server">
<h3 class="section-title">Start Server</h3>
<p>
- Run the following command to start local REST server from the NLPCraft home directory:
+ Run the following command to start local REST server, if it hasn't been started already, from the NLPCraft installation directory:
</p>
<nav>
<div class="nav nav-tabs" role="tablist">
@@ -285,7 +276,7 @@ class LightSwitchModel extends NCModelFileAdapter("light_switch.yaml") {
</p>
<ul>
<li>
- REST server is a "fore-and-forget" component that you don't need to restart unless you change its configuration.
+ REST server is a "fore-and-forget" component that you generally need to start only once.
</li>
<li>
Run <code>bin/nlpcraft.sh help --cmd=start-server</code> to get a full help on this command.
@@ -346,6 +337,10 @@ class LightSwitchModel extends NCModelFileAdapter("light_switch.yaml") {
<p>
<img style="max-width: 910px !important;" class="img-fluid" alt="" src="/images/first_example_fig4.png">
</p>
+ <p>
+ To play with this project change the model and/or the mode logic, <a href="#build_project">build</a> project again,
+ and run the <a href="#test">auto-test</a>.
+ </p>
</section>
<section>
<h2 class="section-title">Congratulation! 👌</h2>
@@ -360,6 +355,7 @@ class LightSwitchModel extends NCModelFileAdapter("light_switch.yaml") {
<li class="side-nav-title">On This Page</li>
<li><a href="#new_project">New Project</a></li>
<li><a href="#data_model">Data Model</a></li>
+ <li><a href="#build_project">Build Project</a></li>
<li><a href="#server">Start Server</a></li>
<li><a href="#test">Testing</a></li>
{% include quick-links.html %}
diff --git a/server-and-probe.html b/server-and-probe.html
index 1b402cc..d33cb39 100644
--- a/server-and-probe.html
+++ b/server-and-probe.html
@@ -74,8 +74,14 @@ id: server_and_probe
<p>
NLPCraft comes with a single executable JAR file that includes all
necessary dependencies: <code>build/<b>apache-nlpcraft-incubating-{{site.latest_version}}-all-deps.jar</b></code>.
- This JAR file includes binaries for data probe, data model APIs and the REST server.
+ This single all-inclusive JAR file includes classes for:
</p>
+ <ul>
+ <li>REST Server</li>
+ <li>Data Probe</li>
+ <li><a href="/tools/script.html">NLPCraft CLI</a></li>
+ <li><a href="/data-model.html">Model API</a></li>
+ </ul>
<div class="bq info">
<b>Run <code>'mvn clean package'</code> For Source ZIP</b>
<p>
@@ -89,22 +95,25 @@ id: server_and_probe
<h2 class="section-title">REST Server</h2>
<p>
As mentioned above REST server (or a cluster of servers) is used to accept client REST calls and
- route them to the data model hosted by data probes. Note that both data probe and the REST server start principally
- the same way.
- </p>
- <p>
- REST server can be stared in a <em>standard way</em> from either the command line or IDE such as Eclipse or IntelliJ IDEA:
+ route them to the data model hosted by data probes. REST server can be started in different ways:
</p>
<nav>
<div class="nav nav-tabs" role="tablist">
- <a class="nav-item nav-link active" data-toggle="tab" href="#nav-srv-jar" role="tab" aria-controls="nav-home" aria-selected="true">Executable JAR</a>
+ <a class="nav-item nav-link active" data-toggle="tab" href="#nav-srv-script" role="tab" aria-controls="nav-home" aria-selected="true"><code>nlpcraft.{sh|cmd}</code></a>
+ <a class="nav-item nav-link" data-toggle="tab" href="#nav-srv-jar" role="tab" aria-controls="nav-home" aria-selected="true">Executable JAR</a>
<a class="nav-item nav-link" data-toggle="tab" href="#nav-srv-cmd" role="tab" aria-controls="nav-home" aria-selected="true">Command Line</a>
<a class="nav-item nav-link" data-toggle="tab" href="#nav-srv-ide" role="tab" aria-controls="nav-home" aria-selected="true">IDE</a>
<!-- <a class="nav-item nav-link" data-toggle="tab" href="#nav-srv-docker" role="tab" aria-controls="nav-home" aria-selected="true"><i class="fab fa-docker"></i> Docker</a>-->
</div>
</nav>
<div class="tab-content">
- <div class="tab-pane fade show active" id="nav-srv-jar" role="tabpanel">
+ <div class="tab-pane fade show active" id="nav-srv-script" role="tabpanel">
+ <pre class="brush: plain">
+ $ cd build
+ $ java -Xms1024m -jar apache-nlpcraft-incubating-{{site.latest_version}}-all-deps.jar -server
+ </pre>
+ </div>
+ <div class="tab-pane fade show" id="nav-srv-jar" role="tabpanel">
<pre class="brush: plain">
$ cd build
$ java -Xms1024m -jar apache-nlpcraft-incubating-{{site.latest_version}}-all-deps.jar -server