UNPKG

node-nlp

Version:

Library for NLU (Natural Language Understanding) done in Node.js

1,056 lines (288 loc) 15 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: EnumNamedEntity</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: EnumNamedEntity</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>EnumNamedEntity<span class="signature">(settings)</span><span class="type-signature"></span></h2> <div class="class-description">Class for the Enumerated Named Entity.</div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="EnumNamedEntity"><span class="type-signature"></span>new EnumNamedEntity<span class="signature">(settings)</span><span class="type-signature"></span></h4> <div class="description"> Constructor of the class. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>settings</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last">Settings for the instance.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="ner_enum-named-entity.js.html">ner/enum-named-entity.js</a>, <a href="ner_enum-named-entity.js.html#line29">line 29</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="addText"><span class="type-signature"></span>addText<span class="signature">(optionName, srcLanguages, srcTexts)</span><span class="type-signature"></span></h4> <div class="description"> Add texts to the given languages of an option. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>optionName</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Name of the option.</td> </tr> <tr> <td class="name"><code>srcLanguages</code></td> <td class="type"> <span class="param-type">Array.&lt;String></span> </td> <td class="description last">Language or languages for adding the texts.</td> </tr> <tr> <td class="name"><code>srcTexts</code></td> <td class="type"> <span class="param-type">Array.&lt;String></span> </td> <td class="description last">Text or texts to be added.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="ner_enum-named-entity.js.html">ner/enum-named-entity.js</a>, <a href="ner_enum-named-entity.js.html#line63">line 63</a> </li></ul></dd> </dl> <h4 class="name" id="extract"><span class="type-signature"></span>extract<span class="signature">(utterance, language, similar, wordPositions, threshold)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4> <div class="description"> Given an utterance and language, extract the different occurances of this named entity in the utterance. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>utterance</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Source utterance to extract information.</td> </tr> <tr> <td class="name"><code>language</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Locale of the language.</td> </tr> <tr> <td class="name"><code>similar</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last">Instance of SimilarSearch.</td> </tr> <tr> <td class="name"><code>wordPositions</code></td> <td class="type"> <span class="param-type">Array.&lt;Object></span> </td> <td class="description last">Optional array of word positions.</td> </tr> <tr> <td class="name"><code>threshold</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">Threshold of accuracy.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="ner_enum-named-entity.js.html">ner/enum-named-entity.js</a>, <a href="ner_enum-named-entity.js.html#line110">line 110</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Edges found. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array.&lt;Object></span> </dd> </dl> <h4 class="name" id="getOption"><span class="type-signature"></span>getOption<span class="signature">(language, optionName, create)</span><span class="type-signature"> &rarr; {Object}</span></h4> <div class="description"> Get or create an option inside a locale </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>language</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> </td> <td class="description last">Locale of the language.</td> </tr> <tr> <td class="name"><code>optionName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="default"> </td> <td class="description last">Name of the option.</td> </tr> <tr> <td class="name"><code>create</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="default"> true </td> <td class="description last">Flag indicating if should create if not exists.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="ner_enum-named-entity.js.html">ner/enum-named-entity.js</a>, <a href="ner_enum-named-entity.js.html#line46">line 46</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Option object. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Object</span> </dd> </dl> <h4 class="name" id="removeText"><span class="type-signature"></span>removeText<span class="signature">(optionName, srcLanguages, srcTexts)</span><span class="type-signature"></span></h4> <div class="description"> Remove texts for the given languages of the option. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>optionName</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Name of the option.</td> </tr> <tr> <td class="name"><code>srcLanguages</code></td> <td class="type"> <span class="param-type">Array.&lt;String></span> </td> <td class="description last">Languages affected.</td> </tr> <tr> <td class="name"><code>srcTexts</code></td> <td class="type"> <span class="param-type">Array.&lt;String></span> </td> <td class="description last">Texts to be removed.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="ner_enum-named-entity.js.html">ner/enum-named-entity.js</a>, <a href="ner_enum-named-entity.js.html#line82">line 82</a> </li></ul></dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BinaryNeuralNetworkClassifier.html">BinaryNeuralNetworkClassifier</a></li><li><a href="Classifier.html">Classifier</a></li><li><a href="ConversationContext.html">ConversationContext</a></li><li><a href="DutchStemmer.html">DutchStemmer</a></li><li><a href="EnglishStemmer.html">EnglishStemmer</a></li><li><a href="EnumNamedEntity.html">EnumNamedEntity</a></li><li><a href="Evaluator.html">Evaluator</a></li><li><a href="HungarianStemmer.html">HungarianStemmer</a></li><li><a href="ItalianStemmer.html">ItalianStemmer</a></li><li><a href="Language.html">Language</a></li><li><a href="LogisticRegressionClassifier.html">LogisticRegressionClassifier</a></li><li><a href="Matrix.html">Matrix</a></li><li><a href="MemoryConversationContext.html">MemoryConversationContext</a></li><li><a href="NamedEntity.html">NamedEntity</a></li><li><a href="NerManager.html">NerManager</a></li><li><a href="NlgManager.html">NlgManager</a></li><li><a href="NlpClassifier.html">NlpClassifier</a></li><li><a href="NlpManager.html">NlpManager</a></li><li><a href="NorwegianStemmer.html">NorwegianStemmer</a></li><li><a href="PortugueseStemmer.html">PortugueseStemmer</a></li><li><a href="Recognizer.html">Recognizer</a></li><li><a href="RegexNamedEntity.html">RegexNamedEntity</a></li><li><a href="RomanianStemmer.html">RomanianStemmer</a></li><li><a href="RussianStemmer.html">RussianStemmer</a></li><li><a href="SentimentAnalyzer.html">SentimentAnalyzer</a></li><li><a href="SentimentManager.html">SentimentManager</a></li><li><a href="SimilarSearch.html">SimilarSearch</a></li><li><a href="SlotManager.html">SlotManager</a></li><li><a href="StemmerJa.html">StemmerJa</a></li><li><a href="SwedishStemmer.html">SwedishStemmer</a></li><li><a href="Tokenizer.html">Tokenizer</a></li><li><a href="TrimNamedEntity.html">TrimNamedEntity</a></li><li><a href="TurkishStemmer.html">TurkishStemmer</a></li><li><a href="Vector.html">Vector</a></li><li><a href="XTable.html">XTable</a></li></ul><h3>Global</h3><ul><li><a href="global.html#endsinArr">endsinArr</a></li><li><a href="global.html#prelude">prelude</a></li><li><a href="global.html#regions">regions</a></li><li><a href="global.html#stem">stem</a></li><li><a href="global.html#stopwords">stopwords</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Oct 13 2018 19:14:51 GMT+0200 (CEST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>