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 2020/05/29 02:07:14 UTC

[incubator-nlpcraft-website] branch web-site updated: Fix for NLPCRAFT-51.

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 e218595  Fix for NLPCRAFT-51.
e218595 is described below

commit e218595f986009c990b3036aea6499e7e1d5963a
Author: Aaron Radzinzski <ar...@datalingvo.com>
AuthorDate: Thu May 28 19:07:05 2020 -0700

    Fix for NLPCRAFT-51.
---
 community.html            |   2 +-
 feed.xml                  |   2 +-
 intent-matching.html      |   2 +-
 tools/embedded_probe.html |   2 +-
 tools/sql_model_gen.html  | 118 +++++++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 121 insertions(+), 5 deletions(-)

diff --git a/community.html b/community.html
index 8e3d006..c31889d 100644
--- a/community.html
+++ b/community.html
@@ -36,4 +36,4 @@
                             </pre><li> Each time when you want to update your local <code>master</code> do the following:<pre class="brush: plain">
                                 git pull upstream
                                 git checkout release
-                            </pre></ul><div class="bq info"><p><b>Branch Naming in Forks</b></p><p> Note that you can use any naming scheme for the branches in your local forks (i.e. you can work in <code>master</code> branch in your local fork). However, when you up-merge from the GitHub mirror you need to make sure to use <code>release</code> branch to get the latest work-in-progress from the upstream.</p></div></ul><p>To make the contribution:</p><ul><li> Fix or implement JIRA ticket  [...]
+                            </pre></ul><div class="bq info"><p><b>Branch Naming in Forks</b></p><p> Note that you can use any naming scheme for the branches in your local forks (i.e. you can work in <code>master</code> branch in your local fork). However, when you up-merge from the GitHub mirror you need to make sure to use <code>release</code> branch to get the latest work-in-progress from the upstream.</p></div></ul><p>To make the contribution:</p><ul><li> Fix or implement JIRA ticket  [...]
diff --git a/feed.xml b/feed.xml
index 4c963ea..650c867 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="3.8.5">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>2020-05-27T18:55:18-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="3.8.5">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>2020-05-28T19:04:10-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/intent-matching.html b/intent-matching.html
index 731ae0b..35f42c0 100644
--- a/intent-matching.html
+++ b/intent-matching.html
@@ -15,7 +15,7 @@
  limitations under the License.
 -->
 
-<!doctype html><html lang="en"><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 source API to convert natural language into actions."><meta name="author" content="NLPCraft."><link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" [...]
+<!doctype html><html lang="en"><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 source API to convert natural language into actions."><meta name="author" content="NLPCraft."><link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" [...]
             &#64;NCIntent("intent=act conv=false term(act)={groups @@ 'act'} term(loc)={trim(id) == 'ls:loc'}*")
             def onMatch(
                 &#64;NCIntentTerm("act") actTok: NCToken,
diff --git a/tools/embedded_probe.html b/tools/embedded_probe.html
index a3f1e2e..f50afe4 100644
--- a/tools/embedded_probe.html
+++ b/tools/embedded_probe.html
@@ -15,7 +15,7 @@
  limitations under the License.
 -->
 
-<!doctype html><html lang="en"><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 source API to convert natural language into actions."><meta name="author" content="NLPCraft."><link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" [...]
+<!doctype html><html lang="en"><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 source API to convert natural language into actions."><meta name="author" content="NLPCraft."><link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" [...]
 public class AlarmTest {
     private NCTestClient cli;
 
diff --git a/tools/sql_model_gen.html b/tools/sql_model_gen.html
index 8b71360..0ce8c5b 100644
--- a/tools/sql_model_gen.html
+++ b/tools/sql_model_gen.html
@@ -15,4 +15,120 @@
  limitations under the License.
 -->
 
-<!doctype html><html lang="en"><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 source API to convert natural language into actions."><meta name="author" content="NLPCraft."><link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" [...]
+<!doctype html><html lang="en"><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 source API to convert natural language into actions."><meta name="author" content="NLPCraft."><link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" [...]
+java -cp apache-nlpcraft-incubating-0.5.0-all-deps.jar org.apache.nlpcraft.model.tools.sqlgen.NCSqlModelGenerator --help
+        </pre><p> NOTE: this utility is Java-based and can be run similarly from command line or any IDE.</p><p> At the time of this writing (NLPCraft ver. 0.5.0) this would produce the following output:</p><pre class="brush: plain">
+NAME:
+    NCSqlModelGenerator -- NLPCraft model generator for SQL databases.
+
+SYNOPSIS:
+    java -cp apache-nlpcraft-incubating-0.5.0-all-deps.jar org.apache.nlpcraft.model.tools.sqlgen.NCSqlModelGenerator [PARAMETERS]
+
+DESCRIPTION:
+    This utility generates NLPCraft model stub for a given SQL database schema. You
+    can choose database schema, set of tables and columns for which you
+    want to generate NLPCraft model. After the model is generated you can
+    further configure and customize it for your specific needs.
+
+    This Java class can be run from the command line or from an IDE like any other
+    Java application. Note that required JDBC driver class must be available on the
+    classpath and therefore its JAR should be added to the classpath when running
+    this application.
+
+PARAMETERS:
+    [--url|-r] url
+        Mandatory database JDBC URL.
+
+    [--driver|-d] class
+        Mandatory JDBC driver class. Note that 'class' must be a
+        fully qualified class name. It should also be available on
+        the classpath.
+
+    [--schema|-s] schema
+        Mandatory database schema to scan.
+
+    [--out|-o] filename
+        Mandatory name of the output JSON or YAML model file. It should
+        have one of the following extensions: .js, .json, .yml, or .yaml
+        File extension determines the output file format.
+
+    [--user|-u] username
+        Optional database user name.
+
+    [--password|-w] password
+        Optional database user password.
+
+    [--model-id|-x] id
+        Optional generated model ID. By default, the model ID will be 'sql.model.id'.
+
+    [--model-ver|-v] version
+        Optional generated model version. By default, the model ID will be '1.0.0-timestamp'.
+
+    [--model-name|-n] name
+        Optional generated model name. By default, the model name will be 'SQL-based model'.
+
+    [--exclude|-e] list
+        Optional semicolon-separate list of tables and/or columns to exclude. By
+        default, none of the tables and columns in the schema are excluded. See below
+        for more information.
+
+    [--prefix|-f] list
+        Optional comma-separate list of table or column name prefixes to remove.
+        These prefixes will be removed when name is used for model elements
+        synonyms. By default, no prefixes will be removed.
+
+    [--suffix|-q] list
+        Optional comma-separate list of table or column name suffixes to remove.
+        These suffixes will be removed when name is used for model elements
+        synonyms. By default, no suffixes will be removed.
+
+    [--include|-i] list
+        Optional semicolon-separate list of tables and/or columns to include. By
+        default, all tables and columns in the schema are included. See below
+        for more information.
+
+    [--synonyms|-y] [true|false]
+        Optional flag on whether or not to generated auto synonyms for the model elements.
+        Default is true.
+
+    [--override|-z] [true|false]
+        Flag to determine whether or not to override output file if it already exist.
+        If override is disabled (default) and output file exists - a unique file name will
+        be used instead.
+        Default is false.
+
+    [--parent|-p] [true|false]
+        Optional flag on whether or not to use element's parent relationship for
+        defining SQL columns and their containing (i.e. parent) tables.
+        Default is false.
+
+    [--help|-h|-?]
+        Prints this usage information.
+
+DETAILS:
+    -r, -d, -s, and -o are mandatory parameters, everything else is optional.
+
+    Each -i or -e parameter is a semicolon ';' separated  list of table or columns names.
+    Each table or column name can be one of following forms:
+      - table         -- to filter on table names only.
+      - table#column  -- to filter on both table and column names.
+      - #column       -- to filter on columns only (regardless of the table).
+
+    Table and column names are treated as standard Java regular expressions. Note that
+    both '#' and ';' cannot be used inside of the regular expression:
+
+    -e "#_.+"             -- excludes any columns starting with '_'.
+    -e "tmp.+"            -- excludes all tables starting with 'tmp'.
+    -i "Order.*;#[^_].+"  -- includes only tables starting with 'Order' and columns that
+                             do not start with '_'.
+
+EXAMPLES:
+    java -cp apache-nlpcraft-0.5.0-all-deps.jar org.apache.nlpcraft.model.tools.sqlgen.NCSqlModelGenerator
+        -r jdbc:postgresql://localhost:5432/mydb
+        -d org.postgresql.Driver
+        -f "tbl_, col_"
+        -q "_tmp, _old, _unused"
+        -s public
+        -e "#_.+"
+        -o model.json
+        </pre><p> After the data model stub is generated:</p><ul><li> Load generated YAML/JSON-based model using <a target="javadoc" href="https://javadoc.io/static/org.apache.nlpcraft/nlpcraft/0.5.0/org/apache/nlpcraft/model/NCModelFileAdapter.html">NCModelFileAdapter</a> class to instantiate model from this file.<li> Modify and extend generated model stub to your own needs. In most cases, you'll need to add, remove or modify auto-generated synonyms, add intents, etc. Note, however, tha [...]