UNPKG

node-nlp

Version:

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

858 lines (232 loc) 11.6 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Global</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">Global</h1> <section> <header> <h2></h2> </header> <article> <div class="container-overview"> <dl class="details"> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="stopwords"><span class="type-signature"></span>stopwords<span class="type-signature"></span></h4> <div class="description"> A very basic stemmer that performs the following steps: * Stem katakana. Inspired by: http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/JapaneseKatakanaStemFilter.java This script assumes input is normalized using normalizer_ja(). </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="nlp_stemmers_natural_stemmer-ja.js.html">nlp/stemmers/natural/stemmer-ja.js</a>, <a href="nlp_stemmers_natural_stemmer-ja.js.html#line34">line 34</a> </li></ul></dd> <dt class="tag-todo">To Do:</dt> <dd class="tag-todo"> <ul> <li>Use .bind() in StemmerJa.prototype.attach().</li> </ul> </dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="endsinArr"><span class="type-signature"></span>endsinArr<span class="signature">(token, suffixes)</span><span class="type-signature"> &rarr; {String}</span></h4> <div class="description"> Return longest matching suffixes for a token or '' if no suffix match </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>token</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Word to find matching suffix</td> </tr> <tr> <td class="name"><code>suffixes</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="description last">Array of suffixes to test matching</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="nlp_stemmers_natural_porter-stemmer-fr.js.html">nlp/stemmers/natural/porter-stemmer-fr.js</a>, <a href="nlp_stemmers_natural_porter-stemmer-fr.js.html#line358">line 358</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Longest found matching suffix or '' </div> <dl> <dt> Type </dt> <dd> <span class="param-type">String</span> </dd> </dl> <h4 class="name" id="prelude"><span class="type-signature"></span>prelude<span class="signature">(token)</span><span class="type-signature"> &rarr; {String}</span></h4> <div class="description"> Pre-process/prepare words as required by french porter stemmer algorithm </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>token</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Word to be prepared</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="nlp_stemmers_natural_porter-stemmer-fr.js.html">nlp/stemmers/natural/porter-stemmer-fr.js</a>, <a href="nlp_stemmers_natural_porter-stemmer-fr.js.html#line324">line 324</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Prepared word </div> <dl> <dt> Type </dt> <dd> <span class="param-type">String</span> </dd> </dl> <h4 class="name" id="regions"><span class="type-signature"></span>regions<span class="signature">(token)</span><span class="type-signature"> &rarr; {Object}</span></h4> <div class="description"> Compute r1, r2, rv regions as required by french porter stemmer algorithm </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>token</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Word to compute regions on</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="nlp_stemmers_natural_porter-stemmer-fr.js.html">nlp/stemmers/natural/porter-stemmer-fr.js</a>, <a href="nlp_stemmers_natural_porter-stemmer-fr.js.html#line274">line 274</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Regions r1, r2, rv as offsets from the begining of the word </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Object</span> </dd> </dl> <h4 class="name" id="stem"><span class="type-signature"></span>stem<span class="signature">(token)</span><span class="type-signature"> &rarr; {String}</span></h4> <div class="description"> Stem a word thanks to Porter Stemmer rules </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>token</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Word to be stemmed</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="nlp_stemmers_natural_porter-stemmer-fr.js.html">nlp/stemmers/natural/porter-stemmer-fr.js</a>, <a href="nlp_stemmers_natural_porter-stemmer-fr.js.html#line48">line 48</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Stemmed word </div> <dl> <dt> Type </dt> <dd> <span class="param-type">String</span> </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>