rita 3.0.26 → 3.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/rita.cjs +5 -4
- package/dist/rita.cjs.map +1 -1
- package/dist/rita.js +5 -4
- package/dist/rita.js.map +1 -1
- package/dist/rita.min.js +46 -46
- package/dist/rita.min.js.map +1 -1
- package/package.json +5 -10
package/README.md
CHANGED
|
@@ -102,18 +102,18 @@ console.log(grammar.expand());
|
|
|
102
102
|
<a href="https://rednoise.org/rita/reference/RiMarkov/probability/index.html">probability()</a><br/>
|
|
103
103
|
<a href="https://rednoise.org/rita/reference/RiMarkov/probabilities/index.html">probabilities()</a><br/>
|
|
104
104
|
<a href="https://rednoise.org/rita/reference/RiMarkov/size/index.html">size()</a><br/>
|
|
105
|
-
|
|
106
|
-
<a href="https://rednoise.org/rita/reference/RiMarkov/toJSON/index.html">toJSON()</a><br/>
|
|
105
|
+
<!-- <a href="https://rednoise.org/rita/reference/RiMarkov/toString/index.html">toString()</a><br/-->
|
|
106
|
+
<a href="https://rednoise.org/rita/reference/RiMarkov/toJSON/index.html">toJSON()</a><br/>
|
|
107
107
|
<a href="https://rednoise.org/rita/reference/RiMarkov/fromJSON/index.html">fromJSON()</a><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
|
|
108
108
|
</td>
|
|
109
109
|
<td style="vertical-align: top !important; padding-top: 15px; min-width: 125px">
|
|
110
110
|
<a href="https://rednoise.org/rita/reference/RiGrammar/addRule/index.html">addRule()</a><br/>
|
|
111
|
-
<a href="https://rednoise.org/rita/reference/RiGrammar/addRules/index.html">addRules()</a><br/>
|
|
112
111
|
<a href="https://rednoise.org/rita/reference/RiGrammar/expand/index.html">expand()</a><br/>
|
|
113
112
|
<a href="https://rednoise.org/rita/reference/RiGrammar/removeRule/index.html">removeRule()</a><br/>
|
|
113
|
+
<a href="https://rednoise.org/rita/reference/RiGrammar/addRules/index.html">setRules()</a><br/>
|
|
114
114
|
<a href="https://rednoise.org/rita/reference/RiGrammar/toJSON/index.html">toJSON()</a><br/>
|
|
115
|
-
|
|
116
|
-
<a href="https://rednoise.org/rita/reference/RiGrammar/fromJSON/index.html">fromJSON()</a><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
|
|
115
|
+
<!-- <a href="https://rednoise.org/rita/reference/RiGrammar/toString/index.html">toString()</a><br/-->
|
|
116
|
+
<a href="https://rednoise.org/rita/reference/RiGrammar/fromJSON/index.html">fromJSON()</a><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
|
|
117
117
|
</td>
|
|
118
118
|
</tr>
|
|
119
119
|
</table>
|
package/dist/rita.cjs
CHANGED
|
@@ -42580,10 +42580,11 @@ var RiTa = class _RiTa {
|
|
|
42580
42580
|
* Create a RiTa grammar instance
|
|
42581
42581
|
* @param {object} [rules] - the rules of the grammar
|
|
42582
42582
|
* @param {object} [context] - the context of the grammar
|
|
42583
|
+
* @param {object} [options] - options for the grammar
|
|
42583
42584
|
* @returns {RiGrammar} - a new RiGrammar instance
|
|
42584
42585
|
*/
|
|
42585
|
-
static grammar(rules, context) {
|
|
42586
|
-
return new (0, _riscript.RiGrammar)(rules, context);
|
|
42586
|
+
static grammar(rules, context, options) {
|
|
42587
|
+
return new (0, _riscript.RiGrammar)(rules, context, { ...options, RiTa: _RiTa });
|
|
42587
42588
|
}
|
|
42588
42589
|
/**
|
|
42589
42590
|
* Add a transform function to the RiScript parser
|
|
@@ -42624,7 +42625,7 @@ var RiTa = class _RiTa {
|
|
|
42624
42625
|
* @returns {string} the result of the evaluation
|
|
42625
42626
|
*/
|
|
42626
42627
|
static evaluate(script, context, options) {
|
|
42627
|
-
return _RiTa.riscript.evaluate(script, context, options);
|
|
42628
|
+
return _RiTa.riscript.evaluate(script, context, { ...options });
|
|
42628
42629
|
}
|
|
42629
42630
|
/**
|
|
42630
42631
|
* Creates a new RiMarkov object
|
|
@@ -43236,7 +43237,7 @@ markov_default.parent = RiTa;
|
|
|
43236
43237
|
stemmer_default.tokenizer = RiTa.tokenizer;
|
|
43237
43238
|
RiTa.SILENT = false;
|
|
43238
43239
|
RiTa.SILENCE_LTS = false;
|
|
43239
|
-
RiTa.VERSION = "3.0.
|
|
43240
|
+
RiTa.VERSION = "3.0.28";
|
|
43240
43241
|
RiTa.FIRST = 1;
|
|
43241
43242
|
RiTa.SECOND = 2;
|
|
43242
43243
|
RiTa.THIRD = 3;
|