diff --git a/.gitignore b/.gitignore index c6e5bb2..35475c5 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ dist corenlp coverage .nyc_output -docs diff --git a/docs/ConnectorCli.html b/docs/ConnectorCli.html new file mode 100644 index 0000000..3bec28c --- /dev/null +++ b/docs/ConnectorCli.html @@ -0,0 +1,423 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>ConnectorCli - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">ConnectorCli</h1> + + + + + + + +<section> + +<header> + + <h2> + ConnectorCli + </h2> + + <div class="class-description"><p>Class representing a Connector CLI (command line interface client)</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="ConnectorCli"><span class="type-signature"></span>new ConnectorCli<span class="signature">(config)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="connector_connector-cli.js.html">connector/connector-cli.js</a>, <a href="connector_connector-cli.js.html#line15">line 15</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create a ConnectorCli</p> +</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>config</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + + + + <td class="description last"> + <h6>Properties</h6> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>classPath</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>The path to the Jar files to be included</p></td> + </tr> + + + + <tr> + + <td class="name"><code>mainClass</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>The name of the Java class that represents the main program</p></td> + </tr> + + + + <tr> + + <td class="name"><code>props</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>The - path to the properties file (for example, language specific)</p></td> + </tr> + + + </tbody> +</table> + + </td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">()</span><span class="type-signature"> → {Promise.<Object>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="connector_connector-cli.js.html">connector/connector-cli.js</a>, <a href="connector_connector-cli.js.html#line39">line 39</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Promise.<Object></span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/ConnectorServer.html b/docs/ConnectorServer.html new file mode 100644 index 0000000..a261291 --- /dev/null +++ b/docs/ConnectorServer.html @@ -0,0 +1,597 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>ConnectorServer - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">ConnectorServer</h1> + + + + + + + +<section> + +<header> + + <h2> + ConnectorServer + </h2> + + <div class="class-description"><p>Class representing a Connector Server (web server client)</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="ConnectorServer"><span class="type-signature"></span>new ConnectorServer<span class="signature">(config)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="connector_connector-server.js.html">connector/connector-server.js</a>, <a href="connector_connector-server.js.html#line11">line 11</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create a ConnectorServer</p> +</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>config</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + + + + <td class="description last"> + <h6>Properties</h6> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>dsn</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>The StanfordCoreNLPServer dsn (example: 'http://localhost:9000')</p></td> + </tr> + + + </tbody> +</table> + + </td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(config, utility<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<Object>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="connector_connector-server.js.html">connector/connector-server.js</a>, <a href="connector_connector-server.js.html#line32">line 32</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>config</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + + <td class="description last"> + <h6>Properties</h6> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>annotators</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<string></span> + + + + </td> + + + + + + <td class="description last"><p>The list of annotators that defines the pipeline</p></td> + </tr> + + + + <tr> + + <td class="name"><code>text</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>The text to run the pipeline against</p></td> + </tr> + + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + + + + <td class="description last"><p>Additinal options (properties) for the pipeline</p></td> + </tr> + + + + <tr> + + <td class="name"><code>language</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>Language full name in CamelCase (eg. Spanish)</p></td> + </tr> + + + </tbody> +</table> + + </td> + </tr> + + + + <tr> + + <td class="name"><code>utility</code></td> + + + <td class="type"> + + +<span class="param-type">''</span> +| + +<span class="param-type">'tokensregex'</span> +| + +<span class="param-type">'semgrex'</span> +| + +<span class="param-type">'tregex'</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>Name of the utility to use +NOTE: most of the utilities receives properties, these should be passed via the options param</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Promise.<Object></span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP.html b/docs/CoreNLP.html new file mode 100644 index 0000000..937bffb --- /dev/null +++ b/docs/CoreNLP.html @@ -0,0 +1,140 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>CoreNLP - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">CoreNLP</h1> + + + + + + + +<section> + +<header> + + <h2> + CoreNLP + </h2> + + +</header> + +<article> + <div class="container-overview"> + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="index.js.html">index.js</a>, <a href="index.js.html#line30">line 30</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + <div class="description"><p>CoreNLP NodeJS Interface</p></div> + + + + + </div> + + + + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple.Annotable.html b/docs/CoreNLP_simple.Annotable.html new file mode 100644 index 0000000..094b65d --- /dev/null +++ b/docs/CoreNLP_simple.Annotable.html @@ -0,0 +1,1270 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Annotable - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Annotable</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple.html">CoreNLP/simple</a>.</span> + + Annotable + </h2> + + <div class="class-description"><p>Class representing an Annotable</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Annotable"><span class="type-signature"></span>new Annotable<span class="signature">(text)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotable.js.html">simple/annotable.js</a>, <a href="simple_annotable.js.html#line6">line 6</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotable</p> +</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>text</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id="addAnnotator"><span class="type-signature"></span>addAnnotator<span class="signature">(annotator)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotable.js.html">simple/annotable.js</a>, <a href="simple_annotable.js.html#line46">line 46</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Marks an annotator as a met dependency</p> +</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>annotator</code></td> + + + <td class="type"> + + +<span class="param-type">Annotator</span> +| + +<span class="param-type">function</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + + + + + <h4 class="name" id="addAnnotators"><span class="type-signature"></span>addAnnotators<span class="signature">(annotators)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotable.js.html">simple/annotable.js</a>, <a href="simple_annotable.js.html#line54">line 54</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Marks multiple annotators as a met dependencies</p> +</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>annotators</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<(Annotator|function())></span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + + + + + <h4 class="name" id="getLanguageISO"><span class="type-signature"></span>getLanguageISO<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotable.js.html">simple/annotable.js</a>, <a href="simple_annotable.js.html#line38">line 38</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the language ISO (in lowercase ISO2 format)</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>iso</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="hasAnnotator"><span class="type-signature"></span>hasAnnotator<span class="signature">(annotator)</span><span class="type-signature"> → {boolean}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotable.js.html">simple/annotable.js</a>, <a href="simple_annotable.js.html#line71">line 71</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Tells you if an annotator is a met dependency</p> +</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>annotator</code></td> + + + <td class="type"> + + +<span class="param-type">Annotator</span> +| + +<span class="param-type">function</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>hasAnnotator</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">boolean</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="hasAnyAnnotator"><span class="type-signature"></span>hasAnyAnnotator<span class="signature">(annotators)</span><span class="type-signature"> → {boolean}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotable.js.html">simple/annotable.js</a>, <a href="simple_annotable.js.html#line80">line 80</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Tells you if at least on of a list of annotators is a met dependency</p> +</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>annotators</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<(Annotator|function())></span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>hasAnyAnnotator</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">boolean</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="removeAnnotator"><span class="type-signature"></span>removeAnnotator<span class="signature">(annotator)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotable.js.html">simple/annotable.js</a>, <a href="simple_annotable.js.html#line62">line 62</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Unmarks an annotator as a met dependency</p> +</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>annotator</code></td> + + + <td class="type"> + + +<span class="param-type">Annotator</span> +| + +<span class="param-type">function</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + + + + + <h4 class="name" id="setLanguageISO"><span class="type-signature"></span>setLanguageISO<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotable.js.html">simple/annotable.js</a>, <a href="simple_annotable.js.html#line30">line 30</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Sets the language ISO (given by the pipeline during the annotation process) +This is solely to keep track of the language chosen for further analysis +The language string should be passed in lowercase ISO2 format</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>text</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="text"><span class="type-signature"></span>text<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotable.js.html">simple/annotable.js</a>, <a href="simple_annotable.js.html#line20">line 20</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representation of the raw text</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>text</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple.Annotator.html b/docs/CoreNLP_simple.Annotator.html new file mode 100644 index 0000000..1fe8f0f --- /dev/null +++ b/docs/CoreNLP_simple.Annotator.html @@ -0,0 +1,1220 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Annotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Annotator</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple.html">CoreNLP/simple</a>.</span> + + Annotator + </h2> + + <div class="class-description"><p>Class representing an Annotatror</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Annotator"><span class="type-signature"></span>new Annotator<span class="signature">(name, options<span class="signature-attributes">opt</span>, dependencies<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator.js.html">simple/annotator.js</a>, <a href="simple_annotator.js.html#line11">line 11</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>name</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + + <tr> + + <td class="name"><code>dependencies</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<Annotator></span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id="dependencies"><span class="type-signature"></span>dependencies<span class="signature">()</span><span class="type-signature"> → {Array.<Annotator>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator.js.html">simple/annotator.js</a>, <a href="simple_annotator.js.html#line70">line 70</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a list of annotators dependencies</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>dependencies</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<Annotator></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="equalsTo"><span class="type-signature"></span>equalsTo<span class="signature">(annotator)</span><span class="type-signature"> → {boolean}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator.js.html">simple/annotator.js</a>, <a href="simple_annotator.js.html#line40">line 40</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Defines whether a given annotator is the same as current, using shallow compare. +This is useful for a Document or Sentence to validate if the minimum of annotators required +were already applied to them. Allows at the same time the users to instantiate new annotators +and configure them as needed.</p> +</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>annotator</code></td> + + + <td class="type"> + + +<span class="param-type">Annotator</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">boolean</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="option"><span class="type-signature"></span>option<span class="signature">(key, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator.js.html">simple/annotator.js</a>, <a href="simple_annotator.js.html#line58">line 58</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get/Set an option value</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + <th>Default</th> + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>key</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + <td class="default"> + + </td> + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>value</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> +| + +<span class="param-type">boolean</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + <td class="default"> + + <code>null</code> + + </td> + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>value</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="options"><span class="type-signature"></span>options<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator.js.html">simple/annotator.js</a>, <a href="simple_annotator.js.html#line48">line 48</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an Object key-value representation of the annotor's options (excluding prefix)</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>options</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Object</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="pipeline"><span class="type-signature"></span>pipeline<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator.js.html">simple/annotator.js</a>, <a href="simple_annotator.js.html#line80">line 80</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a list of annotators dependencies, following by this annotator, all this as +a list of strings +This is useful to fulfill the <code>annotators</code> param in CoreNLP API properties.</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>pipeline</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<string></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="pipelineOptions"><span class="type-signature"></span>pipelineOptions<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator.js.html">simple/annotator.js</a>, <a href="simple_annotator.js.html#line96">line 96</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an object of all the Annotator options including the current and all its +dependencies, prefixed by the annotator names +This is useful to fulfill the options params in CoreNLP API properties.</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>pipelineOptions</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<string></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator.js.html">simple/annotator.js</a>, <a href="simple_annotator.js.html#line28">line 28</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representation</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>annotator</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple.Document.html b/docs/CoreNLP_simple.Document.html new file mode 100644 index 0000000..d84eeb0 --- /dev/null +++ b/docs/CoreNLP_simple.Document.html @@ -0,0 +1,1297 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Document - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Document</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple.html">CoreNLP/simple</a>.</span> + + Document + </h2> + + <div class="class-description"><p>Class representing a Document</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Document"><span class="type-signature"></span>new Document<span class="signature">(text)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_document.js.html">simple/document.js</a>, <a href="simple_document.js.html#line20">line 20</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create a Document</p> +</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>text</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotable</li> + </ul> + + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id=".fromJSON"><span class="type-signature">(static) </span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {Document}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_document.js.html">simple/document.js</a>, <a href="simple_document.js.html#line121">line 121</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an instance of Document from a given JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#DocumentJSON">DocumentJSON</a></span> + + + + </td> + + + + + + <td class="description last"><p>The document data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>document - A new Document instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Document</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="coref"><span class="type-signature"></span>coref<span class="signature">(index)</span><span class="type-signature"> → {<a href="CorefChain.html">CorefChain</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_document.js.html">simple/document.js</a>, <a href="simple_document.js.html#line76">line 76</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/dcoref.html">https://stanfordnlp.github.io/CoreNLP/dcoref.html</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Get the coreference for a given index</p> +</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>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>0-based index of the coref chain list</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="CorefChain.html">CorefChain</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="corefs"><span class="type-signature"></span>corefs<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="CorefChain.html">CorefChain</a>>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_document.js.html">simple/document.js</a>, <a href="simple_document.js.html#line63">line 63</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/dcoref.html">https://stanfordnlp.github.io/CoreNLP/dcoref.html</a></li> + </ul> + </dd> + + + + <dt class="tag-todo">To Do:</dt> + <dd class="tag-todo"> + <ul> + <li>Missing implementation</li> + </ul> + </dd> + +</dl> + + + + + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<<a href="CorefChain.html">CorefChain</a>></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="fromJSON"><span class="type-signature"></span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {Document}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_document.js.html">simple/document.js</a>, <a href="simple_document.js.html#line95">line 95</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Update an instance of Document with data provided by a JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#DocumentJSON">DocumentJSON</a></span> + + + + </td> + + + + + + <td class="description last"><p>The document data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>document - The current document instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Document</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="sentence"><span class="type-signature"></span>sentence<span class="signature">(index)</span><span class="type-signature"> → {Sentence}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_document.js.html">simple/document.js</a>, <a href="simple_document.js.html#line54">line 54</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the sentence for a given index</p> +</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>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>The position of the sentence to get</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>sentence - The document sentences</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Sentence</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="sentences"><span class="type-signature"></span>sentences<span class="signature">()</span><span class="type-signature"> → {Array.<Sentence>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_document.js.html">simple/document.js</a>, <a href="simple_document.js.html#line42">line 42</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a list of sentences</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>sentences - The document sentences</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<Sentence></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="setLanguageISO"><span class="type-signature"></span>setLanguageISO<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_document.js.html">simple/document.js</a>, <a href="simple_document.js.html#line85">line 85</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Sets the language ISO (given by the pipeline during the annotation process) +This is solely to keep track of the language chosen for further analysis</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>text</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_document.js.html">simple/document.js</a>, <a href="simple_document.js.html#line34">line 34</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representation</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>document</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple.Expression.html b/docs/CoreNLP_simple.Expression.html new file mode 100644 index 0000000..f1b709e --- /dev/null +++ b/docs/CoreNLP_simple.Expression.html @@ -0,0 +1,1211 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Expression - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Expression</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple.html">CoreNLP/simple</a>.</span> + + Expression + </h2> + + <div class="class-description"><p>Class representing an Expression</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Expression"><span class="type-signature"></span>new Expression<span class="signature">(text, pattern)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression.js.html">simple/expression.js</a>, <a href="simple_expression.js.html#line24">line 24</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create an Expression</p> +</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>text</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>pattern</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>Either <code>TokensRegex</code>, <code>Semgrex</code> or <code>Tregex</code> valid pattern</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotable</li> + </ul> + + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id=".fromJSON"><span class="type-signature">(static) </span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {Expression}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression.js.html">simple/expression.js</a>, <a href="simple_expression.js.html#line106">line 106</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an instance of Expression from a given JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#ExpressionJSON">ExpressionJSON</a></span> + + + + </td> + + + + + + <td class="description last"><p>The expression data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>expression - A new Expression instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Expression</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="fromJSON"><span class="type-signature"></span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {Expression}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression.js.html">simple/expression.js</a>, <a href="simple_expression.js.html#line86">line 86</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Update an instance of Expression with data provided by a JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#ExpressionJSON">ExpressionJSON</a></span> + + + + </td> + + + + + + <td class="description last"><p>The expression data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>expression - The current expression instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Expression</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="mergeTokensFromDocument"><span class="type-signature"></span>mergeTokensFromDocument<span class="signature">(document)</span><span class="type-signature"> → {Expression}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression.js.html">simple/expression.js</a>, <a href="simple_expression.js.html#line75">line 75</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="ExpressionSentence.html#mergeTokensFromSentence">ExpressionSentence#mergeTokensFromSentence</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Hydrate the Expression instance with Token objects from an annotated Document</p> +</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>document</code></td> + + + <td class="type"> + + +<span class="param-type">Document</span> + + + + </td> + + + + + + <td class="description last"><p>An annotated document from where to extract the tokens</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>expression - The current expression instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Expression</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="pattern"><span class="type-signature"></span>pattern<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression.js.html">simple/expression.js</a>, <a href="simple_expression.js.html#line48">line 48</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the pattern</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>pattern - The expression pattern</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="sentence"><span class="type-signature"></span>sentence<span class="signature">(index)</span><span class="type-signature"> → {<a href="ExpressionSentence.html">ExpressionSentence</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression.js.html">simple/expression.js</a>, <a href="simple_expression.js.html#line65">line 65</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the sentence for a given index</p> +</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>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>The position of the sentence to get</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>sentence - An expression sentence</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="ExpressionSentence.html">ExpressionSentence</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="sentences"><span class="type-signature"></span>sentences<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="ExpressionSentence.html">ExpressionSentence</a>>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression.js.html">simple/expression.js</a>, <a href="simple_expression.js.html#line56">line 56</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a list of sentences</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>sentences - The expression sentences</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<<a href="ExpressionSentence.html">ExpressionSentence</a>></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression.js.html">simple/expression.js</a>, <a href="simple_expression.js.html#line40">line 40</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representation</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>expression</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple.Governor.html b/docs/CoreNLP_simple.Governor.html new file mode 100644 index 0000000..7afcfa8 --- /dev/null +++ b/docs/CoreNLP_simple.Governor.html @@ -0,0 +1,591 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Governor - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Governor</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple.html">CoreNLP/simple</a>.</span> + + Governor + </h2> + + <div class="class-description"><p>Class representing a Governor</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Governor"><span class="type-signature"></span>new Governor<span class="signature">(dep, dependentToken, governorToken<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_governor.js.html">simple/governor.js</a>, <a href="simple_governor.js.html#line18">line 18</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create a Governor</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + <th>Default</th> + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>dep</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + <td class="default"> + + </td> + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>dependentToken</code></td> + + + <td class="type"> + + +<span class="param-type">Token</span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + <td class="default"> + + </td> + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>governorToken</code></td> + + + <td class="type"> + + +<span class="param-type">Token</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + <td class="default"> + + <code>null</code> + + </td> + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id=".fromJSON"><span class="type-signature">(static) </span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {Governor}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_governor.js.html">simple/governor.js</a>, <a href="simple_governor.js.html#line82">line 82</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-todo">To Do:</dt> + <dd class="tag-todo"> + <ul> + <li>It is not possible to properly generate a Governor from a GovernorJSON + the Governor requires references to the Token instances in order to work</li> + </ul> + </dd> + +</dl> + + + + + +<div class="description"> + <p>Get an instance of Governor from a given JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#GovernorJSON">GovernorJSON</a></span> + + + + </td> + + + + + + <td class="description last"><p>The token data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>governor - A new Governor instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Governor</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_governor.js.html">simple/governor.js</a>, <a href="simple_governor.js.html#line36">line 36</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representation</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>governor</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple.Sentence.html b/docs/CoreNLP_simple.Sentence.html new file mode 100644 index 0000000..364abb3 --- /dev/null +++ b/docs/CoreNLP_simple.Sentence.html @@ -0,0 +1,2991 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Sentence - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Sentence</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple.html">CoreNLP/simple</a>.</span> + + Sentence + </h2> + + <div class="class-description"><p>Class representing a Sentence</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Sentence"><span class="type-signature"></span>new Sentence<span class="signature">(text)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line24">line 24</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://github.com/stanfordnlp/CoreNLP/blob/master/src/edu/stanford/nlp/simple/Sentence.java">https://github.com/stanfordnlp/CoreNLP/blob/master/src/edu/stanford/nlp/simple/Sentence.java</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create a Sentence</p> +</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>text</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotable</li> + </ul> + + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id=".fromJSON"><span class="type-signature">(static) </span>fromJSON<span class="signature">(data, isSentence<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Sentence}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line310">line 310</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an instance of Sentence from a given JSON</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + <th>Default</th> + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#SentenceJSON">SentenceJSON</a></span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + <td class="default"> + + </td> + + + <td class="description last"><p>The document data, as returned by CoreNLP API service</p></td> + </tr> + + + + <tr> + + <td class="name"><code>isSentence</code></td> + + + <td class="type"> + + +<span class="param-type">boolean</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + <td class="default"> + + <code>false</code> + + </td> + + + <td class="description last"><p>Indicate if the given data represents just the sentence of a +full document</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>document - A new Sentence instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Sentence</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="fromJSON"><span class="type-signature"></span>fromJSON<span class="signature">(data, isSentence<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Sentence}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line279">line 279</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Update an instance of Sentence with data provided by a JSON</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + <th>Default</th> + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#SentenceJSON">SentenceJSON</a></span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + <td class="default"> + + </td> + + + <td class="description last"><p>The document data, as returned by CoreNLP API service</p></td> + </tr> + + + + <tr> + + <td class="name"><code>isSentence</code></td> + + + <td class="type"> + + +<span class="param-type">boolean</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + <td class="default"> + + <code>false</code> + + </td> + + + <td class="description last"><p>Indicate if the given data represents just the sentence +or a full document with just a sentence inside</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>sentence - The current sentence instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Sentence</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="governor"><span class="type-signature"></span>governor<span class="signature">()</span><span class="type-signature"> → {Governor}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line176">line 176</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the N-th annotated governor by the dependency-parser annotator</p> +</div> + + + + + + + + + + + + + +<h5>Requires:</h5> +<ul> + <li>DependencyParseAnnotator</li> +</ul> + + + + + + + + + +<h5>Throws:</h5> + + + +<dl> + <dt> + <div class="param-desc"> + <p>in case the require annotator was not applied to the sentence</p> + </div> + </dt> + <dd></dd> + <dt> + <dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Error</span> + + + </dd> + </dl> + </dt> + <dd></dd> +</dl> + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>governor</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Governor</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="governors"><span class="type-signature"></span>governors<span class="signature">()</span><span class="type-signature"> → {Array.<Governor>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line163">line 163</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a list of annotated governors by the dependency-parser</p> +</div> + + + + + + + + + + + + + +<h5>Requires:</h5> +<ul> + <li>DependencyParseAnnotator</li> +</ul> + + + + + + + + + +<h5>Throws:</h5> + + + +<dl> + <dt> + <div class="param-desc"> + <p>in case the require annotator was not applied to the sentence</p> + </div> + </dt> + <dd></dd> + <dt> + <dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Error</span> + + + </dd> + </dl> + </dt> + <dd></dd> +</dl> + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>governors</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<Governor></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="index"><span class="type-signature"></span>index<span class="signature">()</span><span class="type-signature"> → {number}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line47">line 47</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the index relative to the parent document</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>index</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">number</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="lemma"><span class="type-signature"></span>lemma<span class="signature">(index)</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line129">line 129</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representations of the Nth token lemma of the sentence</p> +</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>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>0-based index as they are arranged naturally</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + +<h5>Throws:</h5> + + + +<dl> + <dt> + <div class="param-desc"> + <p>in case the token for the given index does not exists</p> + </div> + </dt> + <dd></dd> + <dt> + <dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Error</span> + + + </dd> + </dl> + </dt> + <dd></dd> +</dl> + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>lemma</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="lemmas"><span class="type-signature"></span>lemmas<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line119">line 119</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representations of the tokens lemmas of the sentence</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>lemmas</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<string></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="nerTag"><span class="type-signature"></span>nerTag<span class="signature">(index)</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line150">line 150</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representations of the Nth token nerTag of the sentence</p> +</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>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>0-based index as they are arranged naturally</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + +<h5>Throws:</h5> + + + +<dl> + <dt> + <div class="param-desc"> + <p>in case the token for the given index does not exists</p> + </div> + </dt> + <dd></dd> + <dt> + <dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Error</span> + + + </dd> + </dl> + </dt> + <dd></dd> +</dl> + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>nerTag</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="nerTags"><span class="type-signature"></span>nerTags<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line140">line 140</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representations of the tokens nerTags of the sentence</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>nerTags</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<string></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="parse"><span class="type-signature"></span>parse<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line55">line 55</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representation of the parse tree structure</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>parse</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="posTag"><span class="type-signature"></span>posTag<span class="signature">(index)</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line108">line 108</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representations of the Nth token part of speech of the sentence</p> +</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>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>0-based index as they are arranged naturally</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + +<h5>Throws:</h5> + + + +<dl> + <dt> + <div class="param-desc"> + <p>in case the token for the given index does not exists</p> + </div> + </dt> + <dd></dd> + <dt> + <dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Error</span> + + + </dd> + </dl> + </dt> + <dd></dd> +</dl> + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>posTag</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="posTags"><span class="type-signature"></span>posTags<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line98">line 98</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representations of the tokens part of speech of the sentence</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>posTags</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<string></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="setLanguageISO"><span class="type-signature"></span>setLanguageISO<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line244">line 244</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Sets the language ISO (given by the pipeline during the annotation process) +This is solely to keep track of the language chosen for further analysis</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>text</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="toJSON"><span class="type-signature"></span>toJSON<span class="signature">()</span><span class="type-signature"> → {<a href="global.html#SentenceJSON">SentenceJSON</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line257">line 257</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>The following arrow function <code>data => Sentence.fromJSON(data).toJSON()</code> is idempontent, if +considering shallow comparison, not by reference. +This JSON will respects the same structure as it expects from {@see Sentence#fromJSON}.</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>data</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="global.html#SentenceJSON">SentenceJSON</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="token"><span class="type-signature"></span>token<span class="signature">()</span><span class="type-signature"> → {Token}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line227">line 227</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the Nth token of the sentence</p> +</div> + + + + + + + + + + + + + +<h5>Requires:</h5> +<ul> + <li>TokenizerAnnotator</li> +</ul> + + + + + + + + + +<h5>Throws:</h5> + + + +<dl> + <dt> + <div class="param-desc"> + <p>in case the require annotator was not applied to the sentence</p> + </div> + </dt> + <dd></dd> + <dt> + <dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Error</span> + + + </dd> + </dl> + </dt> + <dd></dd> +</dl> + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>token</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Token</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="tokens"><span class="type-signature"></span>tokens<span class="signature">()</span><span class="type-signature"> → {Array.<Token>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line214">line 214</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an array of token representations of the sentence words</p> +</div> + + + + + + + + + + + + + +<h5>Requires:</h5> +<ul> + <li>TokenizerAnnotator</li> +</ul> + + + + + + + + + +<h5>Throws:</h5> + + + +<dl> + <dt> + <div class="param-desc"> + <p>in case the require annotator was not applied to the sentence</p> + </div> + </dt> + <dd></dd> + <dt> + <dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Error</span> + + + </dd> + </dl> + </dt> + <dd></dd> +</dl> + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>tokens</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<Token></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line39">line 39</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representation</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>sentence</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="word"><span class="type-signature"></span>word<span class="signature">(index)</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line80">line 80</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representations of the Nth word of the sentence</p> +</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>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>0-based index as they are arranged naturally</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>TokenizerAnnotator</li> +</ul> + + + + + + + + + +<h5>Throws:</h5> +<ul> + <li> + +<dl> + <dt> + <div class="param-desc"> + <p>in case the require annotator was not applied to the sentence</p> + </div> + </dt> + <dd></dd> + <dt> + <dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Error</span> + + + </dd> + </dl> + </dt> + <dd></dd> +</dl> + +</li> + + <li> + +<dl> + <dt> + <div class="param-desc"> + <p>in case the token for the given index does not exists</p> + </div> + </dt> + <dd></dd> + <dt> + <dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Error</span> + + + </dd> + </dl> + </dt> + <dd></dd> +</dl> + +</li> + </ul> + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>word</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="words"><span class="type-signature"></span>words<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line65">line 65</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an array of string representations of the sentence words</p> +</div> + + + + + + + + + + + + + +<h5>Requires:</h5> +<ul> + <li>TokenizerAnnotator</li> +</ul> + + + + + + + + + +<h5>Throws:</h5> + + + +<dl> + <dt> + <div class="param-desc"> + <p>in case the require annotator was not applied to the sentence</p> + </div> + </dt> + <dd></dd> + <dt> + <dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Error</span> + + + </dd> + </dl> + </dt> + <dd></dd> +</dl> + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>words</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<string></span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple.Token.html b/docs/CoreNLP_simple.Token.html new file mode 100644 index 0000000..7307aec --- /dev/null +++ b/docs/CoreNLP_simple.Token.html @@ -0,0 +1,1902 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Token - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Token</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple.html">CoreNLP/simple</a>.</span> + + Token + </h2> + + <div class="class-description"><p>Class representing a Token</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Token"><span class="type-signature"></span>new Token<span class="signature">(word)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line38">line 38</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create a Token</p> +</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>word</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotable</li> + </ul> + + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id=".fromJSON"><span class="type-signature">(static) </span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {Token}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line190">line 190</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an instance of Token from a given JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#TokenJSON">TokenJSON</a></span> + + + + </td> + + + + + + <td class="description last"><p>The token data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>token - A new Token instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Token</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="after"><span class="type-signature"></span>after<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line113">line 113</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the <code>after</code> string relative to the container sentence</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>after</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="before"><span class="type-signature"></span>before<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line105">line 105</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the <code>before</code> string relative to the container sentence</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>before</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="characterOffsetBegin"><span class="type-signature"></span>characterOffsetBegin<span class="signature">()</span><span class="type-signature"> → {number}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line88">line 88</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>A 0-based index of the word's initial character within the sentence</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>characterOffsetBegin</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">number</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="characterOffsetEnd"><span class="type-signature"></span>characterOffsetEnd<span class="signature">()</span><span class="type-signature"> → {number}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line97">line 97</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the characterOffsetEnd relative to the parent sentence +A 0-based index of the word's ending character within the sentence</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>characterOffsetEnd</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">number</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="index"><span class="type-signature"></span>index<span class="signature">()</span><span class="type-signature"> → {number}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line62">line 62</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the <code>inde</code> number associated by the StanfordCoreNLP +This index is relative to the sentence it belongs to, and is a 1-based (possitive integer). +This number is useful to match tokens within a sentence for depparse, coreference, etc.</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>index</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">number</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="lemma"><span class="type-signature"></span>lemma<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line121">line 121</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the annotated lemma</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>lemma</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="ner"><span class="type-signature"></span>ner<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line147">line 147</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the annotated named-entity for the current token</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>ner</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="originalText"><span class="type-signature"></span>originalText<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line78">line 78</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the original text</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>originalText</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="pos"><span class="type-signature"></span>pos<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line129">line 129</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the annotated part-of-speech for the current token</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>pos</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="posInfo"><span class="type-signature"></span>posInfo<span class="signature">()</span><span class="type-signature"> → {<a href="global.html#PosInfo">PosInfo</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line139">line 139</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="global.html#PosInfo">PosInfo</a> for more details</li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Get additional metadata about the POS annotation +NOTE: Do not use this method other than just for study or analysis purposes.</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>posInfo</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="global.html#PosInfo">PosInfo</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="speaker"><span class="type-signature"></span>speaker<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line156">line 156</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li>CorefAnnotator</li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Get the annotated speaker for the current token</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>speaker</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="toJSON"><span class="type-signature"></span>toJSON<span class="signature">()</span><span class="type-signature"> → {<a href="global.html#TokenJSON">TokenJSON</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line168">line 168</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>The following arrow function <code>data => Token.fromJSON(data).toJSON()</code> is idempontent, if +considering shallow comparison, not by reference. +This JSON will respects the same structure as it expects from {@see Token#fromJSON}.</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>data</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="global.html#TokenJSON">TokenJSON</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line52">line 52</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a string representation</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>token</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="word"><span class="type-signature"></span>word<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line70">line 70</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get the original word</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>word</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple.html b/docs/CoreNLP_simple.html new file mode 100644 index 0000000..6fe272e --- /dev/null +++ b/docs/CoreNLP_simple.html @@ -0,0 +1,165 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>CoreNLP/simple - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">CoreNLP/simple</h1> + + + + + + + +<section> + +<header> + + <h2> + CoreNLP/simple + </h2> + + +</header> + +<article> + <div class="container-overview"> + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="index.js.html">index.js</a>, <a href="index.js.html#line35">line 35</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + <div class="description"><p>NodeJS API that emulates <a href="https://stanfordnlp.github.io/CoreNLP/simple.html">https://stanfordnlp.github.io/CoreNLP/simple.html</a></p></div> + + + + + </div> + + + + + + + <h3 class="subsection-title">Classes</h3> + + <dl> + <dt><a href="CoreNLP_simple.Annotable.html">Annotable</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple.Annotator.html">Annotator</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple.Document.html">Document</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple.Expression.html">Expression</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple.Governor.html">Governor</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple.Sentence.html">Sentence</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple.Token.html">Token</a></dt> + <dd></dd> + </dl> + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.CorefAnnotator.html b/docs/CoreNLP_simple_annotator.CorefAnnotator.html new file mode 100644 index 0000000..4539dda --- /dev/null +++ b/docs/CoreNLP_simple_annotator.CorefAnnotator.html @@ -0,0 +1,269 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>CorefAnnotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">CorefAnnotator</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a>.</span> + + CorefAnnotator + </h2> + + <div class="class-description"><p>Class representing an CorefAnnotator.</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="CorefAnnotator"><span class="type-signature"></span>new CorefAnnotator<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator_coref.js.html">simple/annotator/coref.js</a>, <a href="simple_annotator_coref.js.html#line13">line 13</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/coref.html">CorefAnnotator</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>module:tokenize,</li> +</ul> + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + <h3 class="subsection-title">Requires</h3> + + <ul> + <li>module:tokenize,</li> + </ul> + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.DependencyParseAnnotator.html b/docs/CoreNLP_simple_annotator.DependencyParseAnnotator.html new file mode 100644 index 0000000..6c12e5d --- /dev/null +++ b/docs/CoreNLP_simple_annotator.DependencyParseAnnotator.html @@ -0,0 +1,269 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>DependencyParseAnnotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">DependencyParseAnnotator</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a>.</span> + + DependencyParseAnnotator + </h2> + + <div class="class-description"><p>Class representing an DependencyParseAnnotator. Hydrates Sentence.governors()</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="DependencyParseAnnotator"><span class="type-signature"></span>new DependencyParseAnnotator<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator_depparse.js.html">simple/annotator/depparse.js</a>, <a href="simple_annotator_depparse.js.html#line14">line 14</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/depparse.html">DependencyParseAnnotator</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>module:tokenize,</li> +</ul> + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + <h3 class="subsection-title">Requires</h3> + + <ul> + <li>module:tokenize,</li> + </ul> + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.DeterministicCorefAnnotator.html b/docs/CoreNLP_simple_annotator.DeterministicCorefAnnotator.html new file mode 100644 index 0000000..db14af5 --- /dev/null +++ b/docs/CoreNLP_simple_annotator.DeterministicCorefAnnotator.html @@ -0,0 +1,269 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>DeterministicCorefAnnotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">DeterministicCorefAnnotator</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a>.</span> + + DeterministicCorefAnnotator + </h2> + + <div class="class-description"><p>Class representing an DeterministicCorefAnnotator.</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="DeterministicCorefAnnotator"><span class="type-signature"></span>new DeterministicCorefAnnotator<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator_dcoref.js.html">simple/annotator/dcoref.js</a>, <a href="simple_annotator_dcoref.js.html#line17">line 17</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/coref.html">DeterministicCorefAnnotator</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>module:tokenize,</li> +</ul> + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + <h3 class="subsection-title">Requires</h3> + + <ul> + <li>module:tokenize,</li> + </ul> + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.MorphaAnnotator.html b/docs/CoreNLP_simple_annotator.MorphaAnnotator.html new file mode 100644 index 0000000..400d249 --- /dev/null +++ b/docs/CoreNLP_simple_annotator.MorphaAnnotator.html @@ -0,0 +1,269 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>MorphaAnnotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">MorphaAnnotator</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a>.</span> + + MorphaAnnotator + </h2> + + <div class="class-description"><p>Class representing an MorphaAnnotator. Hydrates Token.lemma()</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="MorphaAnnotator"><span class="type-signature"></span>new MorphaAnnotator<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator_lemma.js.html">simple/annotator/lemma.js</a>, <a href="simple_annotator_lemma.js.html#line14">line 14</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/lemma.html">MorphaAnnotator</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>module:tokenize,</li> +</ul> + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + <h3 class="subsection-title">Requires</h3> + + <ul> + <li>module:tokenize,</li> + </ul> + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.NERClassifierCombiner.html b/docs/CoreNLP_simple_annotator.NERClassifierCombiner.html new file mode 100644 index 0000000..8606f93 --- /dev/null +++ b/docs/CoreNLP_simple_annotator.NERClassifierCombiner.html @@ -0,0 +1,269 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>NERClassifierCombiner - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">NERClassifierCombiner</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a>.</span> + + NERClassifierCombiner + </h2> + + <div class="class-description"><p>Class representing an NERClassifierCombiner. Hydrates Token.ner()</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="NERClassifierCombiner"><span class="type-signature"></span>new NERClassifierCombiner<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator_ner.js.html">simple/annotator/ner.js</a>, <a href="simple_annotator_ner.js.html#line13">line 13</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/ner.html">NERClassifierCombiner</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>module:tokenize,</li> +</ul> + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + <h3 class="subsection-title">Requires</h3> + + <ul> + <li>module:tokenize,</li> + </ul> + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.POSTaggerAnnotator.html b/docs/CoreNLP_simple_annotator.POSTaggerAnnotator.html new file mode 100644 index 0000000..0253786 --- /dev/null +++ b/docs/CoreNLP_simple_annotator.POSTaggerAnnotator.html @@ -0,0 +1,269 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>POSTaggerAnnotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">POSTaggerAnnotator</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a>.</span> + + POSTaggerAnnotator + </h2> + + <div class="class-description"><p>Class representing an POSTaggerAnnotator. Hydrates Token.pos()</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="POSTaggerAnnotator"><span class="type-signature"></span>new POSTaggerAnnotator<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator_pos.js.html">simple/annotator/pos.js</a>, <a href="simple_annotator_pos.js.html#line13">line 13</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/pos.html">POSTaggerAnnotator</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>module:tokenize,</li> +</ul> + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + <h3 class="subsection-title">Requires</h3> + + <ul> + <li>module:tokenize,</li> + </ul> + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.ParserAnnotator.html b/docs/CoreNLP_simple_annotator.ParserAnnotator.html new file mode 100644 index 0000000..b527d2e --- /dev/null +++ b/docs/CoreNLP_simple_annotator.ParserAnnotator.html @@ -0,0 +1,269 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>ParserAnnotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">ParserAnnotator</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a>.</span> + + ParserAnnotator + </h2> + + <div class="class-description"><p>Class representing an ParserAnnotator. Hydrates Token.parse()</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="ParserAnnotator"><span class="type-signature"></span>new ParserAnnotator<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator_parse.js.html">simple/annotator/parse.js</a>, <a href="simple_annotator_parse.js.html#line13">line 13</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/parse.html">ParserAnnotator</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>module:tokenize,</li> +</ul> + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + <h3 class="subsection-title">Requires</h3> + + <ul> + <li>module:tokenize,</li> + </ul> + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.RegexNERAnnotator.html b/docs/CoreNLP_simple_annotator.RegexNERAnnotator.html new file mode 100644 index 0000000..68f4654 --- /dev/null +++ b/docs/CoreNLP_simple_annotator.RegexNERAnnotator.html @@ -0,0 +1,269 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>RegexNERAnnotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">RegexNERAnnotator</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a>.</span> + + RegexNERAnnotator + </h2> + + <div class="class-description"><p>Class representing an RegexNERAnnotator.</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="RegexNERAnnotator"><span class="type-signature"></span>new RegexNERAnnotator<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator_regexner.js.html">simple/annotator/regexner.js</a>, <a href="simple_annotator_regexner.js.html#line13">line 13</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/regexner.html">RegexNERAnnotator</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>module:tokenize,</li> +</ul> + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + <h3 class="subsection-title">Requires</h3> + + <ul> + <li>module:tokenize,</li> + </ul> + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.RelationExtractorAnnotator.html b/docs/CoreNLP_simple_annotator.RelationExtractorAnnotator.html new file mode 100644 index 0000000..0fc8687 --- /dev/null +++ b/docs/CoreNLP_simple_annotator.RelationExtractorAnnotator.html @@ -0,0 +1,269 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>RelationExtractorAnnotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">RelationExtractorAnnotator</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a>.</span> + + RelationExtractorAnnotator + </h2> + + <div class="class-description"><p>Class representing an RelationExtractorAnnotator.</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="RelationExtractorAnnotator"><span class="type-signature"></span>new RelationExtractorAnnotator<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator_relation.js.html">simple/annotator/relation.js</a>, <a href="simple_annotator_relation.js.html#line17">line 17</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/relation.html">RelationExtractorAnnotator</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>module:tokenize,</li> +</ul> + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + <h3 class="subsection-title">Requires</h3> + + <ul> + <li>module:tokenize,</li> + </ul> + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.TokenizerAnnotator.html b/docs/CoreNLP_simple_annotator.TokenizerAnnotator.html new file mode 100644 index 0000000..dc80560 --- /dev/null +++ b/docs/CoreNLP_simple_annotator.TokenizerAnnotator.html @@ -0,0 +1,269 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>TokenizerAnnotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">TokenizerAnnotator</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a>.</span> + + TokenizerAnnotator + </h2> + + <div class="class-description"><p>Class representing an TokenizerAnnotator. Identifies Tokens</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="TokenizerAnnotator"><span class="type-signature"></span>new TokenizerAnnotator<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator_tokenize.js.html">simple/annotator/tokenize.js</a>, <a href="simple_annotator_tokenize.js.html#line11">line 11</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/tokenize.html">TokenizerAnnotator</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>module:tokenize</li> +</ul> + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + <h3 class="subsection-title">Requires</h3> + + <ul> + <li>module:tokenize</li> + </ul> + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.WordsToSentenceAnnotator.html b/docs/CoreNLP_simple_annotator.WordsToSentenceAnnotator.html new file mode 100644 index 0000000..747ca6d --- /dev/null +++ b/docs/CoreNLP_simple_annotator.WordsToSentenceAnnotator.html @@ -0,0 +1,270 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>WordsToSentenceAnnotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">WordsToSentenceAnnotator</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a>.</span> + + WordsToSentenceAnnotator + </h2> + + <div class="class-description"><p>Class representing an WordsToSentenceAnnotator. + Combines multiple Tokens into sentences</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="WordsToSentenceAnnotator"><span class="type-signature"></span>new WordsToSentenceAnnotator<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_annotator_ssplit.js.html">simple/annotator/ssplit.js</a>, <a href="simple_annotator_ssplit.js.html#line13">line 13</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://stanfordnlp.github.io/CoreNLP/ssplit.html">WordsToSentenceAnnotator</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Create an Annotator</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>a key-value map of options, without the annotator prefix</p></td> + </tr> + + + </tbody> +</table> + + + + +<h5>Requires:</h5> +<ul> + <li>module:tokenize,</li> +</ul> + + + + + + + + + + + + + + + </div> + + + <h3 class="subsection-title">Extends</h3> + + + + + <ul> + <li>Annotator</li> + </ul> + + + + + + <h3 class="subsection-title">Requires</h3> + + <ul> + <li>module:tokenize,</li> + </ul> + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_simple_annotator.html b/docs/CoreNLP_simple_annotator.html new file mode 100644 index 0000000..0320305 --- /dev/null +++ b/docs/CoreNLP_simple_annotator.html @@ -0,0 +1,177 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>CoreNLP/simple/annotator - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">CoreNLP/simple/annotator</h1> + + + + + + + +<section> + +<header> + + <h2> + CoreNLP/simple/annotator + </h2> + + +</header> + +<article> + <div class="container-overview"> + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="index.js.html">index.js</a>, <a href="index.js.html#line46">line 46</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + <div class="description"><p>Predefined annotators <a href="https://stanfordnlp.github.io/CoreNLP/annotators.html">https://stanfordnlp.github.io/CoreNLP/annotators.html</a></p></div> + + + + + </div> + + + + + + + <h3 class="subsection-title">Classes</h3> + + <dl> + <dt><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></dt> + <dd></dd> + + <dt><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></dt> + <dd></dd> + </dl> + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_util.Tree.html b/docs/CoreNLP_util.Tree.html new file mode 100644 index 0000000..80029ed --- /dev/null +++ b/docs/CoreNLP_util.Tree.html @@ -0,0 +1,1036 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Tree - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Tree</h1> + + + + + + + +<section> + +<header> + + <h2> + <span class="ancestors"><a href="CoreNLP_util.html">CoreNLP/util</a>.</span> + + Tree + </h2> + + <div class="class-description"><p>Class representing a Parse tree structure</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Tree"><span class="type-signature"></span>new Tree<span class="signature">(node)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="util_tree.js.html">util/tree.js</a>, <a href="util_tree.js.html#line96">line 96</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li>inspired on <a href="http://www.nltk.org/howto/tree.html">Tree</a></li> + + <li>the lecture <a href="http://www.cs.cornell.edu/courses/cs474/2004fa/lec1.pdf">Tree Syntax of Natural Language</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>The nodes are given in order left to right as the words in a sentence appears +The leaves are grouped into semantic representations provided by the Annotator +This class is pretty useful to use along with the ParserAnnotator</p> +</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>node</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="Node.html">Node</a></span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id=".fromSentence"><span class="type-signature">(static) </span>fromSentence<span class="signature">(sentence, doubleLink<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Tree}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="util_tree.js.html">util/tree.js</a>, <a href="util_tree.js.html#line178">line 178</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + <th>Default</th> + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>sentence</code></td> + + + <td class="type"> + + +<span class="param-type">Sentence</span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + <td class="default"> + + </td> + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>doubleLink</code></td> + + + <td class="type"> + + +<span class="param-type">boolean</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + <td class="default"> + + <code>false</code> + + </td> + + + <td class="description last"><p>whether the child nodes should have a reference +to their parent or not - this allows the use of Node.parent()</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>tree</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Tree</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id=".fromString"><span class="type-signature">(static) </span>fromString<span class="signature">(str, doubleLink<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Tree}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="util_tree.js.html">util/tree.js</a>, <a href="util_tree.js.html#line204">line 204</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + <th>Default</th> + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>str</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + <td class="default"> + + </td> + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>doubleLink</code></td> + + + <td class="type"> + + +<span class="param-type">boolean</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + <td class="default"> + + <code>false</code> + + </td> + + + <td class="description last"><p>whether the child nodes should have a reference +to their parent or not - this allows the use of Node.parent()</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>tree</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Tree</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="dump"><span class="type-signature"></span>dump<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="util_tree.js.html">util/tree.js</a>, <a href="util_tree.js.html#line109">line 109</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get a Tree string representation for debugging purposes</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>tree</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="visitDeepFirst"><span class="type-signature"></span>visitDeepFirst<span class="signature">()</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="util_tree.js.html">util/tree.js</a>, <a href="util_tree.js.html#line132">line 132</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://en.wikipedia.org/wiki/Depth-first_search">DFS</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Performs Deep-first Search calling a visitor for each node</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <h4 class="name" id="visitDeepFirstRight"><span class="type-signature"></span>visitDeepFirstRight<span class="signature">()</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="util_tree.js.html">util/tree.js</a>, <a href="util_tree.js.html#line145">line 145</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://en.wikipedia.org/wiki/Depth-first_search">DFS</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Performs Deep-first Search calling a visitor for each node, from right to left</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <h4 class="name" id="visitLeaves"><span class="type-signature"></span>visitLeaves<span class="signature">()</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="util_tree.js.html">util/tree.js</a>, <a href="util_tree.js.html#line158">line 158</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://en.wikipedia.org/wiki/Depth-first_search">DFS</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Performs Deep-first Search calling a visitor only over leaves</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CoreNLP_util.html b/docs/CoreNLP_util.html new file mode 100644 index 0000000..97e8912 --- /dev/null +++ b/docs/CoreNLP_util.html @@ -0,0 +1,147 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>CoreNLP/util - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">CoreNLP/util</h1> + + + + + + + +<section> + +<header> + + <h2> + CoreNLP/util + </h2> + + +</header> + +<article> + <div class="container-overview"> + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="index.js.html">index.js</a>, <a href="index.js.html#line63">line 63</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + <div class="description"><p>Utilities</p></div> + + + + + </div> + + + + + + + <h3 class="subsection-title">Classes</h3> + + <dl> + <dt><a href="CoreNLP_util.Tree.html">Tree</a></dt> + <dd></dd> + </dl> + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CorefChain.html b/docs/CorefChain.html new file mode 100644 index 0000000..bf53d52 --- /dev/null +++ b/docs/CorefChain.html @@ -0,0 +1,1333 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>CorefChain - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">CorefChain</h1> + + + + + + + +<section> + +<header> + + <h2> + CorefChain + </h2> + + <div class="class-description"><p>Class representing an CorefChain</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="CorefChain"><span class="type-signature"></span>new CorefChain<span class="signature">(mentions)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-chain.js.html">simple/coref-chain.js</a>, <a href="simple_coref-chain.js.html#line7">line 7</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create an CorefChain</p> +</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>mentions</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<<a href="CorefMention.html">CorefMention</a>></span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id=".fromJSON"><span class="type-signature">(static) </span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {<a href="CorefChain.html">CorefChain</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-chain.js.html">simple/coref-chain.js</a>, <a href="simple_coref-chain.js.html#line98">line 98</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an instance of CorefChain from a given JSON of sentence corefs</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<<a href="global.html#CorefMentionJSON">CorefMentionJSON</a>></span> + + + + </td> + + + + + + <td class="description last"><p>The sentence corefs data, as + returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>sentenchain - A new CorefChain instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="CorefChain.html">CorefChain</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="document"><span class="type-signature"></span>document<span class="signature">(doc)</span><span class="type-signature"> → {Document}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-chain.js.html">simple/coref-chain.js</a>, <a href="simple_coref-chain.js.html#line54">line 54</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Gets or sets a Document reference for the current coref-chain</p> +</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>doc</code></td> + + + <td class="type"> + + +<span class="param-type">Document</span> + + + + </td> + + + + + <td class="default"> + + <code>null</code> + + </td> + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>doc</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Document</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="fromDocument"><span class="type-signature"></span>fromDocument<span class="signature">(doc)</span><span class="type-signature"> → {<a href="CorefChain.html">CorefChain</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-chain.js.html">simple/coref-chain.js</a>, <a href="simple_coref-chain.js.html#line67">line 67</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Update an instance of CorefChain with Document references to Sentence(s) and their Token(s)</p> +</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>doc</code></td> + + + <td class="type"> + + +<span class="param-type">Document</span> + + + + </td> + + + + + + <td class="description last"><p>a Document object, the same one used to generate corefs annotations</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>chain - The current chain instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="CorefChain.html">CorefChain</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="fromJSON"><span class="type-signature"></span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {<a href="CorefChain.html">CorefChain</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-chain.js.html">simple/coref-chain.js</a>, <a href="simple_coref-chain.js.html#line83">line 83</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Update an instance of CorefChain with data provided by a JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<<a href="global.html#CorefMentionJSON">CorefMentionJSON</a>></span> + + + + </td> + + + + + + <td class="description last"><p>A sentence corefs mentions chain, as + returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>chain - The current chain instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="CorefChain.html">CorefChain</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="mention"><span class="type-signature"></span>mention<span class="signature">(index)</span><span class="type-signature"> → {<a href="CorefMention.html">CorefMention</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-chain.js.html">simple/coref-chain.js</a>, <a href="simple_coref-chain.js.html#line29">line 29</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves a CorefMention at the index specified</p> +</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>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>mention</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="CorefMention.html">CorefMention</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="mentions"><span class="type-signature"></span>mentions<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="CorefMention.html">CorefMention</a>>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-chain.js.html">simple/coref-chain.js</a>, <a href="simple_coref-chain.js.html#line20">line 20</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves all the contained CorefMention instances</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>mentions</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<<a href="CorefMention.html">CorefMention</a>></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="nonRepresentatives"><span class="type-signature"></span>nonRepresentatives<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="CorefMention.html">CorefMention</a>>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-chain.js.html">simple/coref-chain.js</a>, <a href="simple_coref-chain.js.html#line45">line 45</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves all the non-representative mentions</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>mentions</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<<a href="CorefMention.html">CorefMention</a>></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="representative"><span class="type-signature"></span>representative<span class="signature">()</span><span class="type-signature"> → {<a href="CorefMention.html">CorefMention</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-chain.js.html">simple/coref-chain.js</a>, <a href="simple_coref-chain.js.html#line37">line 37</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the first representative mention</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>mention</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="CorefMention.html">CorefMention</a></span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/CorefMention.html b/docs/CorefMention.html new file mode 100644 index 0000000..5ec345b --- /dev/null +++ b/docs/CorefMention.html @@ -0,0 +1,1902 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>CorefMention - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">CorefMention</h1> + + + + + + + +<section> + +<header> + + <h2> + CorefMention + </h2> + + <div class="class-description"><p>Class representing an CorefMention</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="CorefMention"><span class="type-signature"></span>new CorefMention<span class="signature">()</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line26">line 26</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id=".fromJSON"><span class="type-signature">(static) </span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {<a href="CorefMention.html">CorefMention</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line159">line 159</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an instance of CorefMention from a given JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#CorefMentionJSON">CorefMentionJSON</a></span> + + + + </td> + + + + + + <td class="description last"><p>The match data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>mention - A new CorefMention instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="CorefMention.html">CorefMention</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="animacy"><span class="type-signature"></span>animacy<span class="signature">()</span><span class="type-signature"> → {"ANIMATE"|"INANIMATE"|"UNKNOWN"}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line88">line 88</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention animacy</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>animacy</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">"ANIMATE"</span> +| + +<span class="param-type">"INANIMATE"</span> +| + +<span class="param-type">"UNKNOWN"</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="endIndex"><span class="type-signature"></span>endIndex<span class="signature">()</span><span class="type-signature"> → {number}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line72">line 72</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention endIndex</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>endIndex</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">number</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="fromJSON"><span class="type-signature"></span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {<a href="CorefMention.html">CorefMention</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line145">line 145</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Update an instance of CorefMention with data provided by a JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#CorefMentionJSON">CorefMentionJSON</a></span> + + + + </td> + + + + + + <td class="description last"><p>The mention data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>mention - The current mention instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="CorefMention.html">CorefMention</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="gender"><span class="type-signature"></span>gender<span class="signature">()</span><span class="type-signature"> → {"FEMALE"|"MALE"|"NEUTRAL"|"UNKNOWN"}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line96">line 96</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention gender</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>gender</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">"FEMALE"</span> +| + +<span class="param-type">"MALE"</span> +| + +<span class="param-type">"NEUTRAL"</span> +| + +<span class="param-type">"UNKNOWN"</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="headIndex"><span class="type-signature"></span>headIndex<span class="signature">()</span><span class="type-signature"> → {number}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line56">line 56</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention headIndex</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>headIndex</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">number</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="id"><span class="type-signature"></span>id<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line31">line 31</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention ID</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>id</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="isRepresentativeMention"><span class="type-signature"></span>isRepresentativeMention<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line80">line 80</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Tells you if the mentions is representative or not</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>isRepresentativeMention</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">boolean</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="number"><span class="type-signature"></span>number<span class="signature">()</span><span class="type-signature"> → {"SINGULAR"|"PLURAL"|"UNKNOWN"}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line104">line 104</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention number</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>number</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">"SINGULAR"</span> +| + +<span class="param-type">"PLURAL"</span> +| + +<span class="param-type">"UNKNOWN"</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="sentence"><span class="type-signature"></span>sentence<span class="signature">()</span><span class="type-signature"> → {Sentence}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line120">line 120</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention's sentence container</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>sentence</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Sentence</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="sentNum"><span class="type-signature"></span>sentNum<span class="signature">()</span><span class="type-signature"> → {number}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line48">line 48</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li>CorefMention.sentence() for simplicity</li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention sentence number</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>sentNum</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">number</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="startIndex"><span class="type-signature"></span>startIndex<span class="signature">()</span><span class="type-signature"> → {number}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line64">line 64</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention startIndex</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>startIndex</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">number</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="text"><span class="type-signature"></span>text<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line39">line 39</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention text</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>text</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="token"><span class="type-signature"></span>token<span class="signature">()</span><span class="type-signature"> → {Token}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line132">line 132</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention's associated token</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>token</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Token</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="type"><span class="type-signature"></span>type<span class="signature">()</span><span class="type-signature"> → {"PRONOMINAL"|"NOMINAL"|"PROPER"|"LIST"}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line112">line 112</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the mention type</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>type</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">"PRONOMINAL"</span> +| + +<span class="param-type">"NOMINAL"</span> +| + +<span class="param-type">"PROPER"</span> +| + +<span class="param-type">"LIST"</span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/ExpressionSentence.html b/docs/ExpressionSentence.html new file mode 100644 index 0000000..9f22e6f --- /dev/null +++ b/docs/ExpressionSentence.html @@ -0,0 +1,911 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>ExpressionSentence - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">ExpressionSentence</h1> + + + + + + + +<section> + +<header> + + <h2> + ExpressionSentence + </h2> + + <div class="class-description"><p>Class representing an ExpressionSentence</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="ExpressionSentence"><span class="type-signature"></span>new ExpressionSentence<span class="signature">(matches)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence.js.html">simple/expression-sentence.js</a>, <a href="simple_expression-sentence.js.html#line7">line 7</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create an ExpressionSentence</p> +</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>matches</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<<a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a>></span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id=".fromJSON"><span class="type-signature">(static) </span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {<a href="ExpressionSentence.html">ExpressionSentence</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence.js.html">simple/expression-sentence.js</a>, <a href="simple_expression-sentence.js.html#line79">line 79</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an instance of ExpressionSentence from a given JSON of sentence matches</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type">ExpressionSentenceJSON</span> + + + + </td> + + + + + + <td class="description last"><p>The sentence data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>sentence - A new ExpressionSentence instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="ExpressionSentence.html">ExpressionSentence</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="fromJSON"><span class="type-signature"></span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {ExpressionSentenceJSON}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence.js.html">simple/expression-sentence.js</a>, <a href="simple_expression-sentence.js.html#line63">line 63</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Update an instance of ExpressionSentence with data provided by a JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type">ExpressionSentenceJSON</span> + + + + </td> + + + + + + <td class="description last"><p>The expression data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>sentence - The current sentence instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">ExpressionSentenceJSON</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="match"><span class="type-signature"></span>match<span class="signature">(index)</span><span class="type-signature"> → {<a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence.js.html">simple/expression-sentence.js</a>, <a href="simple_expression-sentence.js.html#line29">line 29</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves a ExpressionSentenceMatch at the index specified</p> +</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>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>match</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="matches"><span class="type-signature"></span>matches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a>>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence.js.html">simple/expression-sentence.js</a>, <a href="simple_expression-sentence.js.html#line20">line 20</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves all the contained ExpressionSentenceMatch instances</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>matches</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<<a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a>></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="mergeTokensFromSentence"><span class="type-signature"></span>mergeTokensFromSentence<span class="signature">()</span><span class="type-signature"> → {<a href="ExpressionSentence.html">ExpressionSentence</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence.js.html">simple/expression-sentence.js</a>, <a href="simple_expression-sentence.js.html#line43">line 43</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>The Expression / ExpressionSentence objects comes from outside the standard CoreNLP pipelines. +This mean that neither <code>TokensRegex</code>, <code>Semgrex</code> nor <code>Tregex</code> will tag the nodes with POS, +lemma, NER or any otehr annotation data. This is sometimes a usful resource to count with, if +you can apart of getting the matching groups, get the annotated tokens for each word in the +match group.</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>instance = The current instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="ExpressionSentence.html">ExpressionSentence</a></span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/ExpressionSentenceMatch.html b/docs/ExpressionSentenceMatch.html new file mode 100644 index 0000000..671ae5c --- /dev/null +++ b/docs/ExpressionSentenceMatch.html @@ -0,0 +1,864 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>ExpressionSentenceMatch - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">ExpressionSentenceMatch</h1> + + + + + + + +<section> + +<header> + + <h2> + ExpressionSentenceMatch + </h2> + + <div class="class-description"><p>Class representing an ExpressionSentenceMatch</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="ExpressionSentenceMatch"><span class="type-signature"></span>new ExpressionSentenceMatch<span class="signature">()</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence-match.js.html">simple/expression-sentence-match.js</a>, <a href="simple_expression-sentence-match.js.html#line23">line 23</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id=".fromJSON"><span class="type-signature">(static) </span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {<a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence-match.js.html">simple/expression-sentence-match.js</a>, <a href="simple_expression-sentence-match.js.html#line79">line 79</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Get an instance of ExpressionSentenceMatch from a given JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#ExpressionSentenceMatchJSON">ExpressionSentenceMatchJSON</a></span> + + + + </td> + + + + + + <td class="description last"><p>The match data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>match - A new ExpressionSentenceMatch instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="fromJSON"><span class="type-signature"></span>fromJSON<span class="signature">(data)</span><span class="type-signature"> → {<a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence-match.js.html">simple/expression-sentence-match.js</a>, <a href="simple_expression-sentence-match.js.html#line65">line 65</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Update an instance of ExpressionSentenceMatch with data provided by a JSON</p> +</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>data</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#ExpressionSentenceMatchJSON">ExpressionSentenceMatchJSON</a></span> + + + + </td> + + + + + + <td class="description last"><p>The match data, as returned by CoreNLP API service</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>expression - The current match instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="group"><span class="type-signature"></span>group<span class="signature">(label)</span><span class="type-signature"> → {<a href="global.html#ExpressionSentenceMatchGroup">ExpressionSentenceMatchGroup</a>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence-match.js.html">simple/expression-sentence-match.js</a>, <a href="simple_expression-sentence-match.js.html#line42">line 42</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://nlp.stanford.edu/nlp/javadoc/javanlp/edu/stanford/nlp/semgraph/semgrex/SemgrexPattern.html#Naming_nodes">https://nlp.stanford.edu/nlp/javadoc/javanlp/edu/stanford/nlp/semgraph/semgrex/SemgrexPattern.html#Naming_nodes</a></li> + </ul> + </dd> + + + +</dl> + + + + + +<div class="description"> + <p>Nodes in a Macthed expression can be named, we call them groups here, and +the labels are the name of the nodes.</p> +</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>label</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>The label name, not prefixed wih $</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>group</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type"><a href="global.html#ExpressionSentenceMatchGroup">ExpressionSentenceMatchGroup</a></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="groups"><span class="type-signature"></span>groups<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="global.html#ExpressionSentenceMatchGroup">ExpressionSentenceMatchGroup</a>>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence-match.js.html">simple/expression-sentence-match.js</a>, <a href="simple_expression-sentence-match.js.html#line28">line 28</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Returns the main and labeled groups as a list of ExpressionSentenceMatchGroup</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>groups</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<<a href="global.html#ExpressionSentenceMatchGroup">ExpressionSentenceMatchGroup</a>></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="labels"><span class="type-signature"></span>labels<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence-match.js.html">simple/expression-sentence-match.js</a>, <a href="simple_expression-sentence-match.js.html#line54">line 54</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Labels are those aliases you can add to a group match expression, for example, +in Semgrex, you can do {ner:/PERSON/=good_guy}, from where "good_guy" would be the label +and internally it will come as $good_guy as a member of <a href="global.html#ExpressionSentenceMatchGroup">ExpressionSentenceMatchGroup</a>.</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>labels</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<string></span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/Node.html b/docs/Node.html new file mode 100644 index 0000000..e95f653 --- /dev/null +++ b/docs/Node.html @@ -0,0 +1,390 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Node - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Node</h1> + + + + + + + +<section> + +<header> + + <h2> + Node + </h2> + + <div class="class-description"><p>Class representing a Sentence Tree Node</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Node"><span class="type-signature"></span>new Node<span class="signature">()</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="util_tree.js.html">util/tree.js</a>, <a href="util_tree.js.html#line7">line 7</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id="getLanguageISO"><span class="type-signature"></span>getLanguageISO<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="util_tree.js.html">util/tree.js</a>, <a href="util_tree.js.html#line54">line 54</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the language ISO</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>text</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="setLanguageISO"><span class="type-signature"></span>setLanguageISO<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="util_tree.js.html">util/tree.js</a>, <a href="util_tree.js.html#line46">line 46</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Sets the language ISO (given by the pipeline during the annotation process) +This is solely to keep track of the language chosen for further analysis</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>text</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/Pipeline.html b/docs/Pipeline.html new file mode 100644 index 0000000..ec78cd4 --- /dev/null +++ b/docs/Pipeline.html @@ -0,0 +1,1348 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Pipeline - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Pipeline</h1> + + + + + + + +<section> + +<header> + + <h2> + Pipeline + </h2> + + <div class="class-description"><p>Class representing a Pipeline.</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Pipeline"><span class="type-signature"></span>new Pipeline<span class="signature">(properties, language<span class="signature-attributes">opt</span>, connector<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="pipeline.js.html">pipeline.js</a>, <a href="pipeline.js.html#line46">line 46</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create a Pipeline</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + <th>Default</th> + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>properties</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="Properties.html">Properties</a></span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + <td class="default"> + + </td> + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>language</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + <td class="default"> + + <code>Unspecified</code> + + </td> + + + <td class="description last"><p>in CamelCase (i.e. English, Spanish)</p></td> + </tr> + + + + <tr> + + <td class="name"><code>connector</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="ConnectorServer.html">ConnectorServer</a></span> +| + +<span class="param-type"><a href="ConnectorCli.html">ConnectorCli</a></span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + <td class="default"> + + <code>null</code> + + </td> + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id="annotate"><span class="type-signature">(async) </span>annotate<span class="signature">(annotable)</span><span class="type-signature"> → {Promise.<Annotable>}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="pipeline.js.html">pipeline.js</a>, <a href="pipeline.js.html#line75">line 75</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Execute the pipeline against the annotable object, adding annotations to it. +Calls the service and loads the associated response metadata into the Annotable model</p> +</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>annotable</code></td> + + + <td class="type"> + + +<span class="param-type">Annotable</span> + + + + </td> + + + + + + <td class="description last"><p>the document or sentence to be annotated</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>annotated document / sentence</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Promise.<Annotable></span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="annotateSemgrex"><span class="type-signature">(async) </span>annotateSemgrex<span class="signature">(expression, annotateExpression<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Expression}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="pipeline.js.html">pipeline.js</a>, <a href="pipeline.js.html#line133">line 133</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Annotates the given Expression instance with matching groups and/or Tokens</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>expression</code></td> + + + <td class="type"> + + +<span class="param-type">Expression</span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + + <td class="description last"><p>An annotable expression containing a Semgrex pattern</p></td> + </tr> + + + + <tr> + + <td class="name"><code>annotateExpression</code></td> + + + <td class="type"> + + +<span class="param-type">boolean</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>Whether to hydrate the annotations with tokens or not. +IMPORTANT: The optional parameter <code>annotateExpression</code> if true, will run the CoreNLP pipeline + twice. First for the Semgrex annotation, and one more for the standard pipeline + Token annotations (pos, ner, lemma, etc).</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>expression - The current expression instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Expression</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="annotateTokensRegex"><span class="type-signature">(async) </span>annotateTokensRegex<span class="signature">(expression, annotateExpression<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Expression}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="pipeline.js.html">pipeline.js</a>, <a href="pipeline.js.html#line107">line 107</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Annotates the given Expression instance with matching groups and/or Tokens</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>expression</code></td> + + + <td class="type"> + + +<span class="param-type">Expression</span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + + <td class="description last"><p>An annotable expression containing a TokensRegex pattern</p></td> + </tr> + + + + <tr> + + <td class="name"><code>annotateExpression</code></td> + + + <td class="type"> + + +<span class="param-type">boolean</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>Whether to hydrate the annotations with tokens or not. +IMPORTANT: The optional parameter <code>annotateExpression</code> if true, will run the CoreNLP pipeline + twice. First for the TokensRegex annotation, and one more for the standard pipeline + Token annotations (pos, ner, lemma, etc).</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>expression - The current expression instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Expression</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="annotateTregex"><span class="type-signature">(async) </span>annotateTregex<span class="signature">(expression, annotateExpression<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Expression}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="pipeline.js.html">pipeline.js</a>, <a href="pipeline.js.html#line159">line 159</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Annotates the given Expression instance with matching groups and/or Tokens</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>expression</code></td> + + + <td class="type"> + + +<span class="param-type">Expression</span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + + <td class="description last"><p>An annotable expression containing a Tregex pattern</p></td> + </tr> + + + + <tr> + + <td class="name"><code>annotateExpression</code></td> + + + <td class="type"> + + +<span class="param-type">boolean</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>Whether to hydrate the annotations with tokens or not. +IMPORTANT: The optional parameter <code>annotateExpression</code> if true, will run the CoreNLP pipeline + twice. First for the Tregex annotation, and one more for the standard pipeline + Token annotations (pos, ner, lemma, etc).</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>expression - The current expression instance</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Expression</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="assert"><span class="type-signature"></span>assert<span class="signature">(requiredAnnotators)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="pipeline.js.html">pipeline.js</a>, <a href="pipeline.js.html#line90">line 90</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + + + + + + + + + + + + <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>requiredAnnotators</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<Annotator></span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + + + + + <h4 class="name" id="getService"><span class="type-signature"></span>getService<span class="signature">(service)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="pipeline.js.html">pipeline.js</a>, <a href="pipeline.js.html#line64">line 64</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Retrieves the current Service used by the pipeline</p> +</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>service</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="Service.html">Service</a></span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/Properties.html b/docs/Properties.html new file mode 100644 index 0000000..bcc0f7c --- /dev/null +++ b/docs/Properties.html @@ -0,0 +1,882 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Properties - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Properties</h1> + + + + + + + +<section> + +<header> + + <h2> + Properties + </h2> + + <div class="class-description"><p>Class representing a Properties set.</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Properties"><span class="type-signature"></span>new Properties<span class="signature">(props)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="properties.js.html">properties.js</a>, <a href="properties.js.html#line5">line 5</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create an Properties</p> +</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>props</code></td> + + + <td class="type"> + + +<span class="param-type">Object</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + <h4 class="name" id="getProperties"><span class="type-signature"></span>getProperties<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="properties.js.html">properties.js</a>, <a href="properties.js.html#line40">line 40</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Returns an Object map of the given properties</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>properties - the properties object</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Object</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="getProperty"><span class="type-signature"></span>getProperty<span class="signature">(name, default)</span><span class="type-signature"> → {*}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="properties.js.html">properties.js</a>, <a href="properties.js.html#line29">line 29</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Property getter</p> +</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>name</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>the property name</p></td> + </tr> + + + + <tr> + + <td class="name"><code>default</code></td> + + + <td class="type"> + + +<span class="param-type">*</span> + + + + </td> + + + + + + <td class="description last"><p>the defaut value to return if not set</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>value - the property value</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">*</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="setProperty"><span class="type-signature"></span>setProperty<span class="signature">(name, value)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="properties.js.html">properties.js</a>, <a href="properties.js.html#line19">line 19</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Property setter</p> +</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>name</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>the property name</p></td> + </tr> + + + + <tr> + + <td class="name"><code>value</code></td> + + + <td class="type"> + + +<span class="param-type">*</span> + + + + </td> + + + + + + <td class="description last"><p>the property value</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + + + + + <h4 class="name" id="toJSON"><span class="type-signature"></span>toJSON<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="properties.js.html">properties.js</a>, <a href="properties.js.html#line48">line 48</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Returns a JSON object of the given properties</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>json - the properties object</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Object</span> + + + </dd> +</dl> + + + + + + + + + + <h4 class="name" id="toPropertiessFileContent"><span class="type-signature"></span>toPropertiessFileContent<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="properties.js.html">properties.js</a>, <a href="properties.js.html#line56">line 56</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Returns a properties file-like string of the given properties</p> +</div> + + + + + + + + + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>properties - the properties content</p> +</div> + + + +<dl class="param-type"> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/Service.html b/docs/Service.html new file mode 100644 index 0000000..e9da479 --- /dev/null +++ b/docs/Service.html @@ -0,0 +1,299 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Service - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">Service</h1> + + + + + + + +<section> + +<header> + + <h2> + Service + </h2> + + <div class="class-description"><p>Middleware that interfaces between the pipeline and the connector strategies</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + <h2>Constructor</h2> + + + <h4 class="name" id="Service"><span class="type-signature"></span>new Service<span class="signature">(connector, language<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> + + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="service.js.html">service.js</a>, <a href="service.js.html#line13">line 13</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + + +<div class="description"> + <p>Create a Service</p> +</div> + + + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + <th>Default</th> + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>connector</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="ConnectorServer.html">ConnectorServer</a></span> +| + +<span class="param-type"><a href="ConnectorCli.html">ConnectorCli</a></span> + + + + </td> + + + <td class="attributes"> + + + + + + </td> + + + + <td class="default"> + + </td> + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>language</code></td> + + + <td class="type"> + + +<span class="param-type">'English'</span> +| + +<span class="param-type">'French'</span> +| + +<span class="param-type">'German'</span> +| + +<span class="param-type">'Spanish'</span> +| + +<span class="param-type">'Unspecified'</span> +| + +<span class="param-type">'Whitesapce'</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + <td class="default"> + + <code>Unspecified</code> + + </td> + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/connector_connector-cli.js.html b/docs/connector_connector-cli.js.html new file mode 100644 index 0000000..f59cfbe --- /dev/null +++ b/docs/connector_connector-cli.js.html @@ -0,0 +1,121 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>connector/connector-cli.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">connector/connector-cli.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import { exec } from 'child-process-promise'; +import tmpFile from 'tmp-file'; +import loadJSONFile from 'load-json-file'; + +const config = { + classPath: 'corenlp/stanford-corenlp-full-2017-06-09/*', + mainClass: 'edu.stanford.nlp.pipeline.StanfordCoreNLP', + props: 'StanfordCoreNLP-spanish.properties', +}; + +/** + * @class + * @classdesc Class representing a Connector CLI (command line interface client) + */ +class ConnectorCli { + /** + * Create a ConnectorCli + * @param {Object} config + * @param {string} config.classPath - The path to the Jar files to be included + * @param {string} config.mainClass - The name of the Java class that represents the main program + * @param {string} config.props The - path to the properties file (for example, language specific) + */ + constructor({ + classPath = config.classPath, + mainClass = config.mainClass, + props = config.props, + } = { }) { + this._classPath = classPath; + this._mainClass = mainClass; + this._props = props; + this._tmpFile = tmpFile; + this._exec = exec; + this._loadJSONFile = loadJSONFile; + } + + /** + * @returns {Promise<Object>} + */ + get({ + annotators, + text, + // TODO options, + // TODO language + }) { + const params = [ + '-cp', `'${this._classPath}'`, + `${this._mainClass}`, + '-props', `${this._props}`, + '-annotators', `${annotators.join()}`, + '-outputFormat', 'json', + ]; + + return this._tmpFile(text).then(file => + this._exec(`java ${params.concat([`-file ${file.path}`]).join(' ')}`) + .then((result) => { + const stdout = result.stdout || result.stderr; + const outfile = stdout.match(/writing to (.*\.json)/)[1]; + return this._loadJSONFile(outfile); + })); + } +} + +export default ConnectorCli; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/connector_connector-server.js.html b/docs/connector_connector-server.js.html new file mode 100644 index 0000000..1bdb608 --- /dev/null +++ b/docs/connector_connector-server.js.html @@ -0,0 +1,137 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>connector/connector-server.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">connector/connector-server.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import rp from 'request-promise-native'; + +const config = { + dsn: 'http://localhost:9000', +}; + +/** + * @class + * @classdesc Class representing a Connector Server (web server client) + */ +class ConnectorServer { + /** + * Create a ConnectorServer + * @param {Object} config + * @param {string} config.dsn - The StanfordCoreNLPServer dsn (example: 'http://localhost:9000') + */ + constructor({ dsn = config.dsn } = { }) { + this._dsn = dsn; + this._rp = rp; + } + + /** + * @param {Object} config + * @param {Array.<string>} config.annotators - The list of annotators that defines the pipeline + * @param {string} config.text - The text to run the pipeline against + * @param {Object} config.options - Additinal options (properties) for the pipeline + * @param {string} config.language - Language full name in CamelCase (eg. Spanish) + * @param {(''|'tokensregex'|'semgrex'|'tregex')} [utility] - Name of the utility to use + * NOTE: most of the utilities receives properties, these should be passed via the options param + * @returns {Promise<Object>} + */ + get({ annotators, text, options, language, utility = '' }) { + const properties = { + annotators: annotators.join(), + ...options, + outputFormat: 'json', + }; + + let baseUrl = this._dsn; + let queryString = `pipelineLanguage=${language}&properties=${JSON.stringify(properties)}`; + + /** + * @description + * The conenctor should support extensibility to special tools: + * - For example, Semgrex is an utility that runs in a separate url Hanlder + * in StanfordCoreNLPServer + * This url is /semgrex, and apart of the normal options, it expects the + * query-string `pattern` as a must. This `pattern` option is taken here from + * the options object, form the key `semgrex.pattern`. + */ + if (utility) { + // https://stanfordnlp.github.io/CoreNLP/corenlp-server.html#query-tokensregex-tokensregex + baseUrl += `/${utility}`; + queryString += `&${Object.keys(options) + .filter(opt => opt.indexOf(`${utility}.`) === 0) + .map(opt => `${opt.replace(`${utility}.`, '')}=${encodeURI(options[opt])}`) + .join('&')}`; + } + + return this._makeRequest(baseUrl, queryString, text); + } + + // eslint-disable-next-line class-methods-use-this + _makeRequest(baseUrl, queryString, text) { + const rpOpts = { + method: 'POST', + uri: `${baseUrl}?${queryString}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', + }, + body: text, + json: true, + }; + + return this._rp(rpOpts); + } +} + +export default ConnectorServer; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/global.html b/docs/global.html new file mode 100644 index 0000000..04a39f7 --- /dev/null +++ b/docs/global.html @@ -0,0 +1,2038 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Global - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<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">Type Definitions</h3> + + + +<h4 class="name" id="CorefMentionJSON">CorefMentionJSON</h4> + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_coref-mention.js.html">simple/coref-mention.js</a>, <a href="simple_coref-mention.js.html#line1">line 1</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-see">See:</dt> + <dd class="tag-see"> + <ul> + <li><a href="https://github.com/stanfordnlp/CoreNLP/blob/7cfaf869f9500da16b858ab1a2835234ae46f96e/src/edu/stanford/nlp/dcoref/CorefChain.java#L148">https://github.com/stanfordnlp/CoreNLP/blob/7cfaf869f9500da16b858ab1a2835234ae46f96e/src/edu/stanford/nlp/dcoref/CorefChain.java#L148</a></li> + + <li><a href="https://github.com/stanfordnlp/CoreNLP/blob/master/src/edu/stanford/nlp/dcoref/Dictionaries.java">https://github.com/stanfordnlp/CoreNLP/blob/master/src/edu/stanford/nlp/dcoref/Dictionaries.java</a> for enum definitions</li> + </ul> + </dd> + + + +</dl> + + + + <h5 class="subsection-title">Properties:</h5> + + + +<table class="props"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>id</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>Mention ID</p></td> + </tr> + + + + <tr> + + <td class="name"><code>text</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>The text (literal word) of the mention</p></td> + </tr> + + + + <tr> + + <td class="name"><code>sentNum</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>1-based index of the sentence containinng this mention</p></td> + </tr> + + + + <tr> + + <td class="name"><code>headIndex</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>1-based index</p></td> + </tr> + + + + <tr> + + <td class="name"><code>startIndex</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>1-based index</p></td> + </tr> + + + + <tr> + + <td class="name"><code>endIndex</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>1-based index</p></td> + </tr> + + + + <tr> + + <td class="name"><code>isRepresentativeMention</code></td> + + + <td class="type"> + + +<span class="param-type">boolean</span> + + + + </td> + + + + + + <td class="description last"><p>Wehther the mention word is representative or not</p></td> + </tr> + + + + <tr> + + <td class="name"><code>animacy</code></td> + + + <td class="type"> + + +<span class="param-type">"ANIMATE"</span> +| + +<span class="param-type">"INANIMATE"</span> +| + +<span class="param-type">"UNKNOWN"</span> + + + + </td> + + + + + + <td class="description last"><p>Mention's animacy</p></td> + </tr> + + + + <tr> + + <td class="name"><code>gender</code></td> + + + <td class="type"> + + +<span class="param-type">"FEMALE"</span> +| + +<span class="param-type">"MALE"</span> +| + +<span class="param-type">"NEUTRAL"</span> +| + +<span class="param-type">"UNKNOWN"</span> + + + + </td> + + + + + + <td class="description last"><p>Gender of the mention</p></td> + </tr> + + + + <tr> + + <td class="name"><code>number</code></td> + + + <td class="type"> + + +<span class="param-type">"SINGULAR"</span> +| + +<span class="param-type">"PLURAL"</span> +| + +<span class="param-type">"UNKNOWN"</span> + + + + </td> + + + + + + <td class="description last"><p>Cardinality of the mention</p></td> + </tr> + + + + <tr> + + <td class="name"><code>type</code></td> + + + <td class="type"> + + +<span class="param-type">"PRONOMINAL"</span> +| + +<span class="param-type">"NOMINAL"</span> +| + +<span class="param-type">"PROPER"</span> +| + +<span class="param-type">"LIST"</span> + + + + </td> + + + + + + <td class="description last"><p>Mention type</p></td> + </tr> + + + + <tr> + + <td class="name"><code>position</code></td> + + + <td class="type"> + + +<span class="param-type">Array</span> + + + + </td> + + + + + + <td class="description last"><p>Position is a binary tuple of + (sentence number, mention number in that sentence). This is used for indexing by mention.</p></td> + </tr> + + + </tbody> +</table> + + + + + + +<div class="description"> + <p>A CorefMention.</p> +</div> + + + + + + + + + + +<h4 class="name" id="DocumentJSON">DocumentJSON</h4> + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_document.js.html">simple/document.js</a>, <a href="simple_document.js.html#line7">line 7</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + <h5 class="subsection-title">Properties:</h5> + + + +<table class="props"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>sentences</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<Sentence></span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + +<div class="description"> + <p>The CoreNLP API JSON structure representing a document</p> +</div> + + + + + + + + + + +<h4 class="name" id="ExpressionJSON">ExpressionJSON</h4> + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression.js.html">simple/expression.js</a>, <a href="simple_expression.js.html#line9">line 9</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + <h5 class="subsection-title">Properties:</h5> + + + +<table class="props"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>sentences</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<Array.<<a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a>>></span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + +<div class="description"> + <p>The CoreNLP API JSON structure representing an expression +This expression structure can be found as the output of <code>TokensRegex</code>, +<code>Semgrex</code> and <code>Tregex</code>.</p> +</div> + + + + + + + + + + +<h4 class="name" id="ExpressionSentenceMatchGroup">ExpressionSentenceMatchGroup</h4> + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence-match.js.html">simple/expression-sentence-match.js</a>, <a href="simple_expression-sentence-match.js.html#line1">line 1</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + <h5 class="subsection-title">Properties:</h5> + + + +<table class="props"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>label</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + <td class="attributes"> + + + + </td> + + + + + <td class="description last"><p>group label</p></td> + </tr> + + + + <tr> + + <td class="name"><code>begin</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + <td class="attributes"> + + + + </td> + + + + + <td class="description last"><p>0-based index of the matched group, relative to the given text</p></td> + </tr> + + + + <tr> + + <td class="name"><code>end</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + <td class="attributes"> + + + + </td> + + + + + <td class="description last"><p>0-based index of the matched group, relative to the given text</p></td> + </tr> + + + + <tr> + + <td class="name"><code>token</code></td> + + + <td class="type"> + + +<span class="param-type">Token</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + </td> + + + + + <td class="description last"><p>onluy given if aggregated with an annotated Sentence or Document</p></td> + </tr> + + + + <tr> + + <td class="name"><code>$label</code></td> + + + <td class="type"> + + +<span class="param-type"><a href="global.html#ExpressionSentenceMatchGroup">ExpressionSentenceMatchGroup</a></span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + </td> + + + + + <td class="description last"><p>other groups inside</p></td> + </tr> + + + </tbody> +</table> + + + + + + + + + + + + + + + +<h4 class="name" id="ExpressionSentenceMatchJSON">ExpressionSentenceMatchJSON</h4> + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_expression-sentence-match.js.html">simple/expression-sentence-match.js</a>, <a href="simple_expression-sentence-match.js.html#line10">line 10</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + <h5 class="subsection-title">Properties:</h5> + + + +<table class="props"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>begin</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + <td class="attributes"> + + + + </td> + + + + + <td class="description last"><p>word begin position, starting from zero</p></td> + </tr> + + + + <tr> + + <td class="name"><code>end</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + <td class="attributes"> + + + + </td> + + + + + <td class="description last"><p>word end position, starting from zero (no match ends at 0)</p></td> + </tr> + + + + <tr> + + <td class="name"><code>text</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + <td class="attributes"> + + + + </td> + + + + + <td class="description last"><p>matched text</p></td> + </tr> + + + + <tr> + + <td class="name"><code>$label</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + </td> + + + + + <td class="description last"><p>any label, as defined in the expression pattern</p></td> + </tr> + + + </tbody> +</table> + + + + + + +<div class="description"> + <p>A ExpressionSentenceMatch of either <code>TokensRegex</code>, <code>Semgrex</code> or <code>Tregex</code>.</p> +</div> + + + + + + + + + + +<h4 class="name" id="GovernorJSON">GovernorJSON</h4> + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_governor.js.html">simple/governor.js</a>, <a href="simple_governor.js.html#line3">line 3</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + <h5 class="subsection-title">Properties:</h5> + + + +<table class="props"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>dep</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>governor</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>governorGloss</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>dependent</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>dependentGloss</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + +<div class="description"> + <p>The CoreNLP API JSON structure representing a governor</p> +</div> + + + + + + + + + + +<h4 class="name" id="PosInfo">PosInfo</h4> + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line18">line 18</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + <h5 class="subsection-title">Properties:</h5> + + + +<table class="props"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>group</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>tag</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>examples</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<string></span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + +<div class="description"> + <p>PosInfo does not come as part of the CoreNLP. It is an indexed reference of POS tags +by language provided by this library. It's only helpful for analysis and study. The +data was collected from different documentation resources on the Web. +The PosInfo may vary depending on the POS annotation types used, for example, CoreNLP +for Spanish uses custom POS tags developed by Stanford, but this can also be changed +to Universal Dependencies, which uses different tags.</p> +</div> + + + + + + + + + + +<h4 class="name" id="SentenceJSON">SentenceJSON</h4> + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_sentence.js.html">simple/sentence.js</a>, <a href="simple_sentence.js.html#line10">line 10</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + <h5 class="subsection-title">Properties:</h5> + + + +<table class="props"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"><p>1-based index, as they come indexed by StanfordCoreNLP</p></td> + </tr> + + + + <tr> + + <td class="name"><code>tokens</code></td> + + + <td class="type"> + + +<span class="param-type">Array.<Token></span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + +<div class="description"> + <p>The CoreNLP API JSON structure representing a sentence</p> +</div> + + + + + + + + + + +<h4 class="name" id="TokenJSON">TokenJSON</h4> + + + + + +<dl class="details"> + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="simple_token.js.html">simple/token.js</a>, <a href="simple_token.js.html#line6">line 6</a> + </li></ul></dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</dl> + + + + <h5 class="subsection-title">Properties:</h5> + + + +<table class="props"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>index</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>word</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>originalText</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>characterOffsetBegin</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>characterOffsetEnd</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>before</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + + <tr> + + <td class="name"><code>after</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"></td> + </tr> + + + </tbody> +</table> + + + + + + +<div class="description"> + <p>The CoreNLP API JSON structure representing a token</p> +</div> + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..b744512 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,195 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Home - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + + + + + + + + + + + + + + + + + + + <section class="readme"> + <article><h1>CoreNLP for NodeJS</h1><p>This library helps making NodeJS/Web applications using the state-of-the-art technology for Natural Language Processing: Stanford CoreNLP. +It is compatible with the latest release of <a href="https://stanfordnlp.github.io/CoreNLP/#download">CoreNLP 3.9.0</a>.</p> +<p><a href="https://travis-ci.org/gerardobort/node-corenlp"><img src="https://travis-ci.org/gerardobort/node-corenlp.svg?branch=master" alt="Build Status"></a> <a href="https://npm.runkit.com/corenlp"><img src="https://badge.runkitcdn.com/corenlp.svg" alt="Try corenlp on RunKit"></a></p> +<p><a href="https://www.npmjs.com/package/corenlp"><img src="https://nodei.co/npm/corenlp.png" alt="NPM package"></a></p> +<p><em>This project is under active development, please stay tuned for updates. More documentation and examples are comming.</em></p> +<h2>Example</h2><p>Assuming that StanfordCoreNLPServer is running on <code>http://localhost:9000</code>....</p> +<pre class="prettyprint source lang-javascript"><code>import CoreNLP, { Properties, Pipeline } from 'corenlp'; + +const props = new Properties({ + annotators: 'tokenize,ssplit,pos,lemma,ner,parse', +}); +const pipeline = new Pipeline(props, 'English'); // uses ConnectorServer by default + +const sent = new CoreNLP.simple.Sentence('The little dog runs so fast.'); +pipeline.annotate(sent) + .then(sent => { + console.log('parse', sent.parse()); + console.log(CoreNLP.util.Tree.fromSentence(sent).dump()); + }) + .catch(err => { + console.log('err', err); + });</code></pre><h2>API</h2><p>Read the full <a href="https://gerardobort.github.io/node-corenlp/docs">API documentation</a>.</p> +<h2>Setup</h2><h3>1. Install the package:</h3><pre class="prettyprint source lang-bash"><code>npm i --save corenlp</code></pre><h3>2. Download Stanford CoreNLP</h3><h3>2.1. Shortcut (recommended to give this library a first try)</h3><p>Via <code>npm</code>, run this command from your own project after having installed this library:</p> +<pre class="prettyprint source lang-bash"><code>npm explore corenlp -- npm run corenlp:download</code></pre><p>Once downloaded you can easily start the server by running</p> +<pre class="prettyprint source lang-bash"><code>npm explore corenlp -- npm run corenlp:server</code></pre><p>Or you can manually download the project from the Stanford's CoreNLP download section at: https://stanfordnlp.github.io/CoreNLP/download.html +You may want to download, apart of the full package, other language models (see more on that page).</p> +<h3>2.2. Via sources</h3><p>For advanced projects, when you have to customize the library a bit more, we highly recommend to download the StanfordCoreNLP from the <a href="https://github.com/stanfordnlp/CoreNLP">original repository</a>, and compile the source code by using <code>ant jar</code>.</p> +<p><em>NOTE</em>: Some functionality included in this library, for <code>TokensRegex</code>, <code>Semgrex</code> and <code>Tregex</code>, requires the latest version from that repository, which contains some fixes needed by this library, not included in the latest stable release.</p> +<h3>3. Configure Stanford CoreNLP</h3><p>There are two method to connect your NodeJS application to Stanford CoreNLP:</p> +<ol> +<li>HTTP is the preferred method since it requires CoreNLP to initialize just once to serve many requests, it also avoids extra I/O given that the CLI method need to write temporary files to run <em>recommended</em>.</li> +<li>Via Command Line Interface, this is by spawning processes from your app.</li> +</ol> +<h4>3.1. Using StanfordCoreNLPServer</h4><pre class="prettyprint source lang-bash"><code># Run the server using all jars in the current directory (e.g., the CoreNLP home directory) +java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000</code></pre><p>CoreNLP connects by default via StanfordCoreNLPServer, using port 9000. You can also opt to setup the connection differently:</p> +<pre class="prettyprint source lang-javascript"><code>import CoreNLP, { Properties, Pipeline, ConnectorServer } from 'corenlp'; + +const connector = new ConnectorServer({ dsn: 'http://localhost:9000' }); +const props = new Properties({ + annotators: 'tokenize,ssplit,pos,lemma,ner,parse', +}); +const pipeline = new Pipeline(props, 'English', connector);</code></pre><h4>3.2. Use CoreNLP via CLI</h4><p>CoreNLP expects by default the StanfordCoreNLP package to be placed (unzipped) inside the path <code>${YOUR_NPM_PROJECT_ROOT}/corenlp/</code>. You can also opt to setup the CLI interface differently:</p> +<pre class="prettyprint source lang-javascript"><code>import CoreNLP, { Properties, Pipeline, ConnectorCli } from 'corenlp'; + +const connector = new ConnectorCli({ + classPath: 'corenlp/stanford-corenlp-full-2017-06-09/*', // specify the paths relative to your npm project root + mainClass: 'edu.stanford.nlp.pipeline.StanfordCoreNLP', // optional + props: 'StanfordCoreNLP-spanish.properties', // optional +}); +const props = new Properties({ + annotators: 'tokenize,ssplit,pos,lemma,ner,parse', +}); +const pipeline = new Pipeline(props, 'English', connector);</code></pre><h3>4. Usage</h3><h4>4.1 Pipeline</h4><pre class="prettyprint source lang-javascript"><code>// ... include dependencies + +const props = new Properties({ annotators: 'tokenize,ssplit,lemma,pos,ner' }); +const pipeline = new Pipeline(props, 'English', connector); +const sent = new CoreNLP.simple.Sentence('Hello world'); +pipeline.annotate(sent) + .then(sent => { + console.log(sent.words()); + console.log(sent.nerTags()); + }) + .catch(err => { + console.log('err', err); + });</code></pre><h4>4.2 Penn TreeBank traversing</h4><pre class="prettyprint source lang-javascript"><code>// ... include dependencies + +const props = new Properties(); +props.setProperty('annotators', 'tokenize,ssplit,pos,lemma,ner,parse'); +const pipeline = new Pipeline(props, 'Spanish'); + +const sent = new CoreNLP.simple.Sentence('Jorge quiere cinco empanadas de queso y carne.'); +pipeline.annotate(sent) + .then(sent => { + console.log('parse', sent.parse()); // constituency parsing string representation + const tree = CoreNLP.util.Tree.fromSentence(sent); + tree.visitLeaves(node => + console.log(node.word(), node.pos(), node.token().ner())); + console.log(tree.dump()); + }) + .catch(err => { + console.log('err', err); + });</code></pre><h4>4.3 TokensRegex, Tregex and Semgrex</h4><pre class="prettyprint source lang-javascript"><code>// ... include dependencies + +const props = new Properties(); +props.setProperty('annotators', 'tokenize,ssplit,regexner,depparse'); +const expression = new CoreNLP.simple.Expression( + 'John Snow eats snow.', + '{ner:PERSON}=who <nsubj ({pos:VBZ}=action >dobj {}=what)'); +const pipeline = new Pipeline(props, 'English'); + +pipeline.annotateSemgrex(expression, true) // similarly use pipeline.annotateTokensRegex / pipeline.annotateTregex + .then(expression => expression.sentence(0).matches().map(match => { + console.log('match', match.group('who'), match.group('action'), match.group('what')); + })) + .catch(err => { + console.log('err', err); + });</code></pre><h2>5. Client Side</h2><p>This library is isomorphic, which means that works as well on a Browser. The API is exactly the same, and you can use it directly by requiring it via a <code><script></code> tag, using AMD (RequireJS), or within your app bundle.</p> +<p>The browser ready version of <code>corenlp</code> can be found as <code>dist/index.browser.min.js</code>, once built (<code>npm run build</code>).</p> +<p>See the examples folder for more details.</p> +<h2>6. External Documentation</h2><pre class="prettyprint source lang-bash"><code>Properties +Pipeline +Service +ConnectorServer # https://stanfordnlp.github.io/CoreNLP/corenlp-server.html +ConnectorCli # https://stanfordnlp.github.io/CoreNLP/cmdline.html +CoreNLP + simple # https://stanfordnlp.github.io/CoreNLP/simple.html + Annotable + Annotator + Document + Sentence + Token + annotator # https://stanfordnlp.github.io/CoreNLP/annotators.html + TokenizerAnnotator # https://stanfordnlp.github.io/CoreNLP/tokenize.html + WordsToSentenceAnnotator # https://stanfordnlp.github.io/CoreNLP/ssplit.html + POSTaggerAnnotator # https://stanfordnlp.github.io/CoreNLP/pos.html + MorphaAnnotator # https://stanfordnlp.github.io/CoreNLP/lemma.html + NERClassifierCombiner # https://stanfordnlp.github.io/CoreNLP/ner.html + ParserAnnotator # https://stanfordnlp.github.io/CoreNLP/parse.html + DependencyParseAnnotator # https://stanfordnlp.github.io/CoreNLP/depparse.html + RelationExtractorAnnotator # https://stanfordnlp.github.io/CoreNLP/relation.html + CorefAnnotator # https://stanfordnlp.github.io/CoreNLP/coref.html + SentimentAnnotator # https://stanfordnlp.github.io/CoreNLP/sentiment.html - Comming soon... + RelationExtractorAnnotator # https://stanfordnlp.github.io/CoreNLP/relation.html - TODO + NaturalLogicAnnotator # https://stanfordnlp.github.io/CoreNLP/natlog.html - TODO + QuoteAnnotator # https://stanfordnlp.github.io/CoreNLP/quote.html - TODO + util + Tree # http://www.cs.cornell.edu/courses/cs474/2004fa/lec1.pdf</code></pre><h2>7. References</h2><p>This library is <em>not</em> maintained by <a href="https://github.com/stanfordnlp">StanfordNLP</a>. However, it's based on and depends on <a href="https://github.com/stanfordnlp/CoreNLP">StanfordNLP/CoreNLP</a> to function.</p> +<h3>7.1 <a href="https://github.com/stanfordnlp/CoreNLP">Stanford CoreNLP Reference</a></h3><p>Manning, Christopher D., Mihai Surdeanu, John Bauer, Jenny Finkel, Steven J. Bethard, and David McClosky. 2014. The Stanford CoreNLP Natural Language Processing Toolkit In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pp. 55-60.</p></article> + </section> + + + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> \ No newline at end of file diff --git a/docs/index.js.html b/docs/index.js.html new file mode 100644 index 0000000..78b7820 --- /dev/null +++ b/docs/index.js.html @@ -0,0 +1,128 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>index.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">index.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Document from './simple/document'; +import Sentence from './simple/sentence'; +import Token from './simple/token'; +import Expression from './simple/expression'; +import Annotable from './simple/annotable'; +import Annotator from './simple/annotator'; +import TokenizerAnnotator from './simple/annotator/tokenize'; +import WordsToSentenceAnnotator from './simple/annotator/ssplit'; +import POSTaggerAnnotator from './simple/annotator/pos'; +import MorphaAnnotator from './simple/annotator/lemma'; +import NERClassifierCombiner from './simple/annotator/ner'; +import ParserAnnotator from './simple/annotator/parse'; +import DependencyParseAnnotator from './simple/annotator/depparse'; +import RelationExtractorAnnotator from './simple/annotator/relation'; +import RegexNERAnnotator from './simple/annotator/regexner'; +import CorefAnnotator from './simple/annotator/coref'; +import Tree from './util/tree'; +import _Properties from './properties'; +import _Pipeline from './pipeline'; +import _Service from './service'; +import _ConnectorCli from './connector/connector-cli'; +import _ConnectorServer from './connector/connector-server'; + +export const Properties = _Properties; +export const Pipeline = _Pipeline; +export const Service = _Service; +export const ConnectorCli = _ConnectorCli; +export const ConnectorServer = _ConnectorServer; + +/** + * CoreNLP NodeJS Interface + * @namespace CoreNLP + */ +export default { + /** + * @namespace CoreNLP/simple + * @description NodeJS API that emulates {@link https://stanfordnlp.github.io/CoreNLP/simple.html} + */ + simple: { + Annotable, + Annotator, + Document, + Sentence, + Token, + Expression, + /** + * @namespace CoreNLP/simple/annotator + * @description Predefined annotators {@link https://stanfordnlp.github.io/CoreNLP/annotators.html} + */ + annotator: { + TokenizerAnnotator, + WordsToSentenceAnnotator, + POSTaggerAnnotator, + MorphaAnnotator, + NERClassifierCombiner, + ParserAnnotator, + DependencyParseAnnotator, + RelationExtractorAnnotator, + RegexNERAnnotator, + CorefAnnotator, + }, + }, + /** + * @namespace CoreNLP/util + * @description Utilities + */ + util: { + Tree, + }, +}; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/pipeline.js.html b/docs/pipeline.js.html new file mode 100644 index 0000000..cc7e34d --- /dev/null +++ b/docs/pipeline.js.html @@ -0,0 +1,293 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>pipeline.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">pipeline.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import difference from 'lodash.difference'; +import Service from './service'; +import ConnectorServer from './connector/connector-server'; +import tokenize from './simple/annotator/tokenize'; +import ssplit from './simple/annotator/ssplit'; +import pos from './simple/annotator/pos'; +import lemma from './simple/annotator/lemma'; +import ner from './simple/annotator/ner'; +import parse from './simple/annotator/parse'; +import depparse from './simple/annotator/depparse'; +import relation from './simple/annotator/relation'; +import regexner from './simple/annotator/regexner'; +import coref from './simple/annotator/coref'; +import Document from './simple/document'; + +import { + TokensRegexAnnotator, + SemgrexAnnotator, + TregexAnnotator, +} from './simple/expression'; + +const ANNOTATORS_BY_KEY = { + tokenize, + ssplit, + pos, + lemma, + ner, + parse, + depparse, + relation, + regexner, + coref, +}; + +const LANGUAGE_TO_ISO2 = { + English: 'en', + French: 'fr', + German: 'de', + Spanish: 'es', +}; + +/** + * @class + * @classdesc Class representing a Pipeline. + */ +class Pipeline { + /** + * Create a Pipeline + * @param {Properties} properties + * @param {string} [language] - in CamelCase (i.e. English, Spanish) + * @param {ConnectorServer|ConnectorCli} [connector] + */ + constructor(properties, language = 'Unspecified', connector = null) { + this._properties = properties; + this._language = language; + this._connector = connector || new ConnectorServer({}); + this._service = new Service(this._connector, this._language); + } + + /** + * Retrieves the current Service used by the pipeline + * @param {Service} service + */ + getService() { + return this._service; + } + + /** + * Execute the pipeline against the annotable object, adding annotations to it. + * Calls the service and loads the associated response metadata into the Annotable model + * @async + * @param {Annotable} annotable - the document or sentence to be annotated + * @returns {Promise<Annotable>} annotated document / sentence + */ + async annotate(annotable) { + annotable.fromJSON(await this._service.getAnnotationData( + annotable.text(), + this._getAnnotatorsKeys(), + this._getAnnotatrosOptions())); + + annotable.setLanguageISO(LANGUAGE_TO_ISO2[this._language]); + annotable.addAnnotators(this._getAnnotators()); + + return annotable; + } + + /** + * @param {Array.<Annotator>} requiredAnnotators + */ + assert(methodName = '', requiredAnnotators = []) { + if (difference( + requiredAnnotators.map(Annotator => (new Annotator()).toString()), + this._getAnnotatorsKeys()).length > 0) { + throw new Error(`Assert: ${methodName} requires ${requiredAnnotators.join()} within the annotators list.`); + } + } + + /** + * Annotates the given Expression instance with matching groups and/or Tokens + * @param {Expression} expression - An annotable expression containing a TokensRegex pattern + * @param {boolean} [annotateExpression] - Whether to hydrate the annotations with tokens or not. + * IMPORTANT: The optional parameter `annotateExpression` if true, will run the CoreNLP pipeline + * twice. First for the TokensRegex annotation, and one more for the standard pipeline + * Token annotations (pos, ner, lemma, etc). + * @returns {Expression} expression - The current expression instance + */ + async annotateTokensRegex(annotable, annotateExpression = false) { + this.assert('TokensRegex', [tokenize, ssplit]); + annotable.fromJSON(await this._service.getTokensRegexData( + annotable.text(), + annotable.pattern(), + this._getAnnotatorsKeys(), + this._getAnnotatrosOptions())); + + annotable.setLanguageISO(LANGUAGE_TO_ISO2[this._language]); + annotable.addAnnotator(TokensRegexAnnotator); + + if (annotateExpression) { + return this._annotateExpression(annotable); + } + return annotable; + } + + /** + * Annotates the given Expression instance with matching groups and/or Tokens + * @param {Expression} expression - An annotable expression containing a Semgrex pattern + * @param {boolean} [annotateExpression] - Whether to hydrate the annotations with tokens or not. + * IMPORTANT: The optional parameter `annotateExpression` if true, will run the CoreNLP pipeline + * twice. First for the Semgrex annotation, and one more for the standard pipeline + * Token annotations (pos, ner, lemma, etc). + * @returns {Expression} expression - The current expression instance + */ + async annotateSemgrex(annotable, annotateExpression = false) { + this.assert('Semgrex', [tokenize, ssplit, depparse]); + annotable.fromJSON(await this._service.getSemgrexData( + annotable.text(), + annotable.pattern(), + this._getAnnotatorsKeys(), + this._getAnnotatrosOptions())); + + annotable.setLanguageISO(LANGUAGE_TO_ISO2[this._language]); + annotable.addAnnotator(SemgrexAnnotator); + + if (annotateExpression) { + return this._annotateExpression(annotable); + } + return annotable; + } + + /** + * Annotates the given Expression instance with matching groups and/or Tokens + * @param {Expression} expression - An annotable expression containing a Tregex pattern + * @param {boolean} [annotateExpression] - Whether to hydrate the annotations with tokens or not. + * IMPORTANT: The optional parameter `annotateExpression` if true, will run the CoreNLP pipeline + * twice. First for the Tregex annotation, and one more for the standard pipeline + * Token annotations (pos, ner, lemma, etc). + * @returns {Expression} expression - The current expression instance + */ + async annotateTregex(annotable, annotateExpression = false) { + this.assert('Tregex', [tokenize, ssplit, parse]); + annotable.fromJSON(await this._service.getTregexData( + annotable.text(), + annotable.pattern(), + this._getAnnotatorsKeys(), + this._getAnnotatrosOptions())); + + annotable.setLanguageISO(LANGUAGE_TO_ISO2[this._language]); + annotable.addAnnotator(TregexAnnotator); + + if (annotateExpression) { + return this._annotateExpression(annotable); + } + return annotable; + } + + + /** + * @private + * @description + * Runs the default pipeline over the same text of the expression, and merges the results + */ + async _annotateExpression(annotableExpression) { + const doc = await this.annotate(new Document(annotableExpression.text())); + doc.setLanguageISO(LANGUAGE_TO_ISO2[this._language]); + annotableExpression.mergeTokensFromDocument(doc); + return annotableExpression; + } + + /** + * @private + */ + async _semgrex(text, pattern) { + const data = await this._service.getSemgrexData( + text, + pattern, + this._getAnnotatorsKeys(), + this._getAnnotatrosOptions()); + + return data; + } + + /** + * @private + * @returns {Aray.<string>} annotators - those set for this pipeline + */ + _getAnnotatorsKeys() { + return this._properties.getProperty('annotators', '') + .split(',').map(annotatorKey => annotatorKey.trim()); + } + + /** + * @private + * @returns {Aray.<Annotator>} annotators - those set for this pipeline + */ + _getAnnotators() { + return this._getAnnotatorsKeys() + .map(annotatorKey => ANNOTATORS_BY_KEY[annotatorKey]); + } + + /** + * Only given options are those related to the annotators in the pipeline + * @private + * @returns {Aray.<Annotator>} annotators - those set for this pipeline + */ + _getAnnotatrosOptions() { + const pipelineProps = this._properties.getProperties(); + const validPrfixes = Object.keys(ANNOTATORS_BY_KEY); + return Object.keys(pipelineProps) + .filter(propName => validPrfixes.indexOf(propName) === 0) + .reduce((acc, val, key) => ({ ...acc, [key]: val }), {}); + } +} + + +export default Pipeline; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/properties.js.html b/docs/properties.js.html new file mode 100644 index 0000000..ca88b59 --- /dev/null +++ b/docs/properties.js.html @@ -0,0 +1,122 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>properties.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">properties.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>/** + * @class + * @classdesc Class representing a Properties set. + */ +class Properties { + /** + * Create an Properties + * @param {Object} props + */ + constructor(props) { + this._props = { ...props }; + } + + /** + * Property setter + * @param {string} name - the property name + * @param {*} value - the property value + */ + setProperty(name, value) { + this._props[name] = value; + } + + /** + * Property getter + * @param {string} name - the property name + * @param {*} default - the defaut value to return if not set + * @returns {*} value - the property value + */ + getProperty(name, defaultValue = undefined) { + if (typeof this._props[name] !== 'undefined') { + return this._props[name]; + } + return defaultValue; + } + + /** + * Returns an Object map of the given properties + * @returns {Object} properties - the properties object + */ + getProperties() { + return { ...this._props }; + } + + /** + * Returns a JSON object of the given properties + * @returns {Object} json - the properties object + */ + toJSON() { + return { ...this._props }; + } + + /** + * Returns a properties file-like string of the given properties + * @returns {string} properties - the properties content + */ + toPropertiessFileContent() { + return Object.keys(this._props) + .map(propName => `${propName} = ${this._props[propName]}`) + .join('\n'); + } +} + + +export default Properties; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/scripts/linenumber.js b/docs/scripts/linenumber.js new file mode 100644 index 0000000..9cb8914 --- /dev/null +++ b/docs/scripts/linenumber.js @@ -0,0 +1,25 @@ +/*global document */ +(function() { + var source = document.getElementsByClassName('prettyprint source linenums'); + var i = 0; + var lineNumber = 0; + var lineId; + var lines; + var totalLines; + var anchorHash; + + if (source && source[0]) { + anchorHash = document.location.hash.substring(1); + lines = source[0].getElementsByTagName('li'); + totalLines = lines.length; + + for (; i < totalLines; i++) { + lineNumber++; + lineId = 'line' + lineNumber; + lines[i].id = lineId; + if (lineId === anchorHash) { + lines[i].className += ' selected'; + } + } + } +})(); diff --git a/docs/scripts/prettify/Apache-License-2.0.txt b/docs/scripts/prettify/Apache-License-2.0.txt new file mode 100644 index 0000000..75b5248 --- /dev/null +++ b/docs/scripts/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docs/scripts/prettify/lang-css.js b/docs/scripts/prettify/lang-css.js new file mode 100644 index 0000000..bb6dbea --- /dev/null +++ b/docs/scripts/prettify/lang-css.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", +/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/docs/scripts/prettify/prettify.js b/docs/scripts/prettify/prettify.js new file mode 100644 index 0000000..ec2a488 --- /dev/null +++ b/docs/scripts/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c< +f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&& +(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r= +{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length, +t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b=== +"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value", +m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m= +a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue= +j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m, +250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit", +PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})(); diff --git a/docs/service.js.html b/docs/service.js.html new file mode 100644 index 0000000..3caf2bd --- /dev/null +++ b/docs/service.js.html @@ -0,0 +1,155 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>service.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">service.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import depInfo from './simple/annotator/depparse/dependencies.json'; + +// preload for browserify +require('./simple/annotator/pos/en.json'); +require('./simple/annotator/pos/es.json'); +require('./simple/annotator/parse/en.json'); +require('./simple/annotator/parse/es.json'); + +/** + * @class + * @classdesc Middleware that interfaces between the pipeline and the connector strategies + */ +class Service { + /** + * Create a Service + * @param {ConnectorServer|ConnectorCli} connector + * @param {('English'|'French'|'German'|'Spanish'|'Unspecified'|'Whitesapce')} [language] + */ + constructor(connector, language = 'Unspecified') { + this._connector = connector; + this._language = language; + } + + getAnnotationData(text, annotators, options = {}) { + return this._connector.get({ + annotators, + text, + options, + language: this._language.toLowerCase(), + }); + } + + getTokensRegexData(text, pattern, annotators, options = {}) { + return this._connector.get({ + annotators, + text, + options: { + ...options, + 'tokensregex.pattern': pattern, + }, + language: this._language.toLowerCase(), + utility: 'tokensregex', + }); + } + + getSemgrexData(text, pattern, annotators, options = {}) { + return this._connector.get({ + annotators, + text, + options: { + ...options, + 'semgrex.pattern': pattern, + }, + language: this._language.toLowerCase(), + utility: 'semgrex', + }); + } + + getTregexData(text, pattern, annotators, options = {}) { + return this._connector.get({ + annotators, + text, + options: { + ...options, + 'tregex.pattern': pattern, + }, + language: this._language.toLowerCase(), + utility: 'tregex', + }); + } + + static getTokenPosInfo(pos, languageISO) { + try { + // eslint-disable-next-line global-require, import/no-dynamic-require + return require(`./simple/annotator/pos/${languageISO}.json`) + .tagset[pos]; + } catch (err) { + return undefined; + } + } + + static getSentenceParseInfo(group, languageISO) { + try { + // eslint-disable-next-line global-require, import/no-dynamic-require + return require(`./simple/annotator/parse/${languageISO}.json`) + .multiword[group]; + } catch (err) { + return undefined; + } + } + + static getGovernorDepInfo(dep) { + return depInfo.dependencies[dep]; + } +} + +export default Service; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotable.js.html b/docs/simple_annotable.js.html new file mode 100644 index 0000000..d66e893 --- /dev/null +++ b/docs/simple_annotable.js.html @@ -0,0 +1,145 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotable.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotable.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>/** + * @class + * @classdesc Class representing an Annotable + * @memberof CoreNLP/simple + */ +class Annotable { + /** + * Create an Annotable + * @param {string} text + */ + constructor(text) { + this._text = text; + this._annotators = {}; + } + + /** + * Get a string representation of the raw text + * @return {string} text + */ + text() { + return this._text; + } + + /** + * Sets the language ISO (given by the pipeline during the annotation process) + * This is solely to keep track of the language chosen for further analysis + * The language string should be passed in lowercase ISO2 format + * @return {string} text + */ + setLanguageISO(iso) { + this._language = iso; + } + + /** + * Retrieves the language ISO (in lowercase ISO2 format) + * @return {string} iso + */ + getLanguageISO() { + return this._language; + } + + /** + * Marks an annotator as a met dependency + * @param {Annotator|function} annotator + */ + addAnnotator(annotator) { + this._annotators[annotator.toString()] = annotator; + } + + /** + * Marks multiple annotators as a met dependencies + * @param {Array.<Annotator|function>} annotators + */ + addAnnotators(annotators) { + annotators.forEach(annotator => this.addAnnotator(annotator)); + } + + /** + * Unmarks an annotator as a met dependency + * @param {Annotator|function} annotator + */ + removeAnnotator(annotator) { + delete this._annotators[annotator.toString()]; + } + + /** + * Tells you if an annotator is a met dependency + * @param {Annotator|function} annotator + * @returns {boolean} hasAnnotator + */ + hasAnnotator(annotator) { + return !!this._annotators[annotator.toString()]; + } + + /** + * Tells you if at least on of a list of annotators is a met dependency + * @param {Array.<Annotator|function>} annotators + * @returns {boolean} hasAnyAnnotator + */ + hasAnyAnnotator(annotators) { + return annotators.some(annotator => + // eslint-disable-next-line no-bitwise + !!~Object.keys(this._annotators).indexOf(annotator.toString())); + } +} + +export default Annotable; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator.js.html b/docs/simple_annotator.js.html new file mode 100644 index 0000000..829da45 --- /dev/null +++ b/docs/simple_annotator.js.html @@ -0,0 +1,164 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import uniq from 'lodash.uniq'; +import flatten from 'lodash.flatten'; +import reduce from 'lodash.reduce'; + +/** + * @class + * @classdesc Class representing an Annotatror + * @extends Annotator + * @memberof CoreNLP/simple + */ +class Annotator { + /** + * Create an Annotator + * @param {string} name + * @param {Object} [options] a key-value map of options, without the annotator prefix + * @param {Array.<Annotator>} [dependencies] + */ + constructor(name, options = {}, dependencies = []) { + this._name = name; + this._options = options; + this._dependencies = dependencies; + } + + /** + * Get a string representation + * @return {string} annotator + */ + toString() { + return this._name; + } + + /** + * Defines whether a given annotator is the same as current, using shallow compare. + * This is useful for a Document or Sentence to validate if the minimum of annotators required + * were already applied to them. Allows at the same time the users to instantiate new annotators + * and configure them as needed. + * @param {Annotator} annotator + * @return {boolean} + */ + equalsTo(annotator) { + return this._name === annotator.toString(); + } + + /** + * Get an Object key-value representation of the annotor's options (excluding prefix) + * @return {Object} options + */ + options() { + return this._options; + } + + /** + * Get/Set an option value + * @param {string} key + * @param {string|boolean} [value] + * @return {string} value + */ + option(key, value = null) { + if (value === null) { + return this._options[key]; + } + this._options[key] = value; + return value; + } + + /** + * Get a list of annotators dependencies + * @return {Array.<Annotator>} dependencies + */ + dependencies() { + return this._dependencies; + } + + /** + * Get a list of annotators dependencies, following by this annotator, all this as + * a list of strings + * This is useful to fulfill the `annotators` param in CoreNLP API properties. + * @return {Array.<string>} pipeline + */ + pipeline() { + return uniq( + flatten( + this.dependencies() + .map(annotator => annotator.pipeline()), + ) + .concat([this.toString()]), + ); + } + + /** + * Get an object of all the Annotator options including the current and all its + * dependencies, prefixed by the annotator names + * This is useful to fulfill the options params in CoreNLP API properties. + * @return {Array.<string>} pipelineOptions + */ + pipelineOptions() { + return reduce( + this.dependencies().map(annotator => annotator.pipelineOptions()) + .concat(Object.keys(this.options()).map(opt => ({ [`${this}.${opt}`]: this.option(opt) }))), + (ac, option) => ({ ...ac, ...option }), + {}, + ); + } +} + +export default Annotator; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator_coref.js.html b/docs/simple_annotator_coref.js.html new file mode 100644 index 0000000..661f812 --- /dev/null +++ b/docs/simple_annotator_coref.js.html @@ -0,0 +1,90 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator/coref.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator/coref.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotator from '../annotator'; +import TokenizerAnnotator from './tokenize'; +import WordsToSentenceAnnotator from './ssplit'; + +/** + * @class + * @classdesc Class representing an CorefAnnotator. + * @extends Annotator + * @memberof CoreNLP/simple/annotator + * @requires tokenize, ssplit, coref + * @see {@link https://stanfordnlp.github.io/CoreNLP/coref.html|CorefAnnotator} + */ +class CorefAnnotator extends Annotator { + /** + * Create an Annotator + * @param {Object} [options] a key-value map of options, without the annotator prefix + */ + constructor(options = {}) { + super( + 'coref', + { + ...options, + }, + [ + new TokenizerAnnotator(), + new WordsToSentenceAnnotator(), + ], + ); + } +} + +export default CorefAnnotator; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator_dcoref.js.html b/docs/simple_annotator_dcoref.js.html new file mode 100644 index 0000000..f3de49a --- /dev/null +++ b/docs/simple_annotator_dcoref.js.html @@ -0,0 +1,98 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator/dcoref.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator/dcoref.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotator from '../annotator'; +import TokenizerAnnotator from './tokenize'; +import WordsToSentenceAnnotator from './ssplit'; +import POSTaggerAnnotator from './pos'; +import MorphaAnnotator from './lemma'; +import NERClassifierCombiner from './ner'; +import ParserAnnotator from './parse'; + +/** + * @class + * @classdesc Class representing an DeterministicCorefAnnotator. + * @extends Annotator + * @memberof CoreNLP/simple/annotator + * @requires tokenize, ssplit, pos, lemma, ner, parse, dcoref + * @see {@link https://stanfordnlp.github.io/CoreNLP/coref.html|DeterministicCorefAnnotator} + */ +class DeterministicCorefAnnotator extends Annotator { + /** + * Create an Annotator + * @param {Object} [options] a key-value map of options, without the annotator prefix + */ + constructor(options = {}) { + super( + 'dcoref', + { + ...options, + }, + [ + new TokenizerAnnotator(), + new WordsToSentenceAnnotator(), + new POSTaggerAnnotator(), + new MorphaAnnotator(), + new NERClassifierCombiner(), + new ParserAnnotator(), + ], + ); + } +} + +export default DeterministicCorefAnnotator; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator_depparse.js.html b/docs/simple_annotator_depparse.js.html new file mode 100644 index 0000000..d945a03 --- /dev/null +++ b/docs/simple_annotator_depparse.js.html @@ -0,0 +1,93 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator/depparse.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator/depparse.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotator from '../annotator'; +import TokenizerAnnotator from './tokenize'; +import WordsToSentenceAnnotator from './ssplit'; +import POSTaggerAnnotator from './pos'; + +/** + * @class + * @classdesc Class representing an DependencyParseAnnotator. Hydrates {@link Sentence.governors()} + * @extends Annotator + * @memberof CoreNLP/simple/annotator + * @requires tokenize, ssplit, pos, lemma, ner, parse, depparse + * @see {@link https://stanfordnlp.github.io/CoreNLP/depparse.html|DependencyParseAnnotator} + */ +class DependencyParseAnnotator extends Annotator { + /** + * Create an Annotator + * @param {Object} [options] a key-value map of options, without the annotator prefix + */ + constructor(options = {}) { + super( + 'depparse', + { + // model: null, + ...options, + }, + [ + new TokenizerAnnotator(), + new WordsToSentenceAnnotator(), + new POSTaggerAnnotator(), + ], + ); + } +} + +export default DependencyParseAnnotator; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator_lemma.js.html b/docs/simple_annotator_lemma.js.html new file mode 100644 index 0000000..ce03aef --- /dev/null +++ b/docs/simple_annotator_lemma.js.html @@ -0,0 +1,92 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator/lemma.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator/lemma.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotator from '../annotator'; +import TokenizerAnnotator from './tokenize'; +import WordsToSentenceAnnotator from './ssplit'; +import POSTaggerAnnotator from './pos'; + +/** + * @class + * @classdesc Class representing an MorphaAnnotator. Hydrates {@link Token.lemma()} + * @extends Annotator + * @memberof CoreNLP/simple/annotator + * @requires tokenize, ssplit, pos, lemma + * @see {@link https://stanfordnlp.github.io/CoreNLP/lemma.html|MorphaAnnotator} + */ +class MorphaAnnotator extends Annotator { + /** + * Create an Annotator + * @param {Object} [options] a key-value map of options, without the annotator prefix + */ + constructor(options = {}) { + super( + 'lemma', + { + ...options, + }, + [ + new TokenizerAnnotator(), + new WordsToSentenceAnnotator(), + new POSTaggerAnnotator(), + ], + ); + } +} + +export default MorphaAnnotator; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator_ner.js.html b/docs/simple_annotator_ner.js.html new file mode 100644 index 0000000..d4d49a1 --- /dev/null +++ b/docs/simple_annotator_ner.js.html @@ -0,0 +1,96 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator/ner.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator/ner.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotator from '../annotator'; +import TokenizerAnnotator from './tokenize'; +import WordsToSentenceAnnotator from './ssplit'; + +/** + * @class + * @classdesc Class representing an NERClassifierCombiner. Hydrates {@link Token.ner()} + * @extends Annotator + * @memberof CoreNLP/simple/annotator + * @requires tokenize, ssplit, pos, lemma, ner + * @see {@link https://stanfordnlp.github.io/CoreNLP/ner.html|NERClassifierCombiner} + */ +class NERClassifierCombiner extends Annotator { + /** + * Create an Annotator + * @param {Object} [options] a key-value map of options, without the annotator prefix + */ + constructor(options = {}) { + super( + 'ner', + { + useSUTime: true, + // model: null, // throws error on CoreNLP server + applyNumericClassifiers: true, + // TODO resolve different options namespaces + // sutime.markTimeRanges: false, + // sutime.includeRange: false. + ...options, + }, + [ + new TokenizerAnnotator(), + new WordsToSentenceAnnotator(), + ], + ); + } +} + +export default NERClassifierCombiner; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator_parse.js.html b/docs/simple_annotator_parse.js.html new file mode 100644 index 0000000..68ef84a --- /dev/null +++ b/docs/simple_annotator_parse.js.html @@ -0,0 +1,96 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator/parse.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator/parse.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotator from '../annotator'; +import TokenizerAnnotator from './tokenize'; +import WordsToSentenceAnnotator from './ssplit'; + +/** + * @class + * @class Class representing an ParserAnnotator. Hydrates {@link Token.parse()} + * @extends Annotator + * @memberof CoreNLP/simple/annotator + * @requires tokenize, ssplit, pos, lemma, ner, parse + * @see {@link https://stanfordnlp.github.io/CoreNLP/parse.html|ParserAnnotator} + */ +class ParserAnnotator extends Annotator { + /** + * Create an Annotator + * @param {Object} [options] a key-value map of options, without the annotator prefix + */ + constructor(options = {}) { + super( + 'parse', + { + // model: null, + // maxlen: null, + // flags: null, + // originalDependencies: null, + // kbest: null, + // keepPunct: null, + ...options, + }, + [ + new TokenizerAnnotator(), + new WordsToSentenceAnnotator(), + ], + ); + } +} + +export default ParserAnnotator; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator_pos.js.html b/docs/simple_annotator_pos.js.html new file mode 100644 index 0000000..9421c6c --- /dev/null +++ b/docs/simple_annotator_pos.js.html @@ -0,0 +1,90 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator/pos.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator/pos.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotator from '../annotator'; +import TokenizerAnnotator from './tokenize'; +import WordsToSentenceAnnotator from './ssplit'; + +/** + * @class + * @classdesc Class representing an POSTaggerAnnotator. Hydrates {@link Token.pos()} + * @extends Annotator + * @memberof CoreNLP/simple/annotator + * @requires tokenize, ssplit, pos + * @see {@link https://stanfordnlp.github.io/CoreNLP/pos.html|POSTaggerAnnotator} + */ +class POSTaggerAnnotator extends Annotator { + /** + * Create an Annotator + * @param {Object} [options] a key-value map of options, without the annotator prefix + */ + constructor(options = {}) { + super( + 'pos', + { + ...options, + }, + [ + new TokenizerAnnotator(), + new WordsToSentenceAnnotator(), + ], + ); + } +} + +export default POSTaggerAnnotator; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator_regexner.js.html b/docs/simple_annotator_regexner.js.html new file mode 100644 index 0000000..8b0b2c0 --- /dev/null +++ b/docs/simple_annotator_regexner.js.html @@ -0,0 +1,101 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator/regexner.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator/regexner.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotator from '../annotator'; +import TokenizerAnnotator from './tokenize'; +import WordsToSentenceAnnotator from './ssplit'; + +/** + * @class + * @classdesc Class representing an RegexNERAnnotator. + * @extends Annotator + * @memberof CoreNLP/simple/annotator + * @requires tokenize, ssplit, pos, regexner + * @see {@link https://stanfordnlp.github.io/CoreNLP/regexner.html|RegexNERAnnotator} + */ +class RegexNERAnnotator extends Annotator { + /** + * Create an Annotator + * @param {Object} [options] a key-value map of options, without the annotator prefix + */ + constructor(options = {}) { + super( + 'regexner', + { + validpospattern: '(([ner:PERSON]*) /es/ /una/ /buena/ /persona/)', + // ignorecase: null, + // mapping: null, + // mapping.header: null, + // mapping.field.<fieldname>: null, + // commonWords: null, + // backgroundSymbol: null, + // posmatchtype: null, + // validpospattern: null, + // noDefaultOverwriteLabels: null, + verbose: true, + ...options, + }, + [ + new TokenizerAnnotator(), + new WordsToSentenceAnnotator(), + ], + ); + } +} + +export default RegexNERAnnotator; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator_relation.js.html b/docs/simple_annotator_relation.js.html new file mode 100644 index 0000000..5b3d335 --- /dev/null +++ b/docs/simple_annotator_relation.js.html @@ -0,0 +1,98 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator/relation.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator/relation.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotator from '../annotator'; +import TokenizerAnnotator from './tokenize'; +import WordsToSentenceAnnotator from './ssplit'; +import POSTaggerAnnotator from './pos'; +import MorphaAnnotator from './lemma'; +import NERClassifierCombiner from './ner'; +import DependencyParseAnnotator from './depparse'; + +/** + * @class + * @classdesc Class representing an RelationExtractorAnnotator. + * @extends Annotator + * @memberof CoreNLP/simple/annotator + * @requires tokenize, ssplit, pos, lemma, ner, depparse, relation + * @see {@link https://stanfordnlp.github.io/CoreNLP/relation.html|RelationExtractorAnnotator} + */ +class RelationExtractorAnnotator extends Annotator { + /** + * Create an Annotator + * @param {Object} [options] a key-value map of options, without the annotator prefix + */ + constructor(options = {}) { + super( + 'relation', + { + ...options, + }, + [ + new TokenizerAnnotator(), + new WordsToSentenceAnnotator(), + new POSTaggerAnnotator(), + new MorphaAnnotator(), + new NERClassifierCombiner(), + new DependencyParseAnnotator(), + ], + ); + } +} + +export default RelationExtractorAnnotator; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator_ssplit.js.html b/docs/simple_annotator_ssplit.js.html new file mode 100644 index 0000000..121d2d6 --- /dev/null +++ b/docs/simple_annotator_ssplit.js.html @@ -0,0 +1,98 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator/ssplit.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator/ssplit.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotator from '../annotator'; +import TokenizerAnnotator from './tokenize'; + +/** + * @class + * @classdesc Class representing an WordsToSentenceAnnotator. + * Combines multiple {@link Token}s into sentences + * @extends Annotator + * @memberof CoreNLP/simple/annotator + * @requires tokenize, ssplit + * @see {@link https://stanfordnlp.github.io/CoreNLP/ssplit.html|WordsToSentenceAnnotator} + */ +class WordsToSentenceAnnotator extends Annotator { + /** + * Create an Annotator + * @param {Object} [options] a key-value map of options, without the annotator prefix + */ + constructor(options = {}) { + super( + 'ssplit', + { + eolonly: false, + isOneSentence: false, + newlineIsSentenceBreak: 'never', + boundaryMultiTokenRegex: null, + boundaryTokenRegex: '\\.|[!?]+', + boundariesToDiscard: null, + htmlBoundariesToDiscard: null, + tokenPatternsToDiscard: null, + boundaryFollowersRegex: null, + ...options, + }, + [ + new TokenizerAnnotator(), + ], + ); + } +} + +export default WordsToSentenceAnnotator; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_annotator_tokenize.js.html b/docs/simple_annotator_tokenize.js.html new file mode 100644 index 0000000..487005a --- /dev/null +++ b/docs/simple_annotator_tokenize.js.html @@ -0,0 +1,90 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/annotator/tokenize.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/annotator/tokenize.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotator from '../annotator'; + +/** + * @class + * @classdesc Class representing an TokenizerAnnotator. Identifies {@link Token}s + * @extends Annotator + * @memberof CoreNLP/simple/annotator + * @requires tokenize + * @see {@link https://stanfordnlp.github.io/CoreNLP/tokenize.html|TokenizerAnnotator} + */ +class TokenizerAnnotator extends Annotator { + /** + * Create an Annotator + * @param {Object} [options] a key-value map of options, without the annotator prefix + */ + constructor(options = {}) { + super( + 'tokenize', + { + language: 'Unspecified', + // class: null, // throws error on CoreNLP server + whitespace: false, + keepeol: false, + // options: null, // throws error on CoreNLP server + verbose: false, + ...options, + }, + ); + } +} + +export default TokenizerAnnotator; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_coref-chain.js.html b/docs/simple_coref-chain.js.html new file mode 100644 index 0000000..1854d28 --- /dev/null +++ b/docs/simple_coref-chain.js.html @@ -0,0 +1,162 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/coref-chain.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/coref-chain.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import CorefMention from './coref-mention'; + +/** + * @class + * @classdesc Class representing an CorefChain + */ +class CorefChain { + /** + * Create an CorefChain + * @param {Array.<CorefMention>} mentions + */ + constructor(mentions) { + this._mentions = mentions; + } + + /** + * Retrieves all the contained CorefMention instances + * @returns {Array.<CorefMention>} mentions + */ + mentions() { + return this._mentions; + } + + /** + * Retrieves a CorefMention at the index specified + * @param {number} index + * @returns {CorefMention} mention + */ + mention(index) { + return this._mentions[index]; + } + + /** + * Retrieves the first representative mention + * @returns {CorefMention} mention + */ + representative() { + return this._mentions.find(mention => mention.isRepresentativeMention()); + } + + /** + * Retrieves all the non-representative mentions + * @returns {Array.<CorefMention>} mentions + */ + nonRepresentatives() { + return this._mentions.filter(mention => !mention.isRepresentativeMention()); + } + + /** + * Gets or sets a Document reference for the current coref-chain + * @param {Document} doc + * @returns {Document} doc + */ + document(doc = null) { + if (doc) { + this._document = doc; + } + + return this._document; + } + + /** + * Update an instance of CorefChain with Document references to Sentence(s) and their Token(s) + * @param {Document} doc - a Document object, the same one used to generate corefs annotations + * @returns {CorefChain} chain - The current chain instance + */ + fromDocument(doc) { + this._mentions.forEach((mention) => { + const sentence = doc.sentence(mention.sentNum() - 1); + const token = sentence.token(mention.startIndex() - 1); + mention.sentence(sentence); + mention.token(token); + }); + return this; + } + + /** + * Update an instance of CorefChain with data provided by a JSON + * @param {Array.<CorefMentionJSON>} data - A sentence corefs mentions chain, as + * returned by CoreNLP API service + * @returns {CorefChain} chain - The current chain instance + */ + fromJSON(data) { + this._mentions = data.map(mention => CorefMention.fromJSON(mention)); + return this; + } + + toJSON() { + return [...this._mentions]; + } + + /** + * Get an instance of CorefChain from a given JSON of sentence corefs + * @param {Array.<CorefMentionJSON>} data - The sentence corefs data, as + * returned by CoreNLP API service + * @returns {CorefChain} sentenchain - A new CorefChain instance + */ + static fromJSON(data) { + const instance = new this(); + return instance.fromJSON(data); + } +} + +export default CorefChain; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_coref-mention.js.html b/docs/simple_coref-mention.js.html new file mode 100644 index 0000000..17597a4 --- /dev/null +++ b/docs/simple_coref-mention.js.html @@ -0,0 +1,223 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/coref-mention.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/coref-mention.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>/** + * A CorefMention. + * @typedef CorefMentionJSON + * @property {number} id - Mention ID + * @property {string} text - The text (literal word) of the mention + * @property {number} sentNum - 1-based index of the sentence containinng this mention + * @property {number} headIndex - 1-based index + * @property {number} startIndex - 1-based index + * @property {number} endIndex - 1-based index + * @property {boolean} isRepresentativeMention - Wehther the mention word is representative or not + * @property {("ANIMATE"|"INANIMATE"|"UNKNOWN")} animacy - Mention's animacy + * @property {("FEMALE"|"MALE"|"NEUTRAL"|"UNKNOWN")} gender - Gender of the mention + * @property {("SINGULAR"|"PLURAL"|"UNKNOWN")} number - Cardinality of the mention + * @property {("PRONOMINAL"|"NOMINAL"|"PROPER"|"LIST")} type - Mention type + * @property {Array} position - Position is a binary tuple of + * (sentence number, mention number in that sentence). This is used for indexing by mention. + * + * @see {@link https://github.com/stanfordnlp/CoreNLP/blob/7cfaf869f9500da16b858ab1a2835234ae46f96e/src/edu/stanford/nlp/dcoref/CorefChain.java#L148} + * @see {@link https://github.com/stanfordnlp/CoreNLP/blob/master/src/edu/stanford/nlp/dcoref/Dictionaries.java} for enum definitions + */ + +/** + * @class + * @classdesc Class representing an CorefMention + */ +class CorefMention { + /** + * Retrieves the mention ID + * @returns {string} id + */ + id() { + return this._data.id; + } + + /** + * Retrieves the mention text + * @returns {string} text + */ + text() { + return this._data.text; + } + + /** + * Retrieves the mention sentence number + * @see {@link CorefMention.sentence()} for simplicity + * @returns {number} sentNum + */ + sentNum() { + return this._data.sentNum; + } + + /** + * Retrieves the mention headIndex + * @returns {number} headIndex + */ + headIndex() { + return this._data.headIndex; + } + + /** + * Retrieves the mention startIndex + * @returns {number} startIndex + */ + startIndex() { + return this._data.startIndex; + } + + /** + * Retrieves the mention endIndex + * @returns {number} endIndex + */ + endIndex() { + return this._data.endIndex; + } + + /** + * Tells you if the mentions is representative or not + * @returns {boolean} isRepresentativeMention + */ + isRepresentativeMention() { + return this._data.isRepresentativeMention; + } + + /** + * Retrieves the mention animacy + * @returns {("ANIMATE"|"INANIMATE"|"UNKNOWN")} animacy + */ + animacy() { + return this._data.animacy; + } + + /** + * Retrieves the mention gender + * @returns {("FEMALE"|"MALE"|"NEUTRAL"|"UNKNOWN")} gender + */ + gender() { + return this._data.gender; + } + + /** + * Retrieves the mention number + * @returns {("SINGULAR"|"PLURAL"|"UNKNOWN")} number + */ + number() { + return this._data.number; + } + + /** + * Retrieves the mention type + * @returns {("PRONOMINAL"|"NOMINAL"|"PROPER"|"LIST")} type + */ + type() { + return this._data.type; + } + + /** + * Retrieves the mention's sentence container + * @returns {Sentence} sentence + */ + sentence(sentence = null) { + if (sentence) { + this._sentence = sentence; + } + + return this._sentence; + } + + /** + * Retrieves the mention's associated token + * @returns {Token} token + */ + token(token = null) { + if (token) { + this._token = token; + } + + return this._token; + } + + /** + * Update an instance of CorefMention with data provided by a JSON + * @param {CorefMentionJSON} data - The mention data, as returned by CoreNLP API service + * @returns {CorefMention} mention - The current mention instance + */ + fromJSON(data) { + this._data = data; + return this; + } + + toJSON() { + return { ...this._data }; + } + + /** + * Get an instance of CorefMention from a given JSON + * @param {CorefMentionJSON} data - The match data, as returned by CoreNLP API service + * @returns {CorefMention} mention - A new CorefMention instance + */ + static fromJSON(data) { + const instance = new this(); + return instance.fromJSON(data); + } +} + +export default CorefMention; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_document.js.html b/docs/simple_document.js.html new file mode 100644 index 0000000..1e8c644 --- /dev/null +++ b/docs/simple_document.js.html @@ -0,0 +1,185 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/document.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/document.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotable from './annotable'; +import WordsToSentenceAnnotator from './annotator/ssplit'; +import Sentence from './sentence'; +import CorefChain from './coref-chain'; +import CorefAnnotator from './annotator/coref'; + +/** + * The CoreNLP API JSON structure representing a document + * @typedef DocumentJSON + * @property {number} index + * @property {Array.<Sentence>} sentences + */ + +/** + * @class + * @classdesc Class representing a Document + * @extends Annotable + * @memberof CoreNLP/simple + */ +class Document extends Annotable { + /** + * Create a Document + * @param {string} text + */ + constructor(text) { + super(text); + this._sentences = []; + } + + /** + * Get a string representation + * @return {string} document + */ + toString() { + return this._text || this._sentences.map(sent => sent.toString()).join('. '); + } + + /** + * Get a list of sentences + * @returns {Array.<Sentence>} sentences - The document sentences + */ + sentences() { + if (!this.hasAnnotator(WordsToSentenceAnnotator)) { + throw new Error('Asked for sentences on Document, but there are unmet annotator dependencies.'); + } + return this._sentences; + } + + /** + * Get the sentence for a given index + * @param {number} index - The position of the sentence to get + * @returns {Sentence} sentence - The document sentences + */ + sentence(index) { + return this.sentences()[index]; + } + + /** + * @todo Missing implementation + * @see https://stanfordnlp.github.io/CoreNLP/dcoref.html + * @returns {Array.<CorefChain>} + */ + corefs() { + if (!this.hasAnnotator(CorefAnnotator)) { + throw new Error('Asked for corefs on Document, but there are unmet annotator dependencies.'); + } + return this._corefs; + } + + /** + * Get the coreference for a given index + * @param {number} index - 0-based index of the coref chain list + * @see https://stanfordnlp.github.io/CoreNLP/dcoref.html + * @returns {CorefChain} + */ + coref(index) { + return this.corefs()[index]; + } + + /** + * Sets the language ISO (given by the pipeline during the annotation process) + * This is solely to keep track of the language chosen for further analysis + * @return {string} text + */ + setLanguageISO(iso) { + super.setLanguageISO(iso); + this._sentences.forEach(sentence => sentence.setLanguageISO(iso)); + } + + /** + * Update an instance of Document with data provided by a JSON + * @param {DocumentJSON} data - The document data, as returned by CoreNLP API service + * @returns {Document} document - The current document instance + */ + fromJSON(data) { + if (data.sentences) { + this.addAnnotator(WordsToSentenceAnnotator); + this._sentences = data.sentences.map(sent => Sentence.fromJSON(sent, true)); + } + if (data.corefs) { + this.addAnnotator(CorefAnnotator); + this._corefs = Object.keys(data.corefs) + .filter(chainIndex => chainIndex !== 'length') + .map(chainIndex => CorefChain.fromJSON(data.corefs[chainIndex]).fromDocument(this)); + } + return this; + } + + toJSON() { + return { + text: this._text, + sentences: this._sentences, + }; + } + + /** + * Get an instance of Document from a given JSON + * @param {DocumentJSON} data - The document data, as returned by CoreNLP API service + * @returns {Document} document - A new Document instance + */ + static fromJSON(data) { + const instance = new this(); + return instance.fromJSON(data); + } +} + +export default Document; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_expression-sentence-match.js.html b/docs/simple_expression-sentence-match.js.html new file mode 100644 index 0000000..c05c24a --- /dev/null +++ b/docs/simple_expression-sentence-match.js.html @@ -0,0 +1,143 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/expression-sentence-match.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/expression-sentence-match.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>/** + * @typedef ExpressionSentenceMatchGroup + * @property {string} label - group label + * @property {number} begin - 0-based index of the matched group, relative to the given text + * @property {number} end - 0-based index of the matched group, relative to the given text + * @property {Token} [token] - onluy given if aggregated with an annotated Sentence or Document + * @property {ExpressionSentenceMatchGroup} [$label] - other groups inside + */ + +/** + * A ExpressionSentenceMatch of either `TokensRegex`, `Semgrex` or `Tregex`. + * @typedef ExpressionSentenceMatchJSON + * @property {number} begin - word begin position, starting from zero + * @property {number} end - word end position, starting from zero (no match ends at 0) + * @property {string} text - matched text + * @property {string} [$label] - any label, as defined in the expression pattern + */ + +/** + * @class + * @classdesc Class representing an ExpressionSentenceMatch + */ +class ExpressionSentenceMatch { + /** + * Returns the main and labeled groups as a list of ExpressionSentenceMatchGroup + * @returns {Array.<ExpressionSentenceMatchGroup>} groups + */ + groups() { + return [this._data] + .concat(this.labels().map(label => this.group(label))); + } + + /** + * Returns the labeled group as ExpressionSentenceMatchGroup from a given label + * @description + * Nodes in a Macthed expression can be named, we call them groups here, and + * the labels are the name of the nodes. + * @see {@link https://nlp.stanford.edu/nlp/javadoc/javanlp/edu/stanford/nlp/semgraph/semgrex/SemgrexPattern.html#Naming_nodes} + * @param {string} label - The label name, not prefixed wih $ + * @returns {ExpressionSentenceMatchGroup} group + */ + group(label) { + return this._data[`$${label}`]; + } + + /** + * Retrieves the list of labels (aliases) available for the current sentence match. + * @description + * Labels are those aliases you can add to a group match expression, for example, + * in Semgrex, you can do {ner:/PERSON/=good_guy}, from where "good_guy" would be the label + * and internally it will come as $good_guy as a member of {@link ExpressionSentenceMatchGroup}. + * @returns {Array.<string>} labels + */ + labels() { + return Object.keys(this._data) + .filter(key => /^\$/.test(key)) + .map(label => label.substr(1)); + } + + /** + * Update an instance of ExpressionSentenceMatch with data provided by a JSON + * @param {ExpressionSentenceMatchJSON} data - The match data, as returned by CoreNLP API service + * @returns {ExpressionSentenceMatch} expression - The current match instance + */ + fromJSON(data) { + this._data = data; + return this; + } + + toJSON() { + return { ...this._data }; + } + + /** + * Get an instance of ExpressionSentenceMatch from a given JSON + * @param {ExpressionSentenceMatchJSON} data - The match data, as returned by CoreNLP API service + * @returns {ExpressionSentenceMatch} match - A new ExpressionSentenceMatch instance + */ + static fromJSON(data) { + const instance = new this(); + return instance.fromJSON(data); + } +} + +export default ExpressionSentenceMatch; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_expression-sentence.js.html b/docs/simple_expression-sentence.js.html new file mode 100644 index 0000000..f6eb4f7 --- /dev/null +++ b/docs/simple_expression-sentence.js.html @@ -0,0 +1,143 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/expression-sentence.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/expression-sentence.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import ExpressionSentenceMatch from './expression-sentence-match'; + +/** + * @class + * @classdesc Class representing an ExpressionSentence + */ +class ExpressionSentence { + /** + * Create an ExpressionSentence + * @param {Array.<ExpressionSentenceMatch>} matches + */ + constructor(matches) { + this._matches = matches; + } + + /** + * Retrieves all the contained ExpressionSentenceMatch instances + * @returns {Array.<ExpressionSentenceMatch>} matches + */ + matches() { + return this._matches; + } + + /** + * Retrieves a ExpressionSentenceMatch at the index specified + * @param {number} index + * @returns {ExpressionSentenceMatch} match + */ + match(index) { + return this._matches[index]; + } + + /** + * Hydrates the current ExpressionSentence match groups with Token objects. + * @description + * The Expression / ExpressionSentence objects comes from outside the standard CoreNLP pipelines. + * This mean that neither `TokensRegex`, `Semgrex` nor `Tregex` will tag the nodes with POS, + * lemma, NER or any otehr annotation data. This is sometimes a usful resource to count with, if + * you can apart of getting the matching groups, get the annotated tokens for each word in the + * match group. + * @returns {ExpressionSentence} instance = The current instance + */ + mergeTokensFromSentence(sentence) { + const findToken = group => sentence.tokens().find(token => + // match group attributes with token attributes + token.index() === group.begin + 1 + && token.toString() === group.text); + + this.matches() + .forEach(match => + match.groups().forEach((group) => { + // eslint-disable-next-line no-param-reassign + group.token = findToken(group) || group.token; + })); + return this; + } + + /** + * Update an instance of ExpressionSentence with data provided by a JSON + * @param {ExpressionSentenceJSON} data - The expression data, as returned by CoreNLP API service + * @returns {ExpressionSentenceJSON} sentence - The current sentence instance + */ + fromJSON(data) { + this._matches = Object.keys(data) + .filter(matchIndex => matchIndex !== 'length') + .map(matchIndex => ExpressionSentenceMatch.fromJSON(data[matchIndex])); + return this; + } + + toJSON() { + return [...this._matches]; + } + + /** + * Get an instance of ExpressionSentence from a given JSON of sentence matches + * @param {ExpressionSentenceJSON} data - The sentence data, as returned by CoreNLP API service + * @returns {ExpressionSentence} sentence - A new ExpressionSentence instance + */ + static fromJSON(data) { + const instance = new this(); + return instance.fromJSON(data); + } +} + +export default ExpressionSentence; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_expression.js.html b/docs/simple_expression.js.html new file mode 100644 index 0000000..072785e --- /dev/null +++ b/docs/simple_expression.js.html @@ -0,0 +1,170 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/expression.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/expression.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Annotable from './annotable'; +import Annotator from './annotator'; +import ExpressionSentence from './expression-sentence'; + +export class TokensRegexAnnotator extends Annotator { } +export class SemgrexAnnotator extends Annotator { } +export class TregexAnnotator extends Annotator { } + +/** + * The CoreNLP API JSON structure representing an expression + * This expression structure can be found as the output of `TokensRegex`, + * `Semgrex` and `Tregex`. + * @typedef ExpressionJSON + * @property {number} index + * @property {Array.<Array.<ExpressionSentenceMatch>>} sentences + */ + +/** + * @class + * @classdesc Class representing an Expression + * @extends Annotable + * @memberof CoreNLP/simple + */ +class Expression extends Annotable { + /** + * Create an Expression + * @param {string} text + * @param {string} pattern - Either `TokensRegex`, `Semgrex` or `Tregex` valid pattern + */ + constructor(text, pattern) { + super(text); + this._pattern = pattern; + this._sentences = []; + } + + /** + * Get a string representation + * @return {string} expression + */ + toString() { + return this._text; + } + + /** + * Get the pattern + * @returns {string} pattern - The expression pattern + */ + pattern() { + return this._pattern; + } + + /** + * Get a list of sentences + * @returns {Array.<ExpressionSentence>} sentences - The expression sentences + */ + sentences() { + return this._sentences; + } + + /** + * Get the sentence for a given index + * @param {number} index - The position of the sentence to get + * @returns {ExpressionSentence} sentence - An expression sentence + */ + sentence(index) { + return this.sentences()[index]; + } + + /** + * Hydrate the Expression instance with Token objects from an annotated Document + * @see {@link ExpressionSentence#mergeTokensFromSentence} + * @param {Document} document - An annotated document from where to extract the tokens + * @returns {Expression} expression - The current expression instance + */ + mergeTokensFromDocument(document) { + document.sentences().forEach((sentence, i) => + this.sentence(i).mergeTokensFromSentence(sentence)); + return this; + } + + /** + * Update an instance of Expression with data provided by a JSON + * @param {ExpressionJSON} data - The expression data, as returned by CoreNLP API service + * @returns {Expression} expression - The current expression instance + */ + fromJSON(data) { + if (data.sentences) { + this._sentences = data.sentences + .map(sent => ExpressionSentence.fromJSON(sent)); + } + return this; + } + + toJSON() { + return { + text: this._text, + sentences: this._sentences, // TODO this._sentences is an array of array of objects + }; + } + + /** + * Get an instance of Expression from a given JSON + * @param {ExpressionJSON} data - The expression data, as returned by CoreNLP API service + * @returns {Expression} expression - A new Expression instance + */ + static fromJSON(data) { + const instance = new this(); + return instance.fromJSON(data); + } +} + +export default Expression; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_governor.js.html b/docs/simple_governor.js.html new file mode 100644 index 0000000..0b4bcde --- /dev/null +++ b/docs/simple_governor.js.html @@ -0,0 +1,145 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/governor.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/governor.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Service from '../service'; + +/** + * The CoreNLP API JSON structure representing a governor + * @typedef GovernorJSON + * @property {string} dep + * @property {number} governor + * @property {string} governorGloss + * @property {number} dependent + * @property {string} dependentGloss + */ + +/** + * @class + * @classdesc Class representing a Governor + * @memberof CoreNLP/simple + */ +class Governor { + /** + * Create a Governor + * @param {string} dep + * @param {Token} dependentToken + * @param {Token} [governorToken] + */ + // constructor(dep, dependentToken, governorToken = Token.fromJSON({ index: 0, word: 'ROOT' })) { + constructor(dep, dependentToken, governorToken = null) { + this._dep = dep; + this._dependentToken = dependentToken; + this._governorToken = governorToken; + } + + /** + * Get a string representation + * @return {string} governor + */ + toString() { + return this._dep; + } + + governor() { + return this._governorToken; + } + + governorGloss() { + return this._governorToken ? this._governorToken.word() : ''; + } + + dependent() { + return this._dependentToken; + } + + dependentGloss() { + return this._dependentToken.word() ? this._dependentToken.word() : ''; + } + + dep() { + return this._dep; + } + + depInfo() { + return Service.getGovernorDepInfo(this._dep); + } + + toJSON() { + return { + dep: this._dep, + governor: this._governorToken ? this._governorToken.index() : 0, + governorGloss: this._governorToken ? this._governorToken.word() : 'ROOT', + dependent: this._dependentToken.index(), + dependentGloss: this._dependentToken.word(), + }; + } + + /** + * Get an instance of Governor from a given JSON + * + * @todo It is not possible to properly generate a Governor from a GovernorJSON + * the Governor requires references to the Token instances in order to work + * @param {GovernorJSON} data - The token data, as returned by CoreNLP API service + * @returns {Governor} governor - A new Governor instance + */ + static fromJSON() { + throw Error('Not implemented'); + } +} + +export default Governor; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_sentence.js.html b/docs/simple_sentence.js.html new file mode 100644 index 0000000..fbc3740 --- /dev/null +++ b/docs/simple_sentence.js.html @@ -0,0 +1,374 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/sentence.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/sentence.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import head from 'lodash.head'; +import Annotable from './annotable'; +import TokenizerAnnotator from './annotator/tokenize'; +import ParserAnnotator from './annotator/parse'; +import DependencyParseAnnotator from './annotator/depparse'; +import Token from './token'; +import Governor from './governor'; + + +/** + * The CoreNLP API JSON structure representing a sentence + * @typedef SentenceJSON + * @property {number} index - 1-based index, as they come indexed by StanfordCoreNLP + * @property {Array.<Token>} tokens + */ + +/** + * @class + * @classdesc Class representing a Sentence + * @extends Annotable + * @memberof CoreNLP/simple + * @see {@link https://github.com/stanfordnlp/CoreNLP/blob/master/src/edu/stanford/nlp/simple/Sentence.java} + */ +class Sentence extends Annotable { + /** + * Create a Sentence + * @param {string} text + */ + constructor(text) { + super(text); + this._tokens = []; + this._governors = []; + } + + /** + * Get a string representation + * @returns {string} sentence + */ + toString() { + return this._text || this._tokens.map(token => token.toString()).join(' '); + } + + /** + * Get the index relative to the parent document + * @returns {number} index + */ + index() { + return this._index; + } + + /** + * Get a string representation of the parse tree structure + * @returns {string} parse + */ + parse() { + return this._parse; + } + + /** + * Get an array of string representations of the sentence words + * @requires {@link TokenizerAnnotator} + * @throws {Error} in case the require annotator was not applied to the sentence + * @returns {Array.<string>} words + */ + words() { + if (!this.hasAnnotator(TokenizerAnnotator)) { + throw new Error('Asked for words on Sentence, but there are unmet annotator dependencies.'); + } + return this._tokens.map(token => token.word()); + } + + /** + * Get a string representations of the Nth word of the sentence + * @requires {@link TokenizerAnnotator} + * @throws {Error} in case the require annotator was not applied to the sentence + * @throws {Error} in case the token for the given index does not exists + * @param {number} index - 0-based index as they are arranged naturally + * @returns {string} word + */ + word(index) { + if (!this.hasAnnotator(TokenizerAnnotator)) { + throw new Error('Asked for a word on Sentence, but there are unmet annotator dependencies.'); + } + if (!this._tokens[index]) { + throw new Error(`Sentence instance does not contain a token with index ${index}`); + } + return this._tokens[index].word(); + } + + [Symbol.iterator]() { + return this._tokens.values(); + } + + /** + * Get a string representations of the tokens part of speech of the sentence + * @returns {Array.<string>} posTags + */ + posTags() { + return this._tokens.map(token => token.pos()); + } + + /** + * Get a string representations of the Nth token part of speech of the sentence + * @throws {Error} in case the token for the given index does not exists + * @param {number} index - 0-based index as they are arranged naturally + * @returns {string} posTag + */ + posTag(index) { + if (!this._tokens[index]) { + throw new Error(`Sentence instance does not contain a token with index ${index}`); + } + return this._tokens[index].pos(); + } + + /** + * Get a string representations of the tokens lemmas of the sentence + * @returns {Array.<string>} lemmas + */ + lemmas() { + return this._tokens.map(token => token.lemma()); + } + + /** + * Get a string representations of the Nth token lemma of the sentence + * @throws {Error} in case the token for the given index does not exists + * @param {number} index - 0-based index as they are arranged naturally + * @returns {string} lemma + */ + lemma(index) { + if (!this._tokens[index]) { + throw new Error(`Sentence instance does not contain a token with index ${index}`); + } + return this._tokens[index].lemma(); + } + + /** + * Get a string representations of the tokens nerTags of the sentence + * @returns {Array.<string>} nerTags + */ + nerTags() { + return this._tokens.map(token => token.ner()); + } + + /** + * Get a string representations of the Nth token nerTag of the sentence + * @throws {Error} in case the token for the given index does not exists + * @param {number} index - 0-based index as they are arranged naturally + * @returns {string} nerTag + */ + nerTag(index) { + if (!this._tokens[index]) { + throw new Error(`Sentence instance does not contain a token with index ${index}`); + } + return this._tokens[index].ner(); + } + + /** + * Get a list of annotated governors by the dependency-parser + * @requires {@link DependencyParseAnnotator} + * @throws {Error} in case the require annotator was not applied to the sentence + * @returns {Array.<Governor>} governors + */ + governors() { + if (!this.hasAnnotator(DependencyParseAnnotator)) { + throw new Error('Asked for governors on Sentence, but there are unmet annotator dependencies.'); + } + return this._governors; + } + + /** + * Get the N-th annotated governor by the dependency-parser annotator + * @requires {@link DependencyParseAnnotator} + * @throws {Error} in case the require annotator was not applied to the sentence + * @returns {Governor} governor + */ + governor(index) { + if (!this.hasAnnotator(DependencyParseAnnotator)) { + throw new Error('Asked for a governor on Sentence, but there are unmet annotator dependencies.'); + } + return this._governors[index]; + } + + // TODO + // eslint-disable-next-line class-methods-use-this, no-unused-vars + incommingDependencyLabel(index) { + } + + // TODO + // eslint-disable-next-line class-methods-use-this + natlogPolarities() { + } + + // TODO + // eslint-disable-next-line class-methods-use-this, no-unused-vars + natlogPolarity(index) { + } + + // TODO + // eslint-disable-next-line class-methods-use-this + openie() { + } + + // TODO + // eslint-disable-next-line class-methods-use-this, no-unused-vars + openieTriples(index) { + } + + /** + * Get an array of token representations of the sentence words + * @requires {@link TokenizerAnnotator} + * @throws {Error} in case the require annotator was not applied to the sentence + * @returns {Array.<Token>} tokens + */ + tokens() { + if (!this.hasAnnotator(TokenizerAnnotator)) { + throw new Error('Asked for tokens on Sentence, but there are unmet annotator dependencies.'); + } + return this._tokens; + } + + /** + * Get the Nth token of the sentence + * @requires {@link TokenizerAnnotator} + * @throws {Error} in case the require annotator was not applied to the sentence + * @returns {Token} token + */ + token(index) { + if (!this.hasAnnotator(TokenizerAnnotator)) { + throw new Error('Asked for a token on Sentence, but there are unmet annotator dependencies.'); + } + return this._tokens[index]; + } + + // TODO + // eslint-disable-next-line class-methods-use-this + algorithms() { + } + + /** + * Sets the language ISO (given by the pipeline during the annotation process) + * This is solely to keep track of the language chosen for further analysis + * @return {string} text + */ + setLanguageISO(iso) { + super.setLanguageISO(iso); + this._tokens.forEach(token => token.setLanguageISO(iso)); + } + + /** + * Get a JSON representation of the current sentence + * @description + * The following arrow function `data => Sentence.fromJSON(data).toJSON()` is idempontent, if + * considering shallow comparison, not by reference. + * This JSON will respects the same structure as it expects from {@see Sentence#fromJSON}. + * @returns {SentenceJSON} data + */ + toJSON() { + let json = { + index: this._index, + tokens: this._tokens.map(token => token.toJSON()), + basicDependencies: this._governors.map(governor => governor.toJSON()), + enhancedDependencies: this._enhancedDependencies, + enhancedPlusPlusDependencies: this._enhancedPlusPlusDependencies, + }; + + if (this._parse) { + json = { ...json, parse: this._parse }; + } + return json; + } + + /** + * Update an instance of Sentence with data provided by a JSON + * @param {SentenceJSON} data - The document data, as returned by CoreNLP API service + * @param {boolean} [isSentence] - Indicate if the given data represents just the sentence + * or a full document with just a sentence inside + * @returns {Sentence} sentence - The current sentence instance + */ + fromJSON(data, isSentence = false) { + const sentence = isSentence ? data : head(data.sentences); + this._index = data.index; + if (sentence.tokens) { + this.addAnnotator(TokenizerAnnotator); + this._tokens = sentence.tokens.map(tok => Token.fromJSON(tok)); + } + if (sentence.parse) { + this.addAnnotator(ParserAnnotator); + this._parse = sentence.parse; + } + if (sentence.basicDependencies) { + this.addAnnotator(DependencyParseAnnotator); + this._governors = sentence.basicDependencies.map(gov => + new Governor(gov.dep, this._tokens[gov.dependent - 1], this._tokens[gov.governor - 1])); + // @see relation annotator... + this._basicDependencies = sentence.basicDependencies; + this._enhancedDependencies = sentence.enhancedDependencies; + this._enhancedPlusPlusDependencies = sentence.enhancedPlusPlusDependencies; + } + return this; + } + + + /** + * Get an instance of Sentence from a given JSON + * @param {SentenceJSON} data - The document data, as returned by CoreNLP API service + * @param {boolean} [isSentence] - Indicate if the given data represents just the sentence of a + * full document + * @returns {Sentence} document - A new Sentence instance + */ + static fromJSON(data, isSentence = false) { + const instance = new this(); + return instance.fromJSON(data, isSentence); + } +} + +export default Sentence; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/simple_token.js.html b/docs/simple_token.js.html new file mode 100644 index 0000000..f06f837 --- /dev/null +++ b/docs/simple_token.js.html @@ -0,0 +1,266 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>simple/token.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">simple/token.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Service from '../service'; +import Annotable from './annotable'; + +// @see {@link https://github.com/stanfordnlp/CoreNLP/blob/master/src/edu/stanford/nlp/simple/Token.java} + +/** + * The CoreNLP API JSON structure representing a token + * @typedef TokenJSON + * @property {number} index + * @property {string} word + * @property {string} originalText + * @property {number} characterOffsetBegin + * @property {number} characterOffsetEnd + * @property {string} before + * @property {string} after + */ + +/** + * @typedef PosInfo + * @description + * PosInfo does not come as part of the CoreNLP. It is an indexed reference of POS tags + * by language provided by this library. It's only helpful for analysis and study. The + * data was collected from different documentation resources on the Web. + * The PosInfo may vary depending on the POS annotation types used, for example, CoreNLP + * for Spanish uses custom POS tags developed by Stanford, but this can also be changed + * to Universal Dependencies, which uses different tags. + * @property {string} group + * @property {string} tag + * @property {Array.<string>} examples + */ + +/** + * @class + * @classdesc Class representing a Token + * @extends Annotable + * @memberof CoreNLP/simple + */ +class Token extends Annotable { + /** + * Create a Token + * @param {string} word + */ + // eslint-disable-next-line no-useless-constructor + constructor(word) { + super(word); + } + + /** + * Get a string representation + * @returns {string} token + */ + toString() { + return this._text; + } + + /** + * Get the `inde ` number associated by the StanfordCoreNLP + * This index is relative to the sentence it belongs to, and is a 1-based (possitive integer). + * This number is useful to match tokens within a sentence for depparse, coreference, etc. + * @returns {number} index + */ + index() { + return this._index; + } + + /** + * Get the original word + * @returns {string} word + */ + word() { + return this._text; + } + + /** + * Get the original text + * @returns {string} originalText + */ + originalText() { + return this._originalText; + } + + /** + * Get the characterOffsetBegin relative to the parent sentence + * @description + * A 0-based index of the word's initial character within the sentence + * @returns {number} characterOffsetBegin + */ + characterOffsetBegin() { + return this._characterOffsetBegin; + } + + /** + * Get the characterOffsetEnd relative to the parent sentence + * A 0-based index of the word's ending character within the sentence + * @returns {number} characterOffsetEnd + */ + characterOffsetEnd() { + return this._characterOffsetEnd; + } + + /** + * Get the `before` string relative to the container sentence + * @returns {string} before + */ + before() { + return this._before; + } + + /** + * Get the `after` string relative to the container sentence + * @returns {string} after + */ + after() { + return this._after; + } + + /** + * Get the annotated lemma + * @returns {string} lemma + */ + lemma() { + return this._lemma; + } + + /** + * Get the annotated part-of-speech for the current token + * @returns {string} pos + */ + pos() { + return this._pos; + } + + /** + * Get additional metadata about the POS annotation + * NOTE: Do not use this method other than just for study or analysis purposes. + * @see {@link PosInfo} for more details + * @returns {PosInfo} posInfo + */ + posInfo() { + return Service.getTokenPosInfo(this._pos, this.getLanguageISO()); + } + + /** + * Get the annotated named-entity for the current token + * @returns {string} ner + */ + ner() { + return this._ner; + } + + /** + * Get the annotated speaker for the current token + * @see {@link CorefAnnotator} + * @returns {string} speaker + */ + speaker() { + return this._speaker; + } + + /** + * Get a JSON representation of the current token + * @description + * The following arrow function `data => Token.fromJSON(data).toJSON()` is idempontent, if + * considering shallow comparison, not by reference. + * This JSON will respects the same structure as it expects from {@see Token#fromJSON}. + * @returns {TokenJSON} data + */ + toJSON() { + return { + index: this._index, + word: this._text, + originalText: this._originalText, + characterOffsetBegin: this._characterOffsetBegin, + characterOffsetEnd: this._characterOffsetEnd, + before: this._before, + after: this._after, + // annotations metadata + pos: this._pos, + lemma: this._lemma, + ner: this._ner, + speaker: this._speaker, + }; + } + + /** + * Get an instance of Token from a given JSON + * @param {TokenJSON} data - The token data, as returned by CoreNLP API service + * @returns {Token} token - A new Token instance + */ + static fromJSON(data) { + const instance = new this(); + instance._index = data.index; + instance._text = data.word; + instance._originalText = data.originalText; + instance._characterOffsetBegin = data.characterOffsetBegin; + instance._characterOffsetEnd = data.characterOffsetEnd; + instance._before = data.before; + instance._after = data.after; + // annotations metadata + instance._pos = data.pos; + instance._lemma = data.lemma; + instance._ner = data.ner; + instance._speaker = data.speaker; + return instance; + } +} + +export default Token; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html> diff --git a/docs/styles/jsdoc.css b/docs/styles/jsdoc.css new file mode 100644 index 0000000..c13c7d4 --- /dev/null +++ b/docs/styles/jsdoc.css @@ -0,0 +1,645 @@ +@import url(https://fonts.googleapis.com/css?family=Montserrat:400,700); + +* { + box-sizing: border-box +} + +html, body { + height: 100%; + width: 100%; +} + +body { + color: #4d4e53; + background-color: white; + margin: 0 auto; + padding: 0 20px; + font-family: 'Helvetica Neue', Helvetica, sans-serif; + font-size: 16px; + line-height: 160%; +} + +a, +a:active { + color: #606; + text-decoration: none; +} + +a:hover { + text-decoration: none; +} + +article a { + border-bottom: 1px solid #ddd; +} + +article a:hover, article a:active { + border-bottom-color: #222; +} + +p, ul, ol, blockquote { + margin-bottom: 1em; +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Montserrat', sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + color: #000; + font-weight: 400; + margin: 0; +} + +h1 { + font-weight: 300; + font-size: 48px; + margin: 1em 0 .5em; +} + +h1.page-title { + font-size: 48px; + margin: 1em 30px; +} + +h2 { + font-size: 24px; + margin: 1.5em 0 .3em; +} + +h3 { + font-size: 24px; + margin: 1.2em 0 .3em; +} + +h4 { + font-size: 18px; + margin: 1em 0 .2em; + color: #4d4e53; +} + +h4.name { + color: #fff; + background: #6d426d; + box-shadow: 0 .25em .5em #d3d3d3; + border-top: 1px solid #d3d3d3; + border-bottom: 1px solid #d3d3d3; + margin: 1.5em 0 0.5em; + padding: .75em 0 .75em 10px; +} + +h4.name a { + color: #fc83ff; +} + +h4.name a:hover { + border-bottom-color: #fc83ff; +} + +h5, .container-overview .subsection-title { + font-size: 120%; + letter-spacing: -0.01em; + margin: 8px 0 3px 0; +} + +h6 { + font-size: 100%; + letter-spacing: -0.01em; + margin: 6px 0 3px 0; + font-style: italic; +} + +tt, code, kbd, samp { + font-family: Consolas, Monaco, 'Andale Mono', monospace; + background: #f4f4f4; + padding: 1px 5px; +} + +.class-description { + font-size: 130%; + line-height: 140%; + margin-bottom: 1em; + margin-top: 1em; +} + +.class-description:empty { + margin: 0 +} + +#main { + float: right; + min-width: 360px; + width: calc(100% - 240px); +} + +header { + display: block +} + +section { + display: block; + background-color: #fff; + padding: 0 0 0 30px; +} + +.variation { + display: none +} + +.signature-attributes { + font-size: 60%; + color: #eee; + font-style: italic; + font-weight: lighter; +} + +nav { + float: left; + display: block; + width: 250px; + background: #fff; + overflow: auto; + position: fixed; + height: 100%; +} + +nav h3 { + margin-top: 12px; + font-size: 13px; + text-transform: uppercase; + letter-spacing: 1px; + font-weight: 700; + line-height: 24px; + margin: 15px 0 10px; + padding: 0; + color: #000; +} + +nav ul { + font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif; + font-size: 100%; + line-height: 17px; + padding: 0; + margin: 0; + list-style-type: none; +} + +nav ul a, +nav ul a:active { + font-family: 'Montserrat', sans-serif; + line-height: 18px; + padding: 0; + display: block; + font-size: 12px; +} + +nav a:hover, +nav a:active { + color: #606; +} + +nav > ul { + padding: 0 10px; +} + +nav > ul > li > a { + color: #606; +} + +nav ul ul { + margin-bottom: 10px +} + +nav ul ul + ul { + margin-top: -10px; +} + +nav ul ul a { + color: hsl(207, 1%, 60%); + border-left: 1px solid hsl(207, 10%, 86%); +} + +nav ul ul a, +nav ul ul a:active { + padding-left: 20px +} + +nav h2 { + font-size: 12px; + margin: 0; + padding: 0; +} + +nav > h2 > a { + display: block; + margin: 10px 0 -10px; + color: #606 !important; +} + +footer { + color: hsl(0, 0%, 28%); + margin-left: 250px; + display: block; + padding: 15px; + font-style: italic; + font-size: 90%; +} + +.ancestors { + color: #999 +} + +.ancestors a { + color: #999 !important; +} + +.clear { + clear: both +} + +.important { + font-weight: bold; + color: #950B02; +} + +.yes-def { + text-indent: -1000px +} + +.type-signature { + color: #CA79CA +} + +.type-signature:last-child { + color: #eee; +} + +.name, .signature { + font-family: Consolas, Monaco, 'Andale Mono', monospace +} + +.signature { + color: #fc83ff; +} + +.details { + margin-top: 6px; + border-left: 2px solid #DDD; + line-height: 20px; + font-size: 14px; +} + +.details dt { + width: 120px; + float: left; + padding-left: 10px; +} + +.details dd { + margin-left: 70px; + margin-top: 6px; + margin-bottom: 6px; +} + +.details ul { + margin: 0 +} + +.details ul { + list-style-type: none +} + +.details pre.prettyprint { + margin: 0 +} + +.details .object-value { + padding-top: 0 +} + +.description { + margin-bottom: 1em; + margin-top: 1em; +} + +.code-caption { + font-style: italic; + font-size: 107%; + margin: 0; +} + +.prettyprint { + font-size: 14px; + overflow: auto; +} + +.prettyprint.source { + width: inherit; + line-height: 18px; + display: block; + background-color: #0d152a; + color: #aeaeae; +} + +.prettyprint code { + line-height: 18px; + display: block; + background-color: #0d152a; + color: #4D4E53; +} + +.prettyprint > code { + padding: 15px; +} + +.prettyprint .linenums code { + padding: 0 15px +} + +.prettyprint .linenums li:first-of-type code { + padding-top: 15px +} + +.prettyprint code span.line { + display: inline-block +} + +.prettyprint.linenums { + padding-left: 70px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.prettyprint.linenums ol { + padding-left: 0 +} + +.prettyprint.linenums li { + border-left: 3px #34446B solid; +} + +.prettyprint.linenums li.selected, .prettyprint.linenums li.selected * { + background-color: #34446B; +} + +.prettyprint.linenums li * { + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; +} + +.params, .props { + border-spacing: 0; + border: 1px solid #ddd; + border-collapse: collapse; + border-radius: 3px; + box-shadow: 0 1px 3px rgba(0,0,0,0.1); + width: 100%; + font-size: 14px; + margin: 1em 0; +} + +.params .type { + white-space: nowrap; +} + +.params code { + white-space: pre; +} + +.params td, .params .name, .props .name, .name code { + color: #4D4E53; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-size: 100%; +} + +.params td, .params th, .props td, .props th { + margin: 0px; + text-align: left; + vertical-align: top; + padding: 10px; + display: table-cell; +} + +.params td { + border-top: 1px solid #eee +} + +.params thead tr, .props thead tr { + background-color: #fff; + font-weight: bold; +} + +.params .params thead tr, .props .props thead tr { + background-color: #fff; + font-weight: bold; +} + +.params td.description > p:first-child, .props td.description > p:first-child { + margin-top: 0; + padding-top: 0; +} + +.params td.description > p:last-child, .props td.description > p:last-child { + margin-bottom: 0; + padding-bottom: 0; +} + +span.param-type, .params td .param-type, .param-type dd { + color: #606; + font-family: Consolas, Monaco, 'Andale Mono', monospace +} + +.param-type dt, .param-type dd { + display: inline-block +} + +.param-type { + margin: 14px 0; +} + +.disabled { + color: #454545 +} + +/* navicon button */ +.navicon-button { + display: none; + position: relative; + padding: 2.0625rem 1.5rem; + transition: 0.25s; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + opacity: .8; +} +.navicon-button .navicon:before, .navicon-button .navicon:after { + transition: 0.25s; +} +.navicon-button:hover { + transition: 0.5s; + opacity: 1; +} +.navicon-button:hover .navicon:before, .navicon-button:hover .navicon:after { + transition: 0.25s; +} +.navicon-button:hover .navicon:before { + top: .825rem; +} +.navicon-button:hover .navicon:after { + top: -.825rem; +} + +/* navicon */ +.navicon { + position: relative; + width: 2.5em; + height: .3125rem; + background: #000; + transition: 0.3s; + border-radius: 2.5rem; +} +.navicon:before, .navicon:after { + display: block; + content: ""; + height: .3125rem; + width: 2.5rem; + background: #000; + position: absolute; + z-index: -1; + transition: 0.3s 0.25s; + border-radius: 1rem; +} +.navicon:before { + top: .625rem; +} +.navicon:after { + top: -.625rem; +} + +/* open */ +.nav-trigger:checked + label:not(.steps) .navicon:before, +.nav-trigger:checked + label:not(.steps) .navicon:after { + top: 0 !important; +} + +.nav-trigger:checked + label .navicon:before, +.nav-trigger:checked + label .navicon:after { + transition: 0.5s; +} + +/* Minus */ +.nav-trigger:checked + label { + -webkit-transform: scale(0.75); + transform: scale(0.75); +} + +/* × and + */ +.nav-trigger:checked + label.plus .navicon, +.nav-trigger:checked + label.x .navicon { + background: transparent; +} + +.nav-trigger:checked + label.plus .navicon:before, +.nav-trigger:checked + label.x .navicon:before { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + background: #FFF; +} + +.nav-trigger:checked + label.plus .navicon:after, +.nav-trigger:checked + label.x .navicon:after { + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + background: #FFF; +} + +.nav-trigger:checked + label.plus { + -webkit-transform: scale(0.75) rotate(45deg); + transform: scale(0.75) rotate(45deg); +} + +.nav-trigger:checked ~ nav { + left: 0 !important; +} + +.nav-trigger:checked ~ .overlay { + display: block; +} + +.nav-trigger { + position: fixed; + top: 0; + clip: rect(0, 0, 0, 0); +} + +.overlay { + display: none; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + width: 100%; + height: 100%; + background: hsla(0, 0%, 0%, 0.5); + z-index: 1; +} + +@media only screen and (min-width: 320px) and (max-width: 680px) { + body { + overflow-x: hidden; + } + + nav { + background: #FFF; + width: 250px; + height: 100%; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: -250px; + z-index: 3; + padding: 0 10px; + transition: left 0.2s; + } + + .navicon-button { + display: inline-block; + position: fixed; + top: 1.5em; + right: 0; + z-index: 2; + } + + #main { + width: 100%; + min-width: 360px; + } + + #main h1.page-title { + margin: 1em 0; + } + + #main section { + padding: 0; + } + + footer { + margin-left: 0; + } +} + +/** Add a '#' to static members */ +[data-type="member"] a::before { + content: '#'; + display: inline-block; + margin-left: -14px; + margin-right: 5px; +} diff --git a/docs/styles/prettify.css b/docs/styles/prettify.css new file mode 100644 index 0000000..629bde5 --- /dev/null +++ b/docs/styles/prettify.css @@ -0,0 +1,79 @@ +.pln { + color: #ddd; +} + +/* string content */ +.str { + color: #61ce3c; +} + +/* a keyword */ +.kwd { + color: #fbde2d; +} + +/* a comment */ +.com { + color: #aeaeae; +} + +/* a type name */ +.typ { + color: #8da6ce; +} + +/* a literal value */ +.lit { + color: #fbde2d; +} + +/* punctuation */ +.pun { + color: #ddd; +} + +/* lisp open bracket */ +.opn { + color: #000000; +} + +/* lisp close bracket */ +.clo { + color: #000000; +} + +/* a markup tag name */ +.tag { + color: #8da6ce; +} + +/* a markup attribute name */ +.atn { + color: #fbde2d; +} + +/* a markup attribute value */ +.atv { + color: #ddd; +} + +/* a declaration */ +.dec { + color: #EF5050; +} + +/* a variable name */ +.var { + color: #c82829; +} + +/* a function name */ +.fun { + color: #4271ae; +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; +} diff --git a/docs/util_tree.js.html b/docs/util_tree.js.html new file mode 100644 index 0000000..749e8eb --- /dev/null +++ b/docs/util_tree.js.html @@ -0,0 +1,317 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>util/tree.js - Documentation</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.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> +</head> +<body> + +<input type="checkbox" id="nav-trigger" class="nav-trigger" /> +<label for="nav-trigger" class="navicon-button x"> + <div class="navicon"></div> +</label> + +<label for="nav-trigger" class="overlay"></label> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ConnectorCli.html">ConnectorCli</a><ul class='methods'><li data-type='method'><a href="ConnectorCli.html#get">get</a></li></ul></li><li><a href="ConnectorServer.html">ConnectorServer</a><ul class='methods'><li data-type='method'><a href="ConnectorServer.html#get">get</a></li></ul></li><li><a href="CorefChain.html">CorefChain</a><ul class='methods'><li data-type='method'><a href="CorefChain.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#document">document</a></li><li data-type='method'><a href="CorefChain.html#fromDocument">fromDocument</a></li><li data-type='method'><a href="CorefChain.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefChain.html#mention">mention</a></li><li data-type='method'><a href="CorefChain.html#mentions">mentions</a></li><li data-type='method'><a href="CorefChain.html#nonRepresentatives">nonRepresentatives</a></li><li data-type='method'><a href="CorefChain.html#representative">representative</a></li></ul></li><li><a href="CorefMention.html">CorefMention</a><ul class='methods'><li data-type='method'><a href="CorefMention.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#animacy">animacy</a></li><li data-type='method'><a href="CorefMention.html#endIndex">endIndex</a></li><li data-type='method'><a href="CorefMention.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CorefMention.html#gender">gender</a></li><li data-type='method'><a href="CorefMention.html#headIndex">headIndex</a></li><li data-type='method'><a href="CorefMention.html#id">id</a></li><li data-type='method'><a href="CorefMention.html#isRepresentativeMention">isRepresentativeMention</a></li><li data-type='method'><a href="CorefMention.html#number">number</a></li><li data-type='method'><a href="CorefMention.html#sentence">sentence</a></li><li data-type='method'><a href="CorefMention.html#sentNum">sentNum</a></li><li data-type='method'><a href="CorefMention.html#startIndex">startIndex</a></li><li data-type='method'><a href="CorefMention.html#text">text</a></li><li data-type='method'><a href="CorefMention.html#token">token</a></li><li data-type='method'><a href="CorefMention.html#type">type</a></li></ul></li><li><a href="CoreNLP_simple.Annotable.html">Annotable</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotator">addAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#addAnnotators">addAnnotators</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnnotator">hasAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#hasAnyAnnotator">hasAnyAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#removeAnnotator">removeAnnotator</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Annotable.html#text">text</a></li></ul></li><li><a href="CoreNLP_simple.Annotator.html">Annotator</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Annotator.html#dependencies">dependencies</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#equalsTo">equalsTo</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#option">option</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#options">options</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipeline">pipeline</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#pipelineOptions">pipelineOptions</a></li><li data-type='method'><a href="CoreNLP_simple.Annotator.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Document.html">Document</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Document.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#coref">coref</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#corefs">corefs</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Document.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Expression.html">Expression</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Expression.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#mergeTokensFromDocument">mergeTokensFromDocument</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#pattern">pattern</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentence">sentence</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#sentences">sentences</a></li><li data-type='method'><a href="CoreNLP_simple.Expression.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Governor.html">Governor</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Governor.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Governor.html#toString">toString</a></li></ul></li><li><a href="CoreNLP_simple.Sentence.html">Sentence</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Sentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governor">governor</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#governors">governors</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#lemmas">lemmas</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTag">nerTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#nerTags">nerTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#parse">parse</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTag">posTag</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#posTags">posTags</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#setLanguageISO">setLanguageISO</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#token">token</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#tokens">tokens</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#word">word</a></li><li data-type='method'><a href="CoreNLP_simple.Sentence.html#words">words</a></li></ul></li><li><a href="CoreNLP_simple.Token.html">Token</a><ul class='methods'><li data-type='method'><a href="CoreNLP_simple.Token.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#after">after</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#before">before</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetBegin">characterOffsetBegin</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#characterOffsetEnd">characterOffsetEnd</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#index">index</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#lemma">lemma</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#ner">ner</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#originalText">originalText</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#pos">pos</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#posInfo">posInfo</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#speaker">speaker</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toJSON">toJSON</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#toString">toString</a></li><li data-type='method'><a href="CoreNLP_simple.Token.html#word">word</a></li></ul></li><li><a href="CoreNLP_simple_annotator.CorefAnnotator.html">CorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DependencyParseAnnotator.html">DependencyParseAnnotator</a></li><li><a href="CoreNLP_simple_annotator.DeterministicCorefAnnotator.html">DeterministicCorefAnnotator</a></li><li><a href="CoreNLP_simple_annotator.MorphaAnnotator.html">MorphaAnnotator</a></li><li><a href="CoreNLP_simple_annotator.NERClassifierCombiner.html">NERClassifierCombiner</a></li><li><a href="CoreNLP_simple_annotator.ParserAnnotator.html">ParserAnnotator</a></li><li><a href="CoreNLP_simple_annotator.POSTaggerAnnotator.html">POSTaggerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RegexNERAnnotator.html">RegexNERAnnotator</a></li><li><a href="CoreNLP_simple_annotator.RelationExtractorAnnotator.html">RelationExtractorAnnotator</a></li><li><a href="CoreNLP_simple_annotator.TokenizerAnnotator.html">TokenizerAnnotator</a></li><li><a href="CoreNLP_simple_annotator.WordsToSentenceAnnotator.html">WordsToSentenceAnnotator</a></li><li><a href="CoreNLP_util.Tree.html">Tree</a><ul class='methods'><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromSentence">fromSentence</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#.fromString">fromString</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#dump">dump</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirst">visitDeepFirst</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitDeepFirstRight">visitDeepFirstRight</a></li><li data-type='method'><a href="CoreNLP_util.Tree.html#visitLeaves">visitLeaves</a></li></ul></li><li><a href="ExpressionSentence.html">ExpressionSentence</a><ul class='methods'><li data-type='method'><a href="ExpressionSentence.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentence.html#match">match</a></li><li data-type='method'><a href="ExpressionSentence.html#matches">matches</a></li><li data-type='method'><a href="ExpressionSentence.html#mergeTokensFromSentence">mergeTokensFromSentence</a></li></ul></li><li><a href="ExpressionSentenceMatch.html">ExpressionSentenceMatch</a><ul class='methods'><li data-type='method'><a href="ExpressionSentenceMatch.html#.fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#fromJSON">fromJSON</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#group">group</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#groups">groups</a></li><li data-type='method'><a href="ExpressionSentenceMatch.html#labels">labels</a></li></ul></li><li><a href="Node.html">Node</a><ul class='methods'><li data-type='method'><a href="Node.html#getLanguageISO">getLanguageISO</a></li><li data-type='method'><a href="Node.html#setLanguageISO">setLanguageISO</a></li></ul></li><li><a href="Pipeline.html">Pipeline</a><ul class='methods'><li data-type='method'><a href="Pipeline.html#annotate">annotate</a></li><li data-type='method'><a href="Pipeline.html#annotateSemgrex">annotateSemgrex</a></li><li data-type='method'><a href="Pipeline.html#annotateTokensRegex">annotateTokensRegex</a></li><li data-type='method'><a href="Pipeline.html#annotateTregex">annotateTregex</a></li><li data-type='method'><a href="Pipeline.html#assert">assert</a></li><li data-type='method'><a href="Pipeline.html#getService">getService</a></li></ul></li><li><a href="Properties.html">Properties</a><ul class='methods'><li data-type='method'><a href="Properties.html#getProperties">getProperties</a></li><li data-type='method'><a href="Properties.html#getProperty">getProperty</a></li><li data-type='method'><a href="Properties.html#setProperty">setProperty</a></li><li data-type='method'><a href="Properties.html#toJSON">toJSON</a></li><li data-type='method'><a href="Properties.html#toPropertiessFileContent">toPropertiessFileContent</a></li></ul></li><li><a href="Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="CoreNLP.html">CoreNLP</a></li><li><a href="CoreNLP_simple.html">CoreNLP/simple</a></li><li><a href="CoreNLP_simple_annotator.html">CoreNLP/simple/annotator</a></li><li><a href="CoreNLP_util.html">CoreNLP/util</a></li></ul><h3><a href="global.html">Global</a></h3> +</nav> + +<div id="main"> + + <h1 class="page-title">util/tree.js</h1> + + + + + + + + <section> + <article> + <pre class="prettyprint source linenums"><code>import Service from '../service'; + +/** + * @class + * @classdesc Class representing a Sentence Tree Node + */ +export class Node { + constructor(pos = '', word = '', children = [], paren = null) { + this._pos = pos; + this._word = word; + this._children = children; + this._parent = paren; + } + + pos() { + return this._pos; + } + + posInfo() { + // itf it's a subtree + if (this._children.length) { + return Service.getSentenceParseInfo(this._pos, this.getLanguageISO()); + } + + // if it's a leaf + return Service.getTokenPosInfo(this._pos, this.getLanguageISO()); + } + + token(token = null) { + if (token) { + this._token = token; + } + + return this._token; + } + + word() { + return this._word; + } + + /** + * Sets the language ISO (given by the pipeline during the annotation process) + * This is solely to keep track of the language chosen for further analysis + * @return {string} text + */ + setLanguageISO(iso) { + this._language = iso; + } + + /** + * Retrieves the language ISO + * @return {string} text + */ + getLanguageISO() { + return this._language; + } + + children() { + return this._children; + } + + appendChild(node) { + this._children.push(node); + } + + parent(paren = null) { + if (paren) { + this._parent = paren; + } + + return this._parent; + } + + toJSON() { + return { + pos: this._pos, + posInfo: this.posInfo(), + word: this._word, + token: this._token, + children: this._children, + }; + } +} + +/** + * @class + * @classdesc Class representing a Parse tree structure + * @memberof CoreNLP/util + * @description + * The nodes are given in order left to right as the words in a sentence appears + * The leaves are grouped into semantic representations provided by the Annotator + * This class is pretty useful to use along with the ParserAnnotator + * @see inspired on {@link http://www.nltk.org/howto/tree.html|Tree} + * @see the lecture {@link http://www.cs.cornell.edu/courses/cs474/2004fa/lec1.pdf|Tree Syntax of Natural Language} + */ +class Tree { + /** + * Create a Tree + * @param {Node} node + */ + constructor(node) { + this.rootNode = node; + } + + /** + * Get a Tree string representation for debugging purposes + * @returns {string} tree + */ + dump() { + return JSON.stringify(this.rootNode, (key, val) => { + if (val instanceof Node) { + return val.children().length ? { + pos: val.pos(), + info: val.info(), + children: val.children(), + } : { + pos: val.pos(), + info: val.info(), + word: val.word(), + token: val.token(), + }; + } + + return val; + }, 2); + } + + /** + * Performs Deep-first Search calling a visitor for each node + * @see {@link https://en.wikipedia.org/wiki/Depth-first_search|DFS} + */ + visitDeepFirst(visitor, node = this.rootNode) { + node.children().forEach((childNode) => { + this.visitDeepFirst(visitor, childNode); + visitor(childNode); + }); + + visitor(node); + } + + /** + * Performs Deep-first Search calling a visitor for each node, from right to left + * @see {@link https://en.wikipedia.org/wiki/Depth-first_search|DFS} + */ + visitDeepFirstRight(visitor, node = this.rootNode) { + node.children().reverse().forEach((childNode) => { + this.visitDeepFirstRight(visitor, childNode); + visitor(childNode); + }); + + visitor(node); + } + + /** + * Performs Deep-first Search calling a visitor only over leaves + * @see {@link https://en.wikipedia.org/wiki/Depth-first_search|DFS} + */ + visitLeaves(visitor, node = this.rootNode) { + node.children().forEach((childNode) => { + if (childNode.children().length) { + this.visitLeaves(visitor, childNode); + } else { + visitor(childNode); + } + }); + + if (!node.children().length) { + visitor(node); + } + } + + /** + * @param {Sentence} sentence + * @param {boolean} [doubleLink] whether the child nodes should have a reference + * to their parent or not - this allows the use of {@link Node.parent()} + * @returns {Tree} tree + */ + static fromSentence(sentence, doubleLink = false) { + const parse = sentence.parse(); + if (!parse) { + throw new Error('Unable to create Tree from Sentence, did you run ParserAnnotator first?'); + } + + const tree = Tree.fromString(parse, doubleLink); + // link nodes with tokens + let visitedLeaves = 0; + // eslint-disable-next-line no-plusplus + tree.visitLeaves(node => node.token(sentence.token(visitedLeaves++))); + + const languageIso = sentence.getLanguageISO(); + if (languageIso) { + tree.visitDeepFirst(node => node.setLanguageISO(languageIso)); + } + + return tree; + } + + /** + * @param {string} str + * @param {boolean} [doubleLink] whether the child nodes should have a reference + * to their parent or not - this allows the use of {@link Node.parent()} + * @returns {Tree} tree + */ + static fromString(str, doubleLink = false) { + return new Tree(this._transformTree(this._buildTree(str), doubleLink)); + } + + static _buildTree(str) { + let currentNode = { children: [] }; + const openNodes = [currentNode]; + const l = str.length; + // eslint-disable-next-line no-plusplus + for (let i = 0; i < l; i++) { + if (str[i] === '(') { + currentNode = { str: '', children: [] }; + openNodes[openNodes.length - 1].children.push(currentNode); + openNodes.push(currentNode); + } else if (str[i] === ')') { + this._cleanNode(currentNode); + openNodes.pop(); + currentNode = openNodes[openNodes.length - 1]; + } else { + currentNode.str += str[i]; + } + } + return currentNode.children[0]; + } + + static _cleanNode(node) { + const str = node.str.trim(); + const delimiterPos = str.indexOf(' '); + if (delimiterPos > -1) { + // eslint-disable-next-line no-param-reassign + node.pos = str.substr(0, delimiterPos); + // eslint-disable-next-line no-param-reassign + node.word = str.substr(delimiterPos + 1); + } else { + // eslint-disable-next-line no-param-reassign + node.pos = str; + } + } + + static _transformTree(node, doubleLink) { + if (doubleLink) { + const parentNode = new Node(node.pos, node.word); + node.children.forEach((n) => { + const childNode = this._transformTree(n); + childNode.parent(parentNode); + parentNode.appendChild(childNode); + }); + + return parentNode; + } + + return new Node(node.pos, node.word, node.children.map(n => this._transformTree(n))); + } +} + +export default Tree; +</code></pre> + </article> + </section> + + + + +</div> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Feb 24 2018 11:02:19 GMT-0300 (-03) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. +</footer> + +<script>prettyPrint();</script> +<script src="scripts/linenumber.js"></script> +</body> +</html>