This example demonstrates the relatively complex case of taking an existing SQL schema and developing a natural language interface to it. Although it does not support many standard SQL capabilities (to limit the size of the example itself) - it is designed in a such a way that it can be easily extended and developed further.
This example can be run the same way as other examples with one exception - it needs to run H2 database server. The unit test for this example runs H2 database server automatically (which can be run manually, if necessary). You need to start H2 database server standalone when you are using NCSqlModelGenerator
model generation utility. You can run necessary JVMs for this example similarly from command line or IDE. NOTE: that you don't need to start Data Probe standalone if you are only running the unit test as it uses the embedded probe and starts it automatically:
Run REST server:
org.apache.nlpcraft.NCStart
-server
To run unit test with embedded probe:
org.apache.nlpcraft.examples.sql.SqlTest
To run probe standalone and use your own REST client:
org.apache.nlpcraft.NCStart
-Dconfig.override_with_env_vars=true
CONFIG_FORCE_nlpcraft_probe_models.0=org.apache.nlpcraft.examples.sql.SqlModel
-probe
When running data probe standalone you need run H2 database sever manually (from command line or IDE):
org.apache.nlpcraft.examples.sql.db.SqlServerRunner
See Getting Started guide for more instructions on how to run these examples.
For any questions, feedback or suggestions:
Copyright (C) 2020 Apache Software Foundation