| --- |
| active_crumb: Docs |
| layout: documentation |
| id: overview |
| --- |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <div class="col-md-8 second-column"> |
| <section id="overview"> |
| <h2 class="section-title">Overview</h2> |
| <p> |
| Apache NLPCraft is a Java-based <a href="/legal.html">open source</a> library for adding a natural language |
| interface to any applications. It can work with |
| any private or public data source, and has no hardware or software lock-in. |
| You can build models and intents for NLPCraft using any JVM-based languages like Java, Scala, Kotlin, Groovy, etc. NLPCraft |
| exposes REST APIs for integration with user applications that can be written in any language or system. |
| </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</em> |
| implementation and shorter development time. |
| </p> |
| <p> |
| How does it work in a nutshell? |
| </p> |
| <p> |
| When using NLPCraft you will be dealing with three main components: |
| </p> |
| <ul> |
| <li><a href="#data-model">Data model</a></li> |
| <li><a href="#data-probe">Data probe</a></li> |
| <li><a href="#server">REST Server</a></li> |
| </ul> |
| <figure> |
| <img class="img-fluid" src="/images/homepage-fig1.1.png" alt=""> |
| <figcaption><b>Fig 1.</b> NLPCraft Architecture</figcaption> |
| </figure> |
| </section> |
| <section id="data-model"> |
| <h3 class="section-title">Data Model</h3> |
| <p> |
| NLPCraft employs model-as-a-code approach where entire data model is an implementation of |
| <a target="javadoc" href="/apis/latest/org/apache/nlpcraft/model/NCModel.html">NCModel</a> Java interface that |
| can be developed using any JVM programming language like Java, Scala, Kotlin or Groovy. |
| Data model implementation defines how to interpret user input, and how to query or control a particular |
| data source. Model-as-a-code natively supports any software lifecycle tools and frameworks in Java eco-system. |
| </p> |
| <p> |
| Typically, declarative portion of the model will be stored in a separate JSON or YAML file |
| for simpler modifications. 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> |
| provided by NLPCraft out-of-the-box. |
| </p> |
| <p> |
| To use data model it has to be deployed into data probe. |
| </p> |
| </section> |
| <section id="data-probe"> |
| <h3 class="section-title">Data Probe</h3> |
| <p> |
| Data probe is an application 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 |
| in different geo-locations and configured differently. |
| </p> |
| <p> |
| Data probes can be deployed and run anywhere as long as there is an outbound connectivity to the REST server, and are |
| typically deployed in DMZ or close to your target data sources: on-premise, in the cloud, etc. Data |
| probe uses strong 256-bit encryption and ingress only connectivity for communicating with the REST server. |
| </p> |
| </section> |
| <section id="server"> |
| <h3 class="section-title">REST Server</h3> |
| <p> |
| REST server (or a cluster of REST servers behind a load balancer) provides URL endpoint for user applications |
| to securely query data sources using NLI via data models deployed in data probes. Its main purpose is to |
| accept REST-over-HTTP calls from user applications, manage connected data probes, and route user requests |
| to and from requested data probes. |
| </p> |
| <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. |
| </p> |
| <p> |
| Learn more about <a href="data-model.html">data model</a>, |
| <a href="server-and-probe.html#probe">data probe</a> and <a href="server-and-probe.html#server">REST server</a>. |
| </p> |
| </section> |
| </div> |
| <div class="col-md-2 third-column"> |
| <ul class="side-nav"> |
| <li class="side-nav-title">On This Page</li> |
| <li><a href="#overview">Overview</a></li> |
| <li><a href="#data-model">Data Model</a></li> |
| <li><a href="#data-probe">Data Probe</a></li> |
| <li><a href="#server">REST Server</a></li> |
| {% include quick-links.html %} |
| </ul> |
| </div> |
| |
| |
| |
| |