| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_161) on Thu Apr 30 21:50:54 PDT 2020 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>NCModelFileAdapter (Apache NLPCraft 0.5.0)</title> |
| <meta name="date" content="2020-04-30"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="NCModelFileAdapter (Apache NLPCraft 0.5.0)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../resources/sh/scripts/XRegExp.js" type="text/javascript"></script> <script src="../../../../resources/sh/scripts/shCore.js" type="text/javascript"></script> <script src="../../../../resources/sh/scripts/shAutoloader.js" type="text/javascript"></script> <link href="../../../../resources/sh/styles/shCoreNLPCraft.css" rel="stylesheet" type="text/css" title="Style"> <link href="../../../../resources/sh/styles/shThemeNLPCraft.css" rel="stylesheet" type="text/css" title="Style"> <link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet"> <script async defer src="https://buttons.github.io/buttons.js"></script> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/NCModelFileAdapter.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage">Apache NLPCraft <span style="font-size: 80%">0.5.0</span></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/nlpcraft/model/NCModelFactory.html" title="interface in org.apache.nlpcraft.model"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/nlpcraft/model/NCModelView.html" title="interface in org.apache.nlpcraft.model"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/nlpcraft/model/NCModelFileAdapter.html" target="_top">Frames</a></li> |
| <li><a href="NCModelFileAdapter.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.nlpcraft.model</div> |
| <h2 title="Class NCModelFileAdapter" class="title">Class NCModelFileAdapter</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../org/apache/nlpcraft/model/NCModelAdapter.html" title="class in org.apache.nlpcraft.model">org.apache.nlpcraft.model.NCModelAdapter</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.nlpcraft.model.NCModelFileAdapter</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="../../../../org/apache/nlpcraft/model/NCLifecycle.html" title="interface in org.apache.nlpcraft.model">NCLifecycle</a>, <a href="../../../../org/apache/nlpcraft/model/NCMetadata.html" title="interface in org.apache.nlpcraft.model">NCMetadata</a>, <a href="../../../../org/apache/nlpcraft/model/NCModel.html" title="interface in org.apache.nlpcraft.model">NCModel</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html" title="interface in org.apache.nlpcraft.model">NCModelView</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public abstract class <span class="typeNameLabel">NCModelFileAdapter</span> |
| extends <a href="../../../../org/apache/nlpcraft/model/NCModelAdapter.html" title="class in org.apache.nlpcraft.model">NCModelAdapter</a></pre> |
| <div class="block">Adapter for data models that can load model configuration from external JSON/YAML file. |
| <p> |
| One of the use cases this adapter supports is ability to load model configuration from the external |
| JSON/YAML file and then update it in the code. For example, a model can load its configuration |
| from JSON file and then add intents or synonyms loaded from a database to a certain model element. |
| To support this usage all getters return internal mutable sets or maps, i.e. you can modify them in your sub-class |
| constructors and those modifications will alter the model's configuration. |
| <p> |
| Read full documentation in <a target=_ href="https://nlpcraft.apache.org/data-model.html">Data Model</a> section and review |
| <a target=_ href="https://github.com/apache/incubator-nlpcraft/tree/master/src/main/scala/org/apache/nlpcraft/examples/">examples</a>.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/nlpcraft/model/NCModelAdapter.html" title="class in org.apache.nlpcraft.model"><code>NCModelAdapter</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.nlpcraft.model.NCModelView"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from interface org.apache.nlpcraft.model.<a href="../../../../org/apache/nlpcraft/model/NCModelView.html" title="interface in org.apache.nlpcraft.model">NCModelView</a></h3> |
| <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_ENABLED_BUILTIN_TOKENS">DFLT_ENABLED_BUILTIN_TOKENS</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_DUP_SYNONYMS_ALLOWED">DFLT_IS_DUP_SYNONYMS_ALLOWED</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_NO_NOUNS_ALLOWED">DFLT_IS_NO_NOUNS_ALLOWED</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_NO_USER_TOKENS_ALLOWED">DFLT_IS_NO_USER_TOKENS_ALLOWED</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_NON_ENGLISH_ALLOWED">DFLT_IS_NON_ENGLISH_ALLOWED</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_NOT_LATIN_CHARSET_ALLOWED">DFLT_IS_NOT_LATIN_CHARSET_ALLOWED</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_PERMUTATE_SYNONYMS">DFLT_IS_PERMUTATE_SYNONYMS</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_SWEAR_WORDS_ALLOWED">DFLT_IS_SWEAR_WORDS_ALLOWED</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_JIGGLE_FACTOR">DFLT_JIGGLE_FACTOR</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_FREE_WORDS">DFLT_MAX_FREE_WORDS</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_SUSPICIOUS_WORDS">DFLT_MAX_SUSPICIOUS_WORDS</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_TOKENS">DFLT_MAX_TOKENS</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_TOTAL_SYNONYMS">DFLT_MAX_TOTAL_SYNONYMS</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_UNKNOWN_WORDS">DFLT_MAX_UNKNOWN_WORDS</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_WORDS">DFLT_MAX_WORDS</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_METADATA">DFLT_METADATA</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MIN_NON_STOPWORDS">DFLT_MIN_NON_STOPWORDS</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MIN_TOKENS">DFLT_MIN_TOKENS</a>, <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MIN_WORDS">DFLT_MIN_WORDS</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#NCModelFileAdapter-java.lang.String-">NCModelFileAdapter</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> filePath)</code> |
| <div class="block">Creates new model loading its configuration from given file path.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#NCModelFileAdapter-java.net.URI-">NCModelFileAdapter</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a> uri)</code> |
| <div class="block">Creates new model loading its configuration from given URI.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getAdditionalStopWords--">getAdditionalStopWords</a></span>()</code> |
| <div class="block">Gets an optional list of stopwords to add to the built-in ones.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getDescription--">getDescription</a></span>()</code> |
| <div class="block">Gets optional short model description.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../org/apache/nlpcraft/model/NCElement.html" title="interface in org.apache.nlpcraft.model">NCElement</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getElements--">getElements</a></span>()</code> |
| <div class="block">Gets a set of model elements or named entities.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getEnabledBuiltInTokens--">getEnabledBuiltInTokens</a></span>()</code> |
| <div class="block">Gets a set of IDs for built-in named entities (tokens) that should be enabled and detected for this model.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getExamples--">getExamples</a></span>()</code> |
| <div class="block">Gets an optional list of example sentences demonstrating what can be asked with this model.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getExcludedStopWords--">getExcludedStopWords</a></span>()</code> |
| <div class="block">Gets an optional list of stopwords to exclude from the built-in list of stopwords.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getId--">getId</a></span>()</code> |
| <div class="block">Gets unique, <i>immutable</i> ID of this model.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getIntents--">getIntents</a></span>()</code> |
| <div class="block">Gets list of intents declared in JSON/YML model definition, if any.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getJiggleFactor--">getJiggleFactor</a></span>()</code> |
| <div class="block">Measure of how much sparsity is allowed when user input words are reordered in attempt to |
| match the multi-word synonyms.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getMacros--">getMacros</a></span>()</code> |
| <div class="block">Gets an optional map of macros to be used in this model.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getMaxFreeWords--">getMaxFreeWords</a></span>()</code> |
| <div class="block">Gets maximum number of free words until automatic rejection.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getMaxSuspiciousWords--">getMaxSuspiciousWords</a></span>()</code> |
| <div class="block">Gets maximum number of suspicious words until automatic rejection.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getMaxTokens--">getMaxTokens</a></span>()</code> |
| <div class="block">Gets maximum number of all tokens (system and user defined) above which user input will be |
| automatically rejected as too long.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getMaxTotalSynonyms--">getMaxTotalSynonyms</a></span>()</code> |
| <div class="block">Total number of synonyms allowed per model.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getMaxUnknownWords--">getMaxUnknownWords</a></span>()</code> |
| <div class="block">Gets maximum number of unknown words until automatic rejection.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getMaxWords--">getMaxWords</a></span>()</code> |
| <div class="block">Gets maximum word count (<i>including</i> stopwords) above which user input will be automatically |
| rejected as too long.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getMetadata--">getMetadata</a></span>()</code> |
| <div class="block">Gets metadata.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getMinNonStopwords--">getMinNonStopwords</a></span>()</code> |
| <div class="block">Gets minimum word count (<i>excluding</i> stopwords) below which user input will be automatically rejected |
| as ambiguous sentence.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getMinTokens--">getMinTokens</a></span>()</code> |
| <div class="block">Gets minimum number of all tokens (system and user defined) below which user input will be |
| automatically rejected as too short.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getMinWords--">getMinWords</a></span>()</code> |
| <div class="block">Gets minimum word count (<i>including</i> stopwords) below which user input will be automatically |
| rejected as too short.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getName--">getName</a></span>()</code> |
| <div class="block">Gets descriptive name of this model.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getOrigin--">getOrigin</a></span>()</code> |
| <div class="block">Gets this file model adapter origin (file path or URI).</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/nlpcraft/model/NCCustomParser.html" title="interface in org.apache.nlpcraft.model">NCCustomParser</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getParsers--">getParsers</a></span>()</code> |
| <div class="block">Gets optional user-defined model element parsers for custom NER implementations.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getSuspiciousWords--">getSuspiciousWords</a></span>()</code> |
| <div class="block">Gets an optional list of suspicious words.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#getVersion--">getVersion</a></span>()</code> |
| <div class="block">Gets the version of this model using semantic versioning.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#isDupSynonymsAllowed--">isDupSynonymsAllowed</a></span>()</code> |
| <div class="block">Whether or not duplicate synonyms are allowed.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#isNonEnglishAllowed--">isNonEnglishAllowed</a></span>()</code> |
| <div class="block">Whether or not to allow non-English language in user input.</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#isNoNounsAllowed--">isNoNounsAllowed</a></span>()</code> |
| <div class="block">Whether or not to allow user input without a single noun.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#isNotLatinCharsetAllowed--">isNotLatinCharsetAllowed</a></span>()</code> |
| <div class="block">Whether or not to allow non-Latin charset in user input.</div> |
| </td> |
| </tr> |
| <tr id="i29" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#isNoUserTokensAllowed--">isNoUserTokensAllowed</a></span>()</code> |
| <div class="block">Whether or not to allow the user input with no user token detected.</div> |
| </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#isPermutateSynonyms--">isPermutateSynonyms</a></span>()</code> |
| <div class="block">Whether or not to permutate multi-word synonyms.</div> |
| </td> |
| </tr> |
| <tr id="i31" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/nlpcraft/model/NCModelFileAdapter.html#isSwearWordsAllowed--">isSwearWordsAllowed</a></span>()</code> |
| <div class="block">Whether or not to allow known English swear words in user input.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.nlpcraft.model.NCModel"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.nlpcraft.model.<a href="../../../../org/apache/nlpcraft/model/NCModel.html" title="interface in org.apache.nlpcraft.model">NCModel</a></h3> |
| <code><a href="../../../../org/apache/nlpcraft/model/NCModel.html#onContext-org.apache.nlpcraft.model.NCContext-">onContext</a>, <a href="../../../../org/apache/nlpcraft/model/NCModel.html#onError-org.apache.nlpcraft.model.NCContext-java.lang.Throwable-">onError</a>, <a href="../../../../org/apache/nlpcraft/model/NCModel.html#onMatchedIntent-org.apache.nlpcraft.model.NCIntentMatch-">onMatchedIntent</a>, <a href="../../../../org/apache/nlpcraft/model/NCModel.html#onParsedVariant-org.apache.nlpcraft.model.NCVariant-">onParsedVariant</a>, <a href="../../../../org/apache/nlpcraft/model/NCModel.html#onRejection-org.apache.nlpcraft.model.NCIntentMatch-org.apache.nlpcraft.model.NCRejection-">onRejection</a>, <a href="../../../../org/apache/nlpcraft/model/NCModel.html#onResult-org.apache.nlpcraft.model.NCIntentMatch-org.apache.nlpcraft.model.NCResult-">onResult</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.nlpcraft.model.NCMetadata"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.nlpcraft.model.<a href="../../../../org/apache/nlpcraft/model/NCMetadata.html" title="interface in org.apache.nlpcraft.model">NCMetadata</a></h3> |
| <code><a href="../../../../org/apache/nlpcraft/model/NCMetadata.html#meta-java.lang.String-">meta</a>, <a href="../../../../org/apache/nlpcraft/model/NCMetadata.html#meta-java.lang.String-T-">meta</a>, <a href="../../../../org/apache/nlpcraft/model/NCMetadata.html#metaOpt-java.lang.String-">metaOpt</a>, <a href="../../../../org/apache/nlpcraft/model/NCMetadata.html#metax-java.lang.String-">metax</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.nlpcraft.model.NCLifecycle"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.nlpcraft.model.<a href="../../../../org/apache/nlpcraft/model/NCLifecycle.html" title="interface in org.apache.nlpcraft.model">NCLifecycle</a></h3> |
| <code><a href="../../../../org/apache/nlpcraft/model/NCLifecycle.html#onDiscard--">onDiscard</a>, <a href="../../../../org/apache/nlpcraft/model/NCLifecycle.html#onInit--">onInit</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="NCModelFileAdapter-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NCModelFileAdapter</h4> |
| <pre>public NCModelFileAdapter(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> filePath)</pre> |
| <div class="block">Creates new model loading its configuration from given file path. Only <code>.js</code>, |
| <code>.json</code>, <code>.yml</code> and <code>.yaml</code> files are supported. File path can be |
| classpath relative or absolute.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>filePath</code> - Classpath relative or absolute file path to load model configuration from.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>NCException</code> - Thrown in case of any errors loading model configuration.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="NCModelFileAdapter-java.net.URI-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>NCModelFileAdapter</h4> |
| <pre>public NCModelFileAdapter(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a> uri)</pre> |
| <div class="block">Creates new model loading its configuration from given URI. Only <code>.js</code>, |
| <code>.json</code>, <code>.yml</code> and <code>.yaml</code> resources are supported.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - URI to load model configuration from.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>NCException</code> - Thrown in case of any errors loading model configuration.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getOrigin--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getOrigin</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getOrigin()</pre> |
| <div class="block">Gets this file model adapter origin (file path or URI).</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>This file model adapter origin (file path or URI).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getIntents--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getIntents</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getIntents()</pre> |
| <div class="block">Gets list of intents declared in JSON/YML model definition, if any.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>List of intents declared in JSON/YML model definition, potentially empty.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getId--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getId</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getId()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getId--">NCModelView</a></code></span></div> |
| <div class="block">Gets unique, <i>immutable</i> ID of this model. |
| <p> |
| Note that <b>model IDs are immutable</b> while name and version |
| can be changed freely. Changing model ID is equal to creating a completely new model. |
| Model IDs (unlike name and version) are not exposed to the end user and only serve a |
| technical purpose. ID's max length is 32 characters. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>id</code> property: |
| <pre class="brush: js"> |
| { |
| "id": "my.model.id" |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getId--">getId</a></code> in interface <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html" title="interface in org.apache.nlpcraft.model">NCModelView</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../org/apache/nlpcraft/model/NCModelAdapter.html#getId--">getId</a></code> in class <code><a href="../../../../org/apache/nlpcraft/model/NCModelAdapter.html" title="class in org.apache.nlpcraft.model">NCModelAdapter</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Unique, <i>immutable</i> ID of this model.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getName</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getName()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getName--">NCModelView</a></code></span></div> |
| <div class="block">Gets descriptive name of this model. Name's max length is 64 characters. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>name</code> property: |
| <pre class="brush: js"> |
| { |
| "name": "My Model" |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getName--">getName</a></code> in interface <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html" title="interface in org.apache.nlpcraft.model">NCModelView</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../org/apache/nlpcraft/model/NCModelAdapter.html#getName--">getName</a></code> in class <code><a href="../../../../org/apache/nlpcraft/model/NCModelAdapter.html" title="class in org.apache.nlpcraft.model">NCModelAdapter</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Descriptive name for this model.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getVersion--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getVersion</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getVersion()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getVersion--">NCModelView</a></code></span></div> |
| <div class="block">Gets the version of this model using semantic versioning. Version's max length is 16 characters. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>version</code> property: |
| <pre class="brush: js"> |
| { |
| "version": "1.0.0" |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getVersion--">getVersion</a></code> in interface <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html" title="interface in org.apache.nlpcraft.model">NCModelView</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../org/apache/nlpcraft/model/NCModelAdapter.html#getVersion--">getVersion</a></code> in class <code><a href="../../../../org/apache/nlpcraft/model/NCModelAdapter.html" title="class in org.apache.nlpcraft.model">NCModelAdapter</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A version compatible with (<a href="http://www.semver.org">www.semver.org</a>) specification.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getDescription--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDescription</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getDescription()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getDescription--">NCModelView</a></code></span></div> |
| <div class="block">Gets optional short model description. This can be displayed by the management tools. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>description</code> property: |
| <pre class="brush: js"> |
| { |
| "description": "Model description..." |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Optional short model description.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMaxUnknownWords--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxUnknownWords</h4> |
| <pre>public int getMaxUnknownWords()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getMaxUnknownWords--">NCModelView</a></code></span></div> |
| <div class="block">Gets maximum number of unknown words until automatic rejection. An unknown word is a word |
| that is not part of Princeton WordNet database. If you expect a very formalized and well |
| defined input without uncommon slang and abbreviations you can set this to a small number |
| like one or two. However, in most cases we recommend to leave it as default or set it to a larger |
| number like five or more. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_UNKNOWN_WORDS"><code>NCModelView.DFLT_MAX_UNKNOWN_WORDS</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>maxUnknownWords</code> property: |
| <pre class="brush: js"> |
| { |
| "maxUnknownWords": 2 |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Maximum number of unknown words until automatic rejection.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMaxFreeWords--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxFreeWords</h4> |
| <pre>public int getMaxFreeWords()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getMaxFreeWords--">NCModelView</a></code></span></div> |
| <div class="block">Gets maximum number of free words until automatic rejection. A free word is a known word that is |
| not part of any recognized token. In other words, a word that is present in the user input |
| but won't be used to understand its meaning. Setting it to a non-zero risks the misunderstanding |
| of the user input, while setting it to zero often makes understanding logic too rigid. In most |
| cases we recommend setting to between one and three. If you expect the user input to contain |
| many <i>noisy</i> idioms, slang or colloquials - you can set it to a larger number. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_FREE_WORDS"><code>NCModelView.DFLT_MAX_FREE_WORDS</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>maxFreeWords</code> property: |
| <pre class="brush: js"> |
| { |
| "maxFreeWords": 2 |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Maximum number of free words until automatic rejection.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMaxSuspiciousWords--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxSuspiciousWords</h4> |
| <pre>public int getMaxSuspiciousWords()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getMaxSuspiciousWords--">NCModelView</a></code></span></div> |
| <div class="block">Gets maximum number of suspicious words until automatic rejection. A suspicious word is a word |
| that is defined by the model that should not appear in a valid user input under no circumstances. |
| A typical example of suspicious words would be words "sex" or "porn" when processing |
| queries about children books. In most cases this should be set to zero (default) to automatically |
| reject any such suspicious words in the user input. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_SUSPICIOUS_WORDS"><code>NCModelView.DFLT_MAX_SUSPICIOUS_WORDS</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>maxSuspiciousWords</code> property: |
| <pre class="brush: js"> |
| { |
| "maxSuspiciousWords": 2 |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Maximum number of suspicious words until automatic rejection.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMinWords--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinWords</h4> |
| <pre>public int getMinWords()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getMinWords--">NCModelView</a></code></span></div> |
| <div class="block">Gets minimum word count (<i>including</i> stopwords) below which user input will be automatically |
| rejected as too short. In almost all cases this value should be greater than or equal to one. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MIN_WORDS"><code>NCModelView.DFLT_MIN_WORDS</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>minWords</code> property: |
| <pre class="brush: js"> |
| { |
| "minWords": 2 |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Minimum word count (<i>including</i> stopwords) below which user input will be automatically |
| rejected as too short.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMaxWords--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxWords</h4> |
| <pre>public int getMaxWords()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getMaxWords--">NCModelView</a></code></span></div> |
| <div class="block">Gets maximum word count (<i>including</i> stopwords) above which user input will be automatically |
| rejected as too long. In almost all cases this value should be greater than or equal to one. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_WORDS"><code>NCModelView.DFLT_MAX_WORDS</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>maxWords</code> property: |
| <pre class="brush: js"> |
| { |
| "maxWords": 50 |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Maximum word count (<i>including</i> stopwords) above which user input will be automatically |
| rejected as too long.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMinTokens--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinTokens</h4> |
| <pre>public int getMinTokens()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getMinTokens--">NCModelView</a></code></span></div> |
| <div class="block">Gets minimum number of all tokens (system and user defined) below which user input will be |
| automatically rejected as too short. In almost all cases this value should be greater than or equal to one. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MIN_TOKENS"><code>NCModelView.DFLT_MIN_TOKENS</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>minTokens</code> property: |
| <pre class="brush: js"> |
| { |
| "minTokens": 1 |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Minimum number of all tokens.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMaxTokens--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxTokens</h4> |
| <pre>public int getMaxTokens()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getMaxTokens--">NCModelView</a></code></span></div> |
| <div class="block">Gets maximum number of all tokens (system and user defined) above which user input will be |
| automatically rejected as too long. Note that sentences with large number of token can result |
| in significant processing delay and substantial memory consumption. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_TOKENS"><code>NCModelView.DFLT_MAX_TOKENS</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>maxTokens</code> property: |
| <pre class="brush: js"> |
| { |
| "maxTokens": 100 |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Maximum number of all tokens.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMinNonStopwords--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinNonStopwords</h4> |
| <pre>public int getMinNonStopwords()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getMinNonStopwords--">NCModelView</a></code></span></div> |
| <div class="block">Gets minimum word count (<i>excluding</i> stopwords) below which user input will be automatically rejected |
| as ambiguous sentence. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MIN_NON_STOPWORDS"><code>NCModelView.DFLT_MIN_NON_STOPWORDS</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>minNonStopwords</code> property: |
| <pre class="brush: js"> |
| { |
| "minNonStopwords": 2 |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Minimum word count (<i>excluding</i> stopwords) below which user input will be automatically |
| rejected as too short.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isNonEnglishAllowed--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isNonEnglishAllowed</h4> |
| <pre>public boolean isNonEnglishAllowed()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#isNonEnglishAllowed--">NCModelView</a></code></span></div> |
| <div class="block">Whether or not to allow non-English language in user input. |
| Currently, only English language is supported. However, model can choose whether or not |
| to automatically reject user input that is detected to be a non-English. Note that current |
| algorithm only works reliably on longer user input (10+ words). On short sentences it will |
| often produce an incorrect result. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_NON_ENGLISH_ALLOWED"><code>NCModelView.DFLT_IS_NON_ENGLISH_ALLOWED</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>nonEnglishAllowed</code> property: |
| <pre class="brush: js"> |
| { |
| "nonEnglishAllowed": false |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether or not to allow non-English language in user input.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isNotLatinCharsetAllowed--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isNotLatinCharsetAllowed</h4> |
| <pre>public boolean isNotLatinCharsetAllowed()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#isNotLatinCharsetAllowed--">NCModelView</a></code></span></div> |
| <div class="block">Whether or not to allow non-Latin charset in user input. Currently, only |
| Latin charset is supported. However, model can choose whether or not to automatically reject user |
| input with characters outside of Latin charset. If <code>false</code> such user input will be automatically |
| rejected. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_NOT_LATIN_CHARSET_ALLOWED"><code>NCModelView.DFLT_IS_NOT_LATIN_CHARSET_ALLOWED</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>nonLatinCharsetAllowed</code> property: |
| <pre class="brush: js"> |
| { |
| "nonLatinCharsetAllowed": false |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether or not to allow non-Latin charset in user input.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isSwearWordsAllowed--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSwearWordsAllowed</h4> |
| <pre>public boolean isSwearWordsAllowed()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#isSwearWordsAllowed--">NCModelView</a></code></span></div> |
| <div class="block">Whether or not to allow known English swear words in user input. If <code>false</code> - user input with |
| detected known English swear words will be automatically rejected. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_SWEAR_WORDS_ALLOWED"><code>NCModelView.DFLT_IS_SWEAR_WORDS_ALLOWED</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>swearWordsAllowed</code> property: |
| <pre class="brush: js"> |
| { |
| "swearWordsAllowed": false |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether or not to allow known swear words in user input.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isNoNounsAllowed--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isNoNounsAllowed</h4> |
| <pre>public boolean isNoNounsAllowed()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#isNoNounsAllowed--">NCModelView</a></code></span></div> |
| <div class="block">Whether or not to allow user input without a single noun. If <code>false</code> such user input |
| will be automatically rejected. Typically for command or query-oriented models this should be set to |
| <code>false</code> as any command or query should have at least one noun subject. However, for conversational |
| models this can be set to <code>false</code> to allow for a smalltalk and one-liners. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_NO_NOUNS_ALLOWED"><code>NCModelView.DFLT_IS_NO_NOUNS_ALLOWED</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>noNounsAllowed</code> property: |
| <pre class="brush: js"> |
| { |
| "noNounsAllowed": false |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether or not to allow user input without a single noun.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isPermutateSynonyms--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isPermutateSynonyms</h4> |
| <pre>public boolean isPermutateSynonyms()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#isPermutateSynonyms--">NCModelView</a></code></span></div> |
| <div class="block">Whether or not to permutate multi-word synonyms. Automatic multi-word synonyms permutations greatly |
| increase the total number of synonyms in the system and allows for better multi-word synonym detection. |
| For example, if permutation is allowed the synonym "a b c" will be automatically converted into a |
| sequence of synonyms of "a b c", "b a c", "a c b". |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_PERMUTATE_SYNONYMS"><code>NCModelView.DFLT_IS_PERMUTATE_SYNONYMS</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>permutateSynonyms</code> property: |
| <pre class="brush: js"> |
| { |
| "permutateSynonyms": true |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether or not to permutate multi-word synonyms.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isDupSynonymsAllowed--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isDupSynonymsAllowed</h4> |
| <pre>public boolean isDupSynonymsAllowed()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#isDupSynonymsAllowed--">NCModelView</a></code></span></div> |
| <div class="block">Whether or not duplicate synonyms are allowed. If <code>true</code> - the model will pick the random |
| model element when multiple elements found due to duplicate synonyms. If <code>false</code> - model |
| will print error message and will not deploy. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_DUP_SYNONYMS_ALLOWED"><code>NCModelView.DFLT_IS_DUP_SYNONYMS_ALLOWED</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>dupSynonymsAllowed</code> property: |
| <pre class="brush: js"> |
| { |
| "dupSynonymsAllowed": true |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether or not to allow duplicate synonyms.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMaxTotalSynonyms--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxTotalSynonyms</h4> |
| <pre>public int getMaxTotalSynonyms()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getMaxTotalSynonyms--">NCModelView</a></code></span></div> |
| <div class="block">Total number of synonyms allowed per model. Model won't deploy if total number of synonyms exceeds this |
| number. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_MAX_TOTAL_SYNONYMS"><code>NCModelView.DFLT_MAX_TOTAL_SYNONYMS</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>maxTotalSynonyms</code> property: |
| <pre class="brush: js"> |
| { |
| "maxTotalSynonyms": true |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Total number of synonyms allowed per model.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isNoUserTokensAllowed--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isNoUserTokensAllowed</h4> |
| <pre>public boolean isNoUserTokensAllowed()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#isNoUserTokensAllowed--">NCModelView</a></code></span></div> |
| <div class="block">Whether or not to allow the user input with no user token detected. If <code>false</code> such user |
| input will be automatically rejected. Note that this property only applies to user-defined |
| token (i.e. model element). Even if there are no user defined tokens, the user input may still |
| contain system token like <code>nlpcraft:city</code> or <code>nlpcraft:date</code>. In many cases models |
| should be build to allow user input without user tokens. However, set it to <code>false</code> if presence |
| of at least one user token is mandatory. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_IS_NO_USER_TOKENS_ALLOWED"><code>NCModelView.DFLT_IS_NO_USER_TOKENS_ALLOWED</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>noUserTokensAllowed</code> property: |
| <pre class="brush: js"> |
| { |
| "noUserTokensAllowed": false |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether or not to allow the user input with no user token detected.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getJiggleFactor--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getJiggleFactor</h4> |
| <pre>public int getJiggleFactor()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getJiggleFactor--">NCModelView</a></code></span></div> |
| <div class="block">Measure of how much sparsity is allowed when user input words are reordered in attempt to |
| match the multi-word synonyms. Zero means no reordering is allowed. One means |
| that a word in a synonym can move only one position left or right, and so on. Empirically |
| the value of <code>2</code> proved to be a good default value in most cases. Note that larger |
| values mean that synonym words can be almost in any random place in the user input which makes |
| synonym matching practically meaningless. Maximum value is <code>4</code>. |
| <p> |
| <b>Default</b> |
| <br> |
| If not provided by the model the default value <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#DFLT_JIGGLE_FACTOR"><code>NCModelView.DFLT_JIGGLE_FACTOR</code></a> will be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>jiggleFactor</code> property: |
| <pre class="brush: js"> |
| { |
| "jiggleFactor": 2 |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Word jiggle factor (sparsity measure).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMetadata--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMetadata</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> getMetadata()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCMetadata.html#getMetadata--">NCMetadata</a></code></span></div> |
| <div class="block">Gets metadata.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Metadata.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/nlpcraft/model/NCMetadata.html#meta-java.lang.String-"><code>NCMetadata.meta(String)</code></a>, |
| <a href="../../../../org/apache/nlpcraft/model/NCMetadata.html#metaOpt-java.lang.String-"><code>NCMetadata.metaOpt(String)</code></a>, |
| <a href="../../../../org/apache/nlpcraft/model/NCMetadata.html#meta-java.lang.String-T-"><code>NCMetadata.meta(String, Object)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAdditionalStopWords--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAdditionalStopWords</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getAdditionalStopWords()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getAdditionalStopWords--">NCModelView</a></code></span></div> |
| <div class="block">Gets an optional list of stopwords to add to the built-in ones. |
| <p> |
| Stopword is an individual word (i.e. sequence of characters excluding whitespaces) that contribute no |
| semantic meaning to the sentence. For example, 'the', 'wow', or 'hm' provide no semantic meaning to the |
| sentence and can be safely excluded from semantic analysis. |
| <p> |
| NLPCraft comes with a carefully selected list of English stopwords which should be sufficient |
| for a majority of use cases. However, you can add additional stopwords to this list. The typical |
| use for user-defined stopwords are jargon parasite words that are specific to the model's domain. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>additionalStopwords</code> property: |
| <pre class="brush: js"> |
| { |
| "additionalStopwords": [ |
| "stopword1", |
| "stopword2" |
| ] |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Potentially empty list of additional stopwords.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getExcludedStopWords--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getExcludedStopWords</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getExcludedStopWords()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getExcludedStopWords--">NCModelView</a></code></span></div> |
| <div class="block">Gets an optional list of stopwords to exclude from the built-in list of stopwords. |
| <p> |
| Just like you can add additional stopwords via <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getAdditionalStopWords--"><code>NCModelView.getAdditionalStopWords()</code></a> you can exclude |
| certain words from the list of stopwords. This can be useful in rare cases when default built-in |
| stopword has specific meaning of your model. In order to process them you need to exclude them |
| from the list of stopwords. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>excludedStopwords</code> property: |
| <pre class="brush: js"> |
| { |
| "excludedStopwords": [ |
| "excludedStopword1", |
| "excludedStopword2" |
| ] |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Potentially empty list of excluded stopwords.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getExamples--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getExamples</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getExamples()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getExamples--">NCModelView</a></code></span></div> |
| <div class="block">Gets an optional list of example sentences demonstrating what can be asked with this model. These |
| examples may be displayed by the management tools. It is highly recommended to supply a good list of |
| examples for the model as this provides perhaps the best description to the end user on how a particular |
| model can be used. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>examples</code> property: |
| <pre class="brush: js"> |
| { |
| "examples": [ |
| "Example questions one", |
| "Another sample sentence" |
| ] |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Potentially empty list of model request examples.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSuspiciousWords--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSuspiciousWords</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getSuspiciousWords()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getSuspiciousWords--">NCModelView</a></code></span></div> |
| <div class="block">Gets an optional list of suspicious words. A suspicious word is a word that generally should not appear in user |
| sentence when used with this model. For example, if a particular model is for children oriented book search, |
| the words "sex" and "porn" should probably NOT appear in the user input and can be automatically rejected |
| when added here and model's metadata <code>MAX_SUSPICIOUS_WORDS</code> property set to zero. |
| <p> |
| Note that by setting model's metadata <code>MAX_SUSPICIOUS_WORDS</code> property to non-zero value you can |
| adjust the sensitivity of suspicious words auto-rejection logic. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>suspiciousWords</code> property: |
| <pre class="brush: js"> |
| { |
| "suspiciousWords": [ |
| "sex", |
| "porn" |
| ] |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Potentially empty list of suspicious words in their lemma form.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMacros--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMacros</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getMacros()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getMacros--">NCModelView</a></code></span></div> |
| <div class="block">Gets an optional map of macros to be used in this model. Macros and option groups are instrumental |
| in defining model's elements. See <a href="../../../../org/apache/nlpcraft/model/NCElement.html" title="interface in org.apache.nlpcraft.model"><code>NCElement</code></a> for documentation on macros. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>macros</code> property: |
| <pre class="brush: js"> |
| { |
| "macros": [ |
| { |
| "name": "<OF>", |
| "macro": "{of|for|per}" |
| }, |
| { |
| "name": "<CUR>", |
| "macro": "{current|present|moment|now}" |
| } |
| ] |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Potentially empty map of macros.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getElements--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getElements</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="../../../../org/apache/nlpcraft/model/NCElement.html" title="interface in org.apache.nlpcraft.model">NCElement</a>> getElements()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getElements--">NCModelView</a></code></span></div> |
| <div class="block">Gets a set of model elements or named entities. Model can have zero or more user defined elements. |
| <p> |
| An element is the main building block of the semantic model. Data model element defines a named entity |
| that will be automatically recognized in the user input. See also <a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getParsers--"><code>NCModelView.getParsers()</code></a> method on how |
| to provide programmatic named entity recognizer (NER) implementations. |
| <p> |
| Note that unless model elements are loaded dynamically it is highly recommended to declare model |
| elements in the external JSON/YAML model configuration (under <code>elements</code> property): |
| <pre class="brush: js"> |
| { |
| "elements": [ |
| { |
| "id": "wt:hist", |
| "synonyms": [ |
| "{<WEATHER>|*} <HISTORY>", |
| "<HISTORY> {<OF>|*} <WEATHER>" |
| ], |
| "description": "Past weather conditions." |
| } |
| ] |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Set of model elements, potentially empty.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getParsers--"><code>NCModelView.getParsers()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getEnabledBuiltInTokens--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEnabledBuiltInTokens</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> getEnabledBuiltInTokens()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getEnabledBuiltInTokens--">NCModelView</a></code></span></div> |
| <div class="block">Gets a set of IDs for built-in named entities (tokens) that should be enabled and detected for this model. |
| Unless model requests (i.e. enables) the built-in tokens in this method the NLP subsystem will not attempt |
| to detect them. Explicit enablement of the token significantly improves the overall performance by avoiding |
| unnecessary token detection. Note that you don't have to specify your own user elements here as they are |
| always enabled. |
| <p> |
| <b>Default</b> |
| <br> |
| The following built-in tokens are enabled by default implementation of this method: |
| <ul> |
| <li><code>nlpcraft:date</code></li> |
| <li><code>nlpcraft:continent</code></li> |
| <li><code>nlpcraft:subcontinent</code></li> |
| <li><code>nlpcraft:country</code></li> |
| <li><code>nlpcraft:metro</code></li> |
| <li><code>nlpcraft:region</code></li> |
| <li><code>nlpcraft:city</code></li> |
| <li><code>nlpcraft:num</code></li> |
| <li><code>nlpcraft:coordinate</code></li> |
| <li><code>nlpcraft:relation</code></li> |
| <li><code>nlpcraft:sort</code></li> |
| <li><code>nlpcraft:limit</code></li> |
| </ul> |
| Note that this method can return an empty list if the data model doesn't need any built-in tokens |
| for its logic. See <a href="../../../../org/apache/nlpcraft/model/NCToken.html" title="interface in org.apache.nlpcraft.model"><code>NCToken</code></a> for the list of all supported built-in tokens. |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>enabledBuiltInTokens</code> property: |
| <pre class="brush: js"> |
| { |
| "enabledBuiltInTokens": [ |
| "google:person", |
| "google:location", |
| "stanford:money" |
| ] |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Set of built-in tokens, potentially empty, that should be enabled and detected for this model.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getParsers--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getParsers</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/nlpcraft/model/NCCustomParser.html" title="interface in org.apache.nlpcraft.model">NCCustomParser</a>> getParsers()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../org/apache/nlpcraft/model/NCModelView.html#getParsers--">NCModelView</a></code></span></div> |
| <div class="block">Gets optional user-defined model element parsers for custom NER implementations. Note that order of the parsers |
| is important as they will be invoked in the same order they are returned. |
| <p> |
| By default the semantic data model detects its elements by their synonyms, regexp or DSL expressions. However, |
| in some cases these methods are not expressive enough. In such cases, a user-defined parser can be defined |
| for the model that would allow the user to define its own NER logic to detect the model elements in the user |
| input programmatically. Note that there can be only one custom parser per model and it can detect any number |
| of model elements (named entities). |
| <p> |
| <b>JSON</b> |
| <br> |
| If using JSON/YAML model presentation this is set by <code>parser</code> property which is an array |
| with every element being a fully qualified class name implementing <a href="../../../../org/apache/nlpcraft/model/NCCustomParser.html" title="interface in org.apache.nlpcraft.model"><code>NCCustomParser</code></a> interface: |
| <pre class="brush: js"> |
| { |
| "parsers": [ |
| "my.package.Parser1", |
| "my.package.Parser2" |
| ] |
| } |
| </pre></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Custom user parsers for model elements or <code>null</code> if not used (default).</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/NCModelFileAdapter.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><span style="vertical-align: super">Apache NLPCraft <span style="font-size: 80%">0.5.0</span></span> <a style="vertical-align: super; margin-right: 10px" href="https://github.com/apache/incubator-nlpcraft" target="github"><i class="fa fa-github github-logo"></i></a> <a class="github-button" href="https://github.com/apache/incubator-nlpcraft/tree/master/src/main/scala/org/apache/nlpcraft/examples" data-icon="octicon-eye" aria-label="NLPCraft Examples">Examples</a> <a class="github-button" href="https://github.com/apache/incubator-nlpcraft" data-icon="octicon-star" aria-label="Star on GitHub">Star</a> <a class="github-button" href="https://github.com/apache/incubator-nlpcraft/fork" data-icon="octicon-repo-forked" aria-label="Fork on GitHub">Fork</a> <script type="text/javascript"> SyntaxHighlighter.defaults["auto-links"] = false; SyntaxHighlighter.defaults["tab-size"] = 2; SyntaxHighlighter.autoloader( 'java ../../../../resources/sh/scripts/shBrushJava.js', 'js jscript javascript ../../../../resources/sh/scripts/shBrushJScript.js', 'text plain ../../../../resources/sh/scripts/shBrushPlain.js', 'py python ../../../../resources/sh/scripts/shBrushPython.js', 'ruby rails ror rb ../../../../resources/sh/scripts/shBrushRuby.js', 'scala ../../../../resources/sh/scripts/shBrushScala.js', 'sql ../../../../resources/sh/scripts/shBrushSql.js', 'xml xhtml xslt html ../../../../resources/sh/scripts/shBrushXml.js' ); SyntaxHighlighter.all(); </script></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/nlpcraft/model/NCModelFactory.html" title="interface in org.apache.nlpcraft.model"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/nlpcraft/model/NCModelView.html" title="interface in org.apache.nlpcraft.model"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/nlpcraft/model/NCModelFileAdapter.html" target="_top">Frames</a></li> |
| <li><a href="NCModelFileAdapter.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small><center> <br/> <span style="font-size: larger">Copyright © 2020 Apache Software Foundation</span> <br/> <br/> <img src="https://www.apache.org/img/ASF20thAnniversary.jpg" height="64px"> </center></small></p> |
| </body> |
| </html> |