WIP.
diff --git a/api-components.html b/api-components.html
index 74d0e1e..5b9454f 100644
--- a/api-components.html
+++ b/api-components.html
@@ -416,7 +416,8 @@
build
val cfg = NCModelConfig("nlpcraft.lightswitch.fr.ex", "LightSwitch Example Model FR", "1.0")
- val mdl = new NCModelAdapter(cfg, pipeline)
+ val mdl = new NCModel(cfg, pipeline):
+ // Add your callbacks definition or references on them here.
</pre>
<p>
diff --git a/built-in-entity-parser.html b/built-in-entity-parser.html
index fb63ffd..54caad6 100644
--- a/built-in-entity-parser.html
+++ b/built-in-entity-parser.html
@@ -616,7 +616,7 @@
</p>
<pre class="brush: scala, highlight: [3, 5, 10]">
- val mdl = new NCModelAdapter(
+ val mdl = new NCModel(
NCModelConfig("test.id", "Test Model", "1.0"),
new NCPipelineBuilder().withSemantic(
"en",
@@ -631,7 +631,8 @@
override def getSynonyms: Set[String] = Set("{<CUR>|_} <TIME>", "what <TIME> {is it now|now|is it|_}" )
)
).build
- )
+ ):
+ // Add your callbacks definition or references on them here.
</pre>
<ul>
<li>
@@ -672,10 +673,11 @@
</li>
</ul>
<pre class="brush: scala, highlight: [3]">
- val mdl = new NCModelAdapter(
+ val mdl = new NCModel(
NCModelConfig("test.id", "Test Model", "1.0"),
new NCPipelineBuilder().withSemantic("en", "time_model.yaml").build
- )
+ ):
+ // Add your callbacks definition or references on them here.
</pre>
<ul>
<li>
diff --git a/examples/calculator.html b/examples/calculator.html
index 7a1ec63..e62ade9 100644
--- a/examples/calculator.html
+++ b/examples/calculator.html
@@ -112,7 +112,7 @@
import CalculatorModel.*
- class CalculatorModel extends NCModelAdapter(
+ class CalculatorModel extends NCModel(
NCModelConfig("nlpcraft.calculator.ex", "Calculator Example Model", "1.0"),
PIPELINE
) :
diff --git a/examples/light_switch.html b/examples/light_switch.html
index f7df88c..1101491 100644
--- a/examples/light_switch.html
+++ b/examples/light_switch.html
@@ -81,8 +81,8 @@
<section id="model">
<h2 class="section-title">Data Model<a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
<p>
- We are going to start with declaring the static part of our model using YAML which we will later load using
- {% scaladoc NCModelAdapter NCModelAdapter %} in our Scala-based model implementation.
+ We are going to start with declaring the static part of our model using YAML which we will later load
+ in our Scala-based model implementation.
Open <code>src/main/resources/<b>light_switch.yaml</b></code>
file and replace its content with the following YAML:
</p>
@@ -156,7 +156,7 @@
import org.apache.nlpcraft.*
import org.apache.nlpcraft.annotations.*
- class LightSwitchModel extends NCModelAdapter(
+ class LightSwitchModel extends NCModel(
NCModelConfig("nlpcraft.lightswitch.java.ex", "LightSwitch Example Model", "1.0"),
new NCPipelineBuilder().withSemantic("en", "lightswitch_model.yaml").build
):
@@ -181,8 +181,7 @@
</p>
<ul>
<li>
- On <code>line 6</code> our class extends {% scaladoc NCModelAdapter NCModelAdapter %} that allows us to pass
- prepared configuration and pipeline into model.
+ On <code>line 6</code> our class extends {% scaladoc NCModel NCModel %} with two mandatory parameters.
</li>
<li>
<code>Line 7</code> creates model configuration with most default parameters.
diff --git a/examples/light_switch_fr.html b/examples/light_switch_fr.html
index 2eaa697..b370574 100644
--- a/examples/light_switch_fr.html
+++ b/examples/light_switch_fr.html
@@ -119,8 +119,8 @@
<section id="model">
<h2 class="section-title">Data Model<a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
<p>
- We are going to start with declaring the static part of our model using YAML which we will later load using
- {% scaladoc NCModelAdapter NCModelAdapter %} in our Scala-based model implementation.
+ We are going to start with declaring the static part of our model using YAML which we will later load
+ in our Scala-based model implementation.
Open <code>src/main/resources/<b>lightswitch_model_fr.yaml</b></code>
file and replace its content with the following YAML:
</p>
@@ -196,7 +196,7 @@
import demo.nlp.token.parser.NCFrTokenParser
import scala.jdk.CollectionConverters.*
- class LightSwitchFrModel extends NCModelAdapter(
+ class LightSwitchFrModel extends NCModel(
NCModelConfig("nlpcraft.lightswitch.fr.ex", "LightSwitch Example Model FR", "1.0"),
new NCPipelineBuilder().
withTokenParser(new NCFrTokenParser()).
@@ -226,8 +226,7 @@
</p>
<ul>
<li>
- On <code>line 11</code> our class extends {% scaladoc NCModelAdapter NCModelAdapter %} that allows us to pass
- prepared configuration and pipeline into model.
+ On <code>line 11</code>our class extends {% scaladoc NCModel NCModel %} with two mandatory parameters.
</li>
<li>
<code>Line 12</code> creates model configuration with most default parameters.
diff --git a/examples/light_switch_ru.html b/examples/light_switch_ru.html
index daee4a6..a29a79b 100644
--- a/examples/light_switch_ru.html
+++ b/examples/light_switch_ru.html
@@ -119,8 +119,8 @@
<section id="model">
<h2 class="section-title">Data Model<a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
<p>
- We are going to start with declaring the static part of our model using YAML which we will later load using
- {% scaladoc NCModelAdapter NCModelAdapter %} in our Scala-based model implementation.
+ We are going to start with declaring the static part of our model using YAML which we will later load
+ in our Scala-based model implementation.
Open <code>src/main/resources/<b>lightswitch_model_ru.yaml</b></code>
file and replace its content with the following YAML:
</p>
@@ -193,7 +193,7 @@
import demo.nlp.token.parser.NCRuTokenParser
import scala.jdk.CollectionConverters.*
- class LightSwitchRuModel extends NCModelAdapter(
+ class LightSwitchRuModel extends NCModel(
NCModelConfig("nlpcraft.lightswitch.ru.ex", "LightSwitch Example Model RU", "1.0"),
new NCPipelineBuilder().
withTokenParser(new NCRuTokenParser()).
@@ -223,8 +223,7 @@
</p>
<ul>
<li>
- On <code>line 11</code> our class extends {% scaladoc NCModelAdapter NCModelAdapter %} that allows us to pass
- prepared configuration and pipeline into model.
+ On <code>line 11</code> our class extends {% scaladoc NCModel NCModel %} with two mandatory parameters.
</li>
<li>
<code>Line 12</code> creates model configuration with most default parameters.
diff --git a/examples/pizzeria.html b/examples/pizzeria.html
index b2327ca..088b13e 100644
--- a/examples/pizzeria.html
+++ b/examples/pizzeria.html
@@ -90,8 +90,8 @@
<section id="model">
<h2 class="section-title">Data Model<a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
<p>
- We are going to start with declaring the static part of our model using YAML which we will later load using
- {% scaladoc NCModelAdapter NCModelAdapter %} custom implementation in our Scala-based model implementation.
+ We are going to start with declaring the static part of our model using YAML which we will later load
+ in our Scala-based model implementation.
Open <code>src/main/resources/<b>pizzeria_model.yaml</b></code>
file and replace its content with the following YAML:
</p>
@@ -386,7 +386,7 @@
import PizzeriaModel.*
- class PizzeriaModel extends NCModelAdapter(
+ class PizzeriaModel extends NCModel(
NCModelConfig("nlpcraft.pizzeria.ex", "Pizzeria Example Model", "1.0"),
PizzeriaModelPipeline.PIPELINE
) with LazyLogging:
@@ -494,8 +494,7 @@
static content and helper methods.
</li>
<li>
- On <code>line 114</code> our class <code>PizzeriaModel</code> extends {% scaladoc NCModelAdapter NCModelAdapter %} that allows us to pass
- prepared configuration and pipeline into the model.
+ On <code>line 114</code> our class extends {% scaladoc NCModel NCModel %} with two mandatory parameters.
</li>
<li>
<code>Line 115</code> creates model configuration with most default parameters.
diff --git a/examples/time.html b/examples/time.html
index a2a4bec..39a7bd4 100644
--- a/examples/time.html
+++ b/examples/time.html
@@ -85,8 +85,8 @@
<section id="model">
<h2 class="section-title">Data Model<a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
<p>
- We are going to start with declaring the static part of our model using YAML which we will later load using
- {% scaladoc NCModelAdapter NCModelAdapter %} in our Scala-based model implementation.
+ We are going to start with declaring the static part of our model using YAML which we will later load
+ in our Scala-based model implementation.
Open <code>src/main/resources/<b>time_model.yaml</b></code>
file and replace its content with the following YAML:
</p>
@@ -145,7 +145,7 @@
@NCIntent("fragment=city term(city)~{# == 'opennlp:location'}")
@NCIntent("intent=intent2 term~{# == 'x:time'} fragment(city)")
@NCIntent("intent=intent1 term={# == 'x:time'}")
- class TimeModel extends NCModelAdapter(
+ class TimeModel extends NCModel(
NCModelConfig("nlpcraft.time.ex", "Time Example Model", "1.0"),
new NCPipelineBuilder().
withSemantic("en", "time_model.yaml").
@@ -208,8 +208,7 @@
</p>
<ul>
<li>
- On <code>line 17</code> our class extends {% scaladoc NCModelAdapter NCModelAdapter %} that allows us to pass
- prepared configuration and pipeline into model.
+ On <code>line 17</code> our class extends {% scaladoc NCModel NCModel %} with two mandatory parameters.
</li>
<li>
<code>Line 14</code> creates <code>IDL fragment</code> which is used in <code>intent2</code> definition below.
diff --git a/first-example.html b/first-example.html
index 23521c8..484340f 100644
--- a/first-example.html
+++ b/first-example.html
@@ -77,8 +77,8 @@
<section id="model">
<h2 class="section-title">Data Model<a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2>
<p>
- We are going to start with declaring the static part of our model using YAML which we will later load using
- {% scaladoc NCModelAdapter NCModelAdapter %} in our Scala-based model implementation.
+ We are going to start with declaring the static part of our model using YAML which we will later load
+ in our Scala-based model implementation.
Open <code>src/main/resources/<b>light_switch.yaml</b></code>
file and replace its content with the following YAML:
</p>
@@ -152,7 +152,7 @@
import org.apache.nlpcraft.*
import org.apache.nlpcraft.annotations.*
- class LightSwitchModel extends NCModelAdapter(
+ class LightSwitchModel extends NCModel(
NCModelConfig("nlpcraft.lightswitch.java.ex", "LightSwitch Example Model", "1.0"),
new NCPipelineBuilder().withSemantic("en", "lightswitch_model.yaml").build
):
@@ -177,8 +177,7 @@
</p>
<ul>
<li>
- On <code>line 6</code> our class extends {% scaladoc NCModelAdapter NCModelAdapter %} that allows us to pass
- prepared configuration and pipeline into model.
+ On <code>line 6</code> our class extends {% scaladoc NCModel NCModel %} with two mandatory parameters.
</li>
<li>
<code>Line 7</code> creates model configuration with most default parameters.