blob: b68b7774c86e2c1e3e002c015f1c501cd3bfbf4b [file] [log] [blame]
<html><head><meta charset="utf-8"></meta><meta name="viewport" content="width=device-width, initial-scale=1"></meta><title>NLPCraft</title><link rel="shortcut icon" type="image/x-icon" href="favicon.ico"></link><script type="text/javascript" src="scripts/theme.js"></script><script type="text/javascript" src="scripts/searchData.js" defer="true"></script><script type="text/javascript" src="scripts/scastieConfiguration.js" defer="true"></script><link rel="stylesheet" href="styles/nord-light.css"></link><link rel="stylesheet" href="styles/scalastyle.css"></link><link rel="stylesheet" href="styles/colors.css"></link><link rel="stylesheet" href="styles/dotty-icons.css"></link><link rel="stylesheet" href="styles/diagram.css"></link><link rel="stylesheet" href="styles/filter-bar.css"></link><link rel="stylesheet" href="styles/code-snippets.css"></link><link rel="stylesheet" href="styles/searchbar.css"></link><link rel="stylesheet" href="styles/social-links.css"></link><link rel="stylesheet" href="styles/ux.css"></link><link rel="stylesheet" href="styles/versions-dropdown.css"></link><link rel="stylesheet" href="styles/fontawesome.css"></link><script type="text/javascript" src="hljs/highlight.min.js" defer="true"></script><script type="text/javascript" src="scripts/hljs-scala3.js" defer="true"></script><script type="text/javascript" src="scripts/ux.js" defer="true"></script><script type="text/javascript" src="scripts/common/component.js" defer="true"></script><script type="text/javascript" src="scripts/common/utils.js" defer="true"></script><script type="text/javascript" src="scripts/components/FilterBar.js" defer="true"></script><script type="text/javascript" src="scripts/components/DocumentableList.js" defer="true"></script><script type="text/javascript" src="scripts/components/Input.js" defer="true"></script><script type="text/javascript" src="scripts/components/FilterGroup.js" defer="true"></script><script type="text/javascript" src="scripts/components/Filter.js" defer="true"></script><script type="text/javascript" src="scripts/scaladoc-scalajs.js" defer="true"></script><script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js" defer="true"></script><script type="text/javascript" src="https://d3js.org/d3.v6.min.js" defer="true"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/graphlib-dot@0.6.2/dist/graphlib-dot.min.js" defer="true"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/dagre-d3/0.6.1/dagre-d3.min.js" defer="true"></script><script type="text/javascript" src="https://scastie.scala-lang.org/embedded.js" defer="true"></script><script type="text/javascript" src="scripts/data.js" defer="true"></script><script>var pathToRoot = "";</script></head><body><div id="container"><div id="leftColumn"><div id="logo"><span><div class="projectName">NLPCraft</div></span><div id="version"><div class="versions-dropdown"><div onclick="dropdownHandler()" id="dropdown-button" class="dropdownbtn dropdownbtnactive"><div class="projectVersion">1.0.0</div><div id="dropdown-content" class="dropdown-content"><input type="text" placeholder="Search..." id="dropdown-input" onkeyup="filterFunction()"></input></div></div></div></div><div class="socials"><a href="https://github.com/apache/incubator-nlpcraft"><span class="social-icon" data-icon-path="github-icon-white.png"></span></a></div></div><div id="paneSearch"></div><nav id="sideMenu2"><div class="ni expanded"><span class="nh selected expanded"><span class="ar"></span><a href="index.html"><span>NLPCraft</span></a></span><div class="ni"><span class="nh "><span class="ar"></span><a href="org/apache/nlpcraft.html"><span class="micon pa"></span><span>org.apache.nlpcraft</span></a></span><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCContext.html"><span class="micon tr"></span><span>NCContext</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCConversation.html"><span class="micon tr"></span><span>NCConversation</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCCuration.html"><span class="micon cl"></span><span>NCCuration</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCDialogFlowItem.html"><span class="micon tr"></span><span>NCDialogFlowItem</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCEntity.html"><span class="micon tr"></span><span>NCEntity</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCEntityEnricher.html"><span class="micon tr"></span><span>NCEntityEnricher</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCEntityMapper.html"><span class="micon tr"></span><span>NCEntityMapper</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCEntityParser.html"><span class="micon tr"></span><span>NCEntityParser</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCEntityValidator.html"><span class="micon tr"></span><span>NCEntityValidator</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCException.html"><span class="micon cl"></span><span>NCException</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCIntentMatch.html"><span class="micon tr"></span><span>NCIntentMatch</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCIntentSkip.html"><span class="micon cl"></span><span>NCIntentSkip</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCLifecycle.html"><span class="micon tr"></span><span>NCLifecycle</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCMatchedCallback.html"><span class="micon tr"></span><span>NCMatchedCallback</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCModel.html"><span class="micon tr"></span><span>NCModel</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCModelClient.html"><span class="micon cl"></span><span>NCModelClient</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCModelConfig$.html"><span class="micon ob"></span><span>NCModelConfig</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCModelConfig.html"><span class="micon tr"></span><span>NCModelConfig</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCPipeline.html"><span class="micon tr"></span><span>NCPipeline</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCPipelineBuilder.html"><span class="micon cl"></span><span>NCPipelineBuilder</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCPropertyMap.html"><span class="micon tr"></span><span>NCPropertyMap</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCPropertyMapAdapter.html"><span class="micon cl"></span><span>NCPropertyMapAdapter</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCRejection.html"><span class="micon cl"></span><span>NCRejection</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCRequest.html"><span class="micon tr"></span><span>NCRequest</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCResult$.html"><span class="micon ob"></span><span>NCResult</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCResult.html"><span class="micon tr"></span><span>NCResult</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCResultType.html"><span class="micon en"></span><span>NCResultType</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCToken.html"><span class="micon tr"></span><span>NCToken</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCTokenEnricher.html"><span class="micon tr"></span><span>NCTokenEnricher</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCTokenParser.html"><span class="micon tr"></span><span>NCTokenParser</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCTokenValidator.html"><span class="micon tr"></span><span>NCTokenValidator</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCVariant.html"><span class="micon tr"></span><span>NCVariant</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/NCVariantFilter.html"><span class="micon tr"></span><span>NCVariantFilter</span></a></span></div></div><div class="ni"><span class="nh "><span class="ar"></span><a href="org/apache/nlpcraft/nlp/enrichers.html"><span class="micon pa"></span><span>org.apache.nlpcraft.nlp.enrichers</span></a></span><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/enrichers/NCBracketsTokenEnricher.html"><span class="micon cl"></span><span>NCBracketsTokenEnricher</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/enrichers/NCDictionaryTokenEnricher.html"><span class="micon cl"></span><span>NCDictionaryTokenEnricher</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/enrichers/NCEnStopWordsTokenEnricher.html"><span class="micon cl"></span><span>NCEnStopWordsTokenEnricher</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/enrichers/NCOpenNLPTokenEnricher.html"><span class="micon cl"></span><span>NCOpenNLPTokenEnricher</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/enrichers/NCQuotesTokenEnricher.html"><span class="micon cl"></span><span>NCQuotesTokenEnricher</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/enrichers/NCSwearWordsTokenEnricher.html"><span class="micon cl"></span><span>NCSwearWordsTokenEnricher</span></a></span></div></div><div class="ni"><span class="nh "><span class="ar"></span><a href="org/apache/nlpcraft/nlp/parsers.html"><span class="micon pa"></span><span>org.apache.nlpcraft.nlp.parsers</span></a></span><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/parsers/NCNLPEntityParser.html"><span class="micon cl"></span><span>NCNLPEntityParser</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/parsers/NCOpenNLPEntityParser.html"><span class="micon cl"></span><span>NCOpenNLPEntityParser</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/parsers/NCOpenNLPTokenParser.html"><span class="micon cl"></span><span>NCOpenNLPTokenParser</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/parsers/NCSemanticElement.html"><span class="micon tr"></span><span>NCSemanticElement</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/parsers/NCSemanticEntityParser.html"><span class="micon cl"></span><span>NCSemanticEntityParser</span></a></span></div></div><div class="ni"><span class="nh "><span class="ar"></span><a href="org/apache/nlpcraft/nlp/stemmer.html"><span class="micon pa"></span><span>org.apache.nlpcraft.nlp.stemmer</span></a></span><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/stemmer/NCEnStemmer.html"><span class="micon cl"></span><span>NCEnStemmer</span></a></span></div><div class="ni "><span class="nh "><a href="org/apache/nlpcraft/nlp/stemmer/NCStemmer.html"><span class="micon tr"></span><span>NCStemmer</span></a></span></div></div></div></nav></div><div id="main"><div id="leftToggler"><span class="icon-toggler"></span></div><div id="scaladoc-searchBar"></div><main id="main-content"><div class="breadcrumbs container"><a href="index.html">NLPCraft</a></div><div id="content"><div><h1>NLPCraft</h1><div class="cover"><div class="doc"><pre>
_ ____ ______ ______
/ | / / /___ / ____/________ _/ __/ /_
/ |/ / / __ \/ / / ___/ __ `/ /_/ __/
/ /| / / /_/ / /___/ / / /_/ / __/ /_
/_/ |_/_/ .___/\____/_/ \__,_/_/ \__/
/_/
SCALA3 API TO CONVERT NATURAL LANGUAGE INTO ACTION
</pre>
<ul>
<li>Full documentation at <a href="https://nlpcraft.apache.org">https://nlpcraft.apache.org</a></li>
<li>Examples <a href="https://github.com/apache/incubator-nlpcraft/tree/master/nlpcraft-examples">https://github.com/apache/incubator-nlpcraft/tree/master/nlpcraft-examples</a></li>
<li>GitHub project <a href="https://github.com/apache/incubator-nlpcraft">https://github.com/apache/incubator-nlpcraft</a></li>
</ul>
<p><a href="https://raw.githubusercontent.com/apache/opennlp/master/LICENSE"><img src="https://img.shields.io/badge/license-Apache%202-blue.svg" alt="License" /></a>
<a href="https://search.maven.org/artifact/org.apache.nlpcraft/nlpcraft"><img src="https://img.shields.io/maven-central/v/org.apache.nlpcraft/nlpcraft" alt="Maven Central" /></a></p>
<h4><a href="#maven-dependency" id="maven-dependency"><strong>Maven dependency:</strong></a></h4>
<pre>
&lt;dependency&gt;
&lt;groupId&gt;org.apache.nlpcraft&lt;/groupId&gt;
&lt;artifactId&gt;nlpcraft&lt;/artifactId&gt;
&lt;version&gt;1.0.0&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<h4><a href="#sbt-dependency" id="sbt-dependency"><strong>SBT dependency:</strong></a></h4>
<pre>
libraryDependencies += "org.apache.nlpcraft" % "nlpcraft" % "1.0.0"
</pre>
<h4><a href="#annotations" id="annotations"><strong>Annotations:</strong></a></h4>
<p>Due to Scala 3 limitation on runtime retained annotations NLPCraft annotations are written in Java. Javadoc documentation
cannot be readily integrated into standard Scaladoc toolchain and thus NLPCraft annotations are listed here
along with their source code for the purpose of documentation:</p>
<p><code>org.apache.nlpcraft.annotations.</code><strong>NCIntent</strong></p>
<pre>
// Annotation to bind an intent with the method serving as its callback.
@Documented
@Retention(value=RUNTIME)
@Target(value={METHOD, TYPE})
@Repeatable(NCIntent.NCIntentList.class)
public @interface NCIntent {
// Intent specification using IDL.
String value() default "";
// Grouping annotation required for when more than one 'NCIntent' annotation is used.
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Target(value={METHOD, TYPE})
@interface NCIntentList {
// Gets the list of all 'NCIntent' annotations attached to the callback or class.
NCIntent[] value();
}
}
</pre>
<p><code>org.apache.nlpcraft.annotations.</code><strong>NCIntentRef</strong></p>
<pre>
// Annotation referencing an intent defined outside of callback method declaration.
@Documented
@Retention(value=RUNTIME)
@Target(value=METHOD)
@Repeatable(NCIntentRef.NCIntentRefList.class)
public @interface NCIntentRef {
// ID of the intent defined externally.
String value() default "";
// Grouping annotation required for when more than one 'NCIntentRef' annotation is used.
@Retention(RetentionPolicy.RUNTIME)
@Target(value=METHOD)
@Documented
@interface NCIntentRefList {
// Gets the list of all 'NCIntentRef' annotations attached to the callback.
NCIntentRef[] value();
}
}
</pre>
<p><code>org.apache.nlpcraft.annotations.</code><strong>NCIntentTerm</strong></p>
<pre>
// Annotation to mark callback parameter to receive intent term's tokens.
@Documented
@Retention(value=RUNTIME)
@Target(value=PARAMETER)
public @interface NCIntentTerm {
// ID of the intent term.
String value();
}
</pre>
<p><code>org.apache.nlpcraft.annotations</code>.<strong>NCIntentObject</strong></p>
<pre>
// Marker annotation that can be applied to class member of main model.
// The fields objects annotated with this annotation are scanned the same way as main model.
@Documented
@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface NCIntentObject {
// No-op.
}
</pre>
</div><dl class="attributes"></dl></div><div class="documentableFilter"><div class="filterUpperContainer"><button class="filterToggleButton" data-test-id="filterToggleButton">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
</svg>
</button><input class="filterableInput" placeholder="Filter all members" data-test-id="filterBarInput"></input></div><div class="filterLowerContainer"></div></div><div class="membersList"><div class="tabs"><div class="names"><button data-togglable="Packages" class="tab selected">Packages</button></div><div class="contents"><div data-togglable="Packages" class="tab selected"><h2 data-togglable="Packages">Packages</h2><div class="documentableList"><h3 class="groupHeader"></h3><div class="documentableElement"><div><span class="annotations monospace"></span></div><div class="header monospace"><div class="signature"><span class="modifiers"></span><span class="kind"><span t="k">package </span></span><a href="org/apache/nlpcraft.html" class="documentableName ">org.apache.nlpcraft</a><span></span></div></div><div class="docs"><span class="modifiers"></span><div><div class="originInfo"></div><div class="memberDocumentation"><div class="documentableBrief doc"></div><div class="cover"><div class="doc"></div><dl class="attributes"></dl></div></div></div></div></div><div class="documentableElement"><div><span class="annotations monospace"></span></div><div class="header monospace"><div class="signature"><span class="modifiers"></span><span class="kind"><span t="k">package </span></span><a href="org/apache/nlpcraft/nlp/enrichers.html" class="documentableName ">org.apache.nlpcraft.nlp.enrichers</a><span></span></div></div><div class="docs"><span class="modifiers"></span><div><div class="originInfo"></div><div class="memberDocumentation"><div class="documentableBrief doc"></div><div class="cover"><div class="doc"></div><dl class="attributes"></dl></div></div></div></div></div><div class="documentableElement"><div><span class="annotations monospace"></span></div><div class="header monospace"><div class="signature"><span class="modifiers"></span><span class="kind"><span t="k">package </span></span><a href="org/apache/nlpcraft/nlp/parsers.html" class="documentableName ">org.apache.nlpcraft.nlp.parsers</a><span></span></div></div><div class="docs"><span class="modifiers"></span><div><div class="originInfo"></div><div class="memberDocumentation"><div class="documentableBrief doc"></div><div class="cover"><div class="doc"></div><dl class="attributes"></dl></div></div></div></div></div><div class="documentableElement"><div><span class="annotations monospace"></span></div><div class="header monospace"><div class="signature"><span class="modifiers"></span><span class="kind"><span t="k">package </span></span><a href="org/apache/nlpcraft/nlp/stemmer.html" class="documentableName ">org.apache.nlpcraft.nlp.stemmer</a><span></span></div></div><div class="docs"><span class="modifiers"></span><div><div class="originInfo"></div><div class="memberDocumentation"><div class="documentableBrief doc"></div><div class="cover"><div class="doc"></div><dl class="attributes"></dl></div></div></div></div></div></div></div></div></div></div></div></div></main><footer><div id="generated-by"><span class="footer-text">Generated by</span><a href="https://github.com/lampepfl/dotty/tree/master/scaladoc"><img src="images/scaladoc_logo.svg" alt="scaladoc" class="scaladoc_logo"></img><img src="images/scaladoc_logo_dark.svg" alt="scaladoc" class="scaladoc_logo_dark"></img></a></div><span id="footer-text">Apache NLPCraft</span><div class="socials"><span class="footer-text">Social links</span><a href="https://github.com/apache/incubator-nlpcraft"><span class="social-icon" data-icon-path="github-icon-black.png"></span></a></div><div class="mode"><span class="footer-text">Mode</span><label id="theme-toggle" class="switch"><input type="checkbox"></input><span class="slider"></span></label></div><span class="go-to-top-icon"><a href="#container"><span class="icon-vertical_align_top"></span><span class="footer-text">Back to top</span></a></span></footer></div></div></body></html>