diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 446859d47..000000000 --- a/.eslintrc +++ /dev/null @@ -1,61 +0,0 @@ -{ - "root": true, - "extends": [ - "eslint:recommended", - "plugin:regexp/recommended" - ], - "ignorePatterns": [ - "**/builds/*" - ], - "env": { - "es6": true, - "browser": true, - "node": true - }, - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module" - }, - "rules": { - "comma-dangle": [ - 1, - "only-multiline" - ], - "quotes": [ - 0, - "single", - "avoid-escape" - ], - "max-nested-callbacks": [ - 1, - 4 - ], - "max-params": [ - 1, - 5 - ], - "consistent-return": 1, - "no-bitwise": 1, - "no-empty": 1, - "no-console": 1, - "no-duplicate-imports": 1, - "no-eval": 2, - "no-implied-eval": 2, - "no-mixed-operators": 2, - "no-multi-assign": 2, - "no-nested-ternary": 1, - "no-prototype-builtins": 0, - "no-self-compare": 1, - "no-sequences": 1, - "no-shadow": 2, - "no-unmodified-loop-condition": 1, - "no-use-before-define": 1, - "prefer-const": 0, - "radix": 1, - "no-unused-vars": 1, - "regexp/prefer-d": 0, - "regexp/prefer-w": 0, - "regexp/prefer-range": 0, - "regexp/no-unused-capturing-group": 0 - } -} \ No newline at end of file diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 2bb331343..e8de29ff1 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: - node-version: [14.x, 18.x] + node-version: [18.x, 22.x] os: [macos-latest, ubuntu-latest, windows-latest] steps: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index bb51dd12f..284e6bff8 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: '16' + node-version: '20' cache: npm - run: npm ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd53c7eb6..216a41bba 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 16.x + node-version: 20.x cache: npm - name: install diff --git a/.gitignore b/.gitignore index 96df0e9f4..3480f1a3f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,11 @@ coverage.lcov codecov.yml plugins/phrases/data/ learn/giga/result/ -.scratch.js \ No newline at end of file +.scratch.js +.eslintrc +.npmignore +.github +.gitignore +LICENSE +package-lock.json +rollup.config.js diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index c4076b340..000000000 --- a/.jshintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "esversion": 8, - "node": true, - "asi": true, - "undef": true, - "-W138": true, - "globals": { - "self": true - } -} \ No newline at end of file diff --git a/README.md b/README.md index ef2554a81..093ffdfed 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ and how hard it is to actually parse and use? - @@ -292,11 +292,11 @@ import nlp from 'compromise/one' let doc = nlp("Wayne's World, party time") let data = doc.json() -/* [{ +/* [{ normal:"wayne's world party time", - terms:[{ text: "Wayne's", normal: "wayne" }, + terms:[{ text: "Wayne's", normal: "wayne" }, ... - ] + ] }] */ ``` @@ -717,6 +717,8 @@ _(these methods are on the main `nlp` object)_ - **[.possessives().strip()](https://observablehq.com/@spencermountain/compromise-selections)** - "Spencer's" -> "Spencer" - **[.quotations()](https://observablehq.com/@spencermountain/compromise-selections)** - return any terms inside paired quotation marks - **[.quotations().strip()](https://observablehq.com/@spencermountain/compromise-selections)** - remove quotation marks +- **[.slashes()](https://observablehq.com/@spencermountain/compromise-selections)** - return any terms grouped by slashes + - **[.slashes().split()](https://observablehq.com/@spencermountain/compromise-selections)** - turn 'love/hate' into 'love hate'
@@ -990,7 +992,7 @@ nlpEx('This is type safe!').ngrams({ min: 1 })
- +
๐ Can it run on my arduino-watch?
@@ -1021,13 +1023,13 @@ nlpEx('This is type safe!').ngrams({ min: 1 })
we do offer a tokenize-only build, which has the POS-tagger pulled-out.
-
diff --git a/builds/compromise.js b/builds/compromise.js
index 0947a6006..29f66ce63 100644
--- a/builds/compromise.js
+++ b/builds/compromise.js
@@ -1 +1 @@
-var e,t;e=this,t=function(){var e={methods:{one:{},two:{},three:{},four:{}},model:{one:{},two:{},three:{}},compute:{},hooks:[]};const t={compute:function(e){const{world:t}=this,n=t.compute;return"string"==typeof e&&n.hasOwnProperty(e)?n[e](this):(e=>"[object Array]"===Object.prototype.toString.call(e))(e)?e.forEach((r=>{t.compute.hasOwnProperty(r)?n[r](this):console.warn("no compute:",e)})):"function"==typeof e?e(this):console.warn("no compute:",e),this}};var n=t,r={forEach:function(e){return this.fullPointer.forEach(((t,n)=>{let r=this.update([t]);e(r,n)})),this},map:function(e,t){let n=this.fullPointer.map(((t,n)=>{let r=this.update([t]),a=e(r,n);return void 0===a?this.none():a}));if(0===n.length)return t||this.update([]);if(void 0!==n[0]){if("string"==typeof n[0])return n;if("object"==typeof n[0]&&(null===n[0]||!n[0].isView))return n}let r=[];return n.forEach((e=>{r=r.concat(e.fullPointer)})),this.toView(r)},filter:function(e){let t=this.fullPointer;return t=t.filter(((t,n)=>{let r=this.update([t]);return e(r,n)})),this.update(t)},find:function(e){let t=this.fullPointer.find(((t,n)=>{let r=this.update([t]);return e(r,n)}));return this.update([t])},some:function(e){return this.fullPointer.some(((t,n)=>{let r=this.update([t]);return e(r,n)}))},random:function(e=1){let t=this.fullPointer,n=Math.floor(Math.random()*t.length);return n+e>this.length&&(n=this.length-e,n=n<0?0:n),t=t.slice(n,n+e),this.update(t)}};const a={termList:function(){return this.methods.one.termList(this.docs)},terms:function(e){let t=this.match(".");return"number"==typeof e?t.eq(e):t},groups:function(e){if(e||0===e)return this.update(this._groups[e]||[]);let t={};return Object.keys(this._groups).forEach((e=>{t[e]=this.update(this._groups[e])})),t},eq:function(e){let t=this.pointer;return t||(t=this.docs.map(((e,t)=>[t]))),t[e]?this.update([t[e]]):this.none()},first:function(){return this.eq(0)},last:function(){let e=this.fullPointer.length-1;return this.eq(e)},firstTerms:function(){return this.match("^.")},lastTerms:function(){return this.match(".$")},slice:function(e,t){let n=this.pointer||this.docs.map(((e,t)=>[t]));return n=n.slice(e,t),this.update(n)},all:function(){return this.update().toView()},fullSentences:function(){let e=this.fullPointer.map((e=>[e[0]]));return this.update(e).toView()},none:function(){return this.update([])},isDoc:function(e){if(!e||!e.isView)return!1;let t=this.fullPointer,n=e.fullPointer;return!t.length!==n.length&&t.every(((e,t)=>!!n[t]&&e[0]===n[t][0]&&e[1]===n[t][1]&&e[2]===n[t][2]))},wordCount:function(){return this.docs.reduce(((e,t)=>(e+=t.filter((e=>""!==e.text)).length,e)),0)},isFull:function(){let e=this.pointer;if(!e)return!0;if(0===e.length||0!==e[0][0])return!1;let t=0,n=0;return this.document.forEach((e=>t+=e.length)),this.docs.forEach((e=>n+=e.length)),t===n},getNth:function(e){return"number"==typeof e?this.eq(e):"string"==typeof e?this.if(e):this}};a.group=a.groups,a.fullSentence=a.fullSentences,a.sentence=a.fullSentences,a.lastTerm=a.lastTerms,a.firstTerm=a.firstTerms;var o=a;const i=Object.assign({},o,n,r);i.get=i.eq;var s=i;class View{constructor(t,n,r={}){[["document",t],["world",e],["_groups",r],["_cache",null],["viewType","View"]].forEach((e=>{Object.defineProperty(this,e[0],{value:e[1],writable:!0})})),this.ptrs=n}get docs(){let t=this.document;return this.ptrs&&(t=e.methods.one.getDoc(this.ptrs,this.document)),t}get pointer(){return this.ptrs}get methods(){return this.world.methods}get model(){return this.world.model}get hooks(){return this.world.hooks}get isView(){return!0}get found(){return this.docs.length>0}get length(){return this.docs.length}get fullPointer(){let{docs:e,ptrs:t,document:n}=this,r=t||e.map(((e,t)=>[t]));return r.map((e=>{let[t,r,a,o,i]=e;return r=r||0,a=a||(n[t]||[]).length,n[t]&&n[t][r]&&(o=o||n[t][r].id,n[t][a-1]&&(i=i||n[t][a-1].id)),[t,r,a,o,i]}))}update(e){let t=new View(this.document,e);if(this._cache&&e&&e.length>0){let n=[];e.forEach(((e,t)=>{let[r,a,o]=e;(1===e.length||0===a&&this.document[r].length===o)&&(n[t]=this._cache[r])})),n.length>0&&(t._cache=n)}return t.world=this.world,t}toView(e){return new View(this.document,e||this.pointer)}fromText(e){const{methods:t}=this;let n=t.one.tokenize.fromString(e,this.world),r=new View(n);return r.world=this.world,r.compute(["normal","freeze","lexicon"]),this.world.compute.preTagger&&r.compute("preTagger"),r.compute("unfreeze"),r}clone(){let e=this.document.slice(0);e=e.map((e=>e.map((e=>((e=Object.assign({},e)).tags=new Set(e.tags),e)))));let t=this.update(this.pointer);return t.document=e,t._cache=this._cache,t}}Object.assign(View.prototype,s);var l=View;const u=function(e){return e&&"object"==typeof e&&!Array.isArray(e)};function c(e,t){if(u(t))for(const n in t)u(t[n])?(e[n]||Object.assign(e,{[n]:{}}),c(e[n],t[n])):Object.assign(e,{[n]:t[n]});return e}var h=function(e,t,n,r){const{methods:a,model:o,compute:i,hooks:s}=t;e.methods&&function(e,t){for(const n in t)e[n]=e[n]||{},Object.assign(e[n],t[n])}(a,e.methods),e.model&&c(o,e.model),e.irregulars&&function(e,t){let n=e.two.models||{};Object.keys(t).forEach((e=>{t[e].pastTense&&(n.toPast&&(n.toPast.ex[e]=t[e].pastTense),n.fromPast&&(n.fromPast.ex[t[e].pastTense]=e)),t[e].presentTense&&(n.toPresent&&(n.toPresent.ex[e]=t[e].presentTense),n.fromPresent&&(n.fromPresent.ex[t[e].presentTense]=e)),t[e].gerund&&(n.toGerund&&(n.toGerund.ex[e]=t[e].gerund),n.fromGerund&&(n.fromGerund.ex[t[e].gerund]=e)),t[e].comparative&&(n.toComparative&&(n.toComparative.ex[e]=t[e].comparative),n.fromComparative&&(n.fromComparative.ex[t[e].comparative]=e)),t[e].superlative&&(n.toSuperlative&&(n.toSuperlative.ex[e]=t[e].superlative),n.fromSuperlative&&(n.fromSuperlative.ex[t[e].superlative]=e))}))}(o,e.irregulars),e.compute&&Object.assign(i,e.compute),s&&(t.hooks=s.concat(e.hooks||[])),e.api&&e.api(n),e.lib&&Object.keys(e.lib).forEach((t=>r[t]=e.lib[t])),e.tags&&r.addTags(e.tags),e.words&&r.addWords(e.words),e.frozen&&r.addWords(e.frozen,!0),e.mutate&&e.mutate(t)};const d=function(e){return"[object Array]"===Object.prototype.toString.call(e)};var m=function(e,t,n){const{methods:r}=n;let a=new t([]);if(a.world=n,"number"==typeof e&&(e=String(e)),!e)return a;if("string"==typeof e)return new t(r.one.tokenize.fromString(e,n));if(o=e,"[object Object]"===Object.prototype.toString.call(o)&&e.isView)return new t(e.document,e.ptrs);var o;if(d(e)){if(d(e[0])){let n=e.map((e=>e.map((e=>({text:e,normal:e,pre:"",post:" ",tags:new Set})))));return new t(n)}let n=function(e){return e.map((e=>e.terms.map((e=>(d(e.tags)&&(e.tags=new Set(e.tags)),e)))))}(e);return new t(n)}return a};let p=Object.assign({},e);const f=function(e,t){t&&f.addWords(t);let n=m(e,l,p);return e&&n.compute(p.hooks),n};Object.defineProperty(f,"_world",{value:p,writable:!0}),f.tokenize=function(e,t){const{compute:n}=this._world;t&&f.addWords(t);let r=m(e,l,p);return n.contractions&&r.compute(["alias","normal","machine","contractions"]),r},f.plugin=function(e){return h(e,this._world,l,this),this},f.extend=f.plugin,f.world=function(){return this._world},f.model=function(){return this._world.model},f.methods=function(){return this._world.methods},f.hooks=function(){return this._world.hooks},f.verbose=function(e){const t="undefined"!=typeof process&&process.env?process.env:self.env||{};return t.DEBUG_TAGS="tagger"===e||!0===e||"",t.DEBUG_MATCH="match"===e||!0===e||"",t.DEBUG_CHUNKS="chunker"===e||!0===e||"",this},f.version="14.13.0";var v=f,b=function(e){let t=e.map((e=>{let t=new Set;return e.forEach((e=>{""!==e.normal&&t.add(e.normal),e.switch&&t.add(`%${e.switch}%`),e.implicit&&t.add(e.implicit),e.machine&&t.add(e.machine),e.root&&t.add(e.root),e.alias&&e.alias.forEach((e=>t.add(e)));let n=Array.from(e.tags);for(let e=0;e
+
but otherwise, compromise isn't easily tree-shaken.
-
+
the tagging methods are competitive, and greedy, so it's not recommended to pull things out.
-
+
Note that without a full POS-tagging, the contraction-parser won't work perfectly. ((spencer's cool) vs. (spencer's house))
-
+
It's recommended to run the library fully.
{let n=e(t);t.replaceWith(n)})),t}(r,t);let o=r.docs[0],i=e.possessives&&o[o.length-1].tags.has("Possessive");t=function(t,e){if("string"!=typeof t)return t;let n=e.groups();return t=t.replace(L,(t=>{let e=t.replace(/\$/,"");return n.hasOwnProperty(e)?n[e].text():t})),t}(t,r);let s=this.update(n);n=n.map((t=>t.slice(0,3)));let l=(s.docs[0]||[]).map((t=>Array.from(t.tags)));if("string"==typeof t&&(t=this.fromText(t).compute("id")),r.insertAfter(t),s.has("@hasContraction")&&r.contractions&&r.grow("@hasContraction+").contractions().expand(),r.delete(s),i){let t=r.docs[0],e=t[t.length-1];e.tags.has("Possessive")||(e.text+="'s",e.normal+="'s",e.tags.add("Possessive"))}let a=r.toView(n).compute(["index","freeze","lexicon"]);return a.world.compute.preTagger&&a.compute("preTagger"),a.compute("unfreeze"),e.tags&&a.terms().forEach(((t,e)=>{t.tagSafe(l[e])})),e.case&&a.docs[0]&&a.docs[0][0]&&0===a.docs[0][0].index[1]&&(a.docs[0][0].text=a.docs[0][0].text.replace(/\w\S*/g,(t=>t.charAt(0).toUpperCase()+t.substring(1).toLowerCase()))),a},replace:function(t,e,n){if(t&&!e)return this.replaceWith(t,n);let r=this.match(t);return r.found?(this.soften(),r.replaceWith(e,n)):this}};var F=V,q=function(t,e){e.forEach((e=>{let[n,r,o]=e,i=o-r;t[n]&&(o===t[n].length&&o>1&&function(t,e){let n=t.length-1,r=t[n],o=t[n-e];o&&r&&(o.post+=r.post,o.post=o.post.replace(/ +([.?!,;:])/,"$1"),o.post=o.post.replace(/[,;:]+([.?!])/,"$1"))}(t[n],i),t[n].splice(r,i))}));for(let e=t.length-1;e>=0;e-=1)if(0===t[e].length&&(t.splice(e,1),e===t.length&&t[e-1])){let n=t[e-1],r=n[n.length-1];r&&(r.post=r.post.trimEnd())}return t};const G={remove:function(t){const{indexN:e}=this.methods.one.pointer;this.uncache();let n=this.all(),r=this;t&&(n=this,r=this.match(t));let o=!n.ptrs;r.has("@hasContraction")&&r.contractions&&r.grow("@hasContraction").contractions().expand();let i=n.fullPointer,s=r.fullPointer.reverse(),l=q(this.document,s);return i=function(t,e){return t=t.map((t=>{let[n]=t;return e[n]?(e[n].forEach((e=>{let n=e[2]-e[1];t[1]<=e[1]&&t[2]>=e[2]&&(t[2]-=n)})),t):t})),t.forEach(((e,n)=>{if(0===e[1]&&0==e[2])for(let e=n+1;e{let i=n.before(t,e);if(i.found){let t=i.terms();r[o][1]-=t.length,r[o][3]=t.docs[0][0].id}})),this.update(r)},growRight:function(t,e,n){"string"==typeof t&&(t=this.world.methods.one.parseMatch(t,n,this.world)),t[0].start=!0;let r=this.fullPointer;return this.forEach(((n,o)=>{let i=n.after(t,e);if(i.found){let t=i.terms();r[o][2]+=t.length,r[o][4]=null}})),this.update(r)},grow:function(t,e,n){return this.growRight(t,e,n).growLeft(t,e,n)}};const le=function(t,e){return[t[0],t[1],e[2]]},ae=(t,e,n)=>{return"string"==typeof t||(r=t,"[object Array]"===Object.prototype.toString.call(r))?e.match(t,n):t||e.none();var r},ce=function(t,e){let[n,r,o]=t;return e.document[n]&&e.document[n][r]&&(t[3]=t[3]||e.document[n][r].id,e.document[n][o-1]&&(t[4]=t[4]||e.document[n][o-1].id)),t},ue={splitOn:function(t,e){const{splitAll:n}=this.methods.one.pointer;let r=ae(t,this,e).fullPointer,o=n(this.fullPointer,r),i=[];return o.forEach((t=>{i.push(t.passthrough),i.push(t.before),i.push(t.match),i.push(t.after)})),i=i.filter((t=>t)),i=i.map((t=>ce(t,this))),this.update(i)},splitBefore:function(t,e){const{splitAll:n}=this.methods.one.pointer;let r=ae(t,this,e).fullPointer,o=n(this.fullPointer,r);for(let t=0;t{delete r[t]})),r};const _i={safe:!0,min:3};var Si={typeahead:function(t=[],e={}){let n=this.model();var r;e=Object.assign({},_i,e),r=t,"[object Object]"===Object.prototype.toString.call(r)&&(Object.assign(n.one.lexicon,t),t=Object.keys(t));let o=Pi(t,e,this.world());return Object.keys(o).forEach((t=>{n.one.typeahead.hasOwnProperty(t)?delete n.one.typeahead[t]:n.one.typeahead[t]=o[t]})),this}},zi={model:{one:{typeahead:{}}},api:ki,lib:Si,compute:Ei,hooks:["typeahead"]};return w.extend(tt),w.extend(er),w.extend(yn),w.extend(dr),w.extend(lo),w.plugin($t),w.extend(ji),w.extend(Vt),w.plugin(x),w.extend(Xt),w.extend(zi),w.extend(Wt),w.extend(kr),w},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).nlp=e();
+var t,e;t=this,e=function(){var t={methods:{one:{},two:{},three:{},four:{}},model:{one:{},two:{},three:{}},compute:{},hooks:[]};const e={compute:function(t){const{world:e}=this,n=e.compute;return"string"==typeof t&&n.hasOwnProperty(t)?n[t](this):(t=>"[object Array]"===Object.prototype.toString.call(t))(t)?t.forEach((r=>{e.compute.hasOwnProperty(r)?n[r](this):console.warn("no compute:",t)})):"function"==typeof t?t(this):console.warn("no compute:",t),this}};var n={forEach:function(t){return this.fullPointer.forEach(((e,n)=>{let r=this.update([e]);t(r,n)})),this},map:function(t,e){let n=this.fullPointer.map(((e,n)=>{let r=this.update([e]),o=t(r,n);return void 0===o?this.none():o}));if(0===n.length)return e||this.update([]);if(void 0!==n[0]){if("string"==typeof n[0])return n;if("object"==typeof n[0]&&(null===n[0]||!n[0].isView))return n}let r=[];return n.forEach((t=>{r=r.concat(t.fullPointer)})),this.toView(r)},filter:function(t){let e=this.fullPointer;return e=e.filter(((e,n)=>{let r=this.update([e]);return t(r,n)})),this.update(e)},find:function(t){let e=this.fullPointer.find(((e,n)=>{let r=this.update([e]);return t(r,n)}));return this.update([e])},some:function(t){return this.fullPointer.some(((e,n)=>{let r=this.update([e]);return t(r,n)}))},random:function(t=1){let e=this.fullPointer,n=Math.floor(Math.random()*e.length);return n+t>this.length&&(n=this.length-t,n=n<0?0:n),e=e.slice(n,n+t),this.update(e)}};const r={termList:function(){return this.methods.one.termList(this.docs)},terms:function(t){let e=this.match(".");return"number"==typeof t?e.eq(t):e},groups:function(t){if(t||0===t)return this.update(this._groups[t]||[]);let e={};return Object.keys(this._groups).forEach((t=>{e[t]=this.update(this._groups[t])})),e},eq:function(t){let e=this.pointer;return e||(e=this.docs.map(((t,e)=>[e]))),e[t]?this.update([e[t]]):this.none()},first:function(){return this.eq(0)},last:function(){let t=this.fullPointer.length-1;return this.eq(t)},firstTerms:function(){return this.match("^.")},lastTerms:function(){return this.match(".$")},slice:function(t,e){let n=this.pointer||this.docs.map(((t,e)=>[e]));return n=n.slice(t,e),this.update(n)},all:function(){return this.update().toView()},fullSentences:function(){let t=this.fullPointer.map((t=>[t[0]]));return this.update(t).toView()},none:function(){return this.update([])},isDoc:function(t){if(!t||!t.isView)return!1;let e=this.fullPointer,n=t.fullPointer;return!e.length!==n.length&&e.every(((t,e)=>!!n[e]&&t[0]===n[e][0]&&t[1]===n[e][1]&&t[2]===n[e][2]))},wordCount:function(){return this.docs.reduce(((t,e)=>(t+=e.filter((t=>""!==t.text)).length,t)),0)},isFull:function(){let t=this.pointer;if(!t)return!0;if(0===t.length||0!==t[0][0])return!1;let e=0,n=0;return this.document.forEach((t=>e+=t.length)),this.docs.forEach((t=>n+=t.length)),e===n},getNth:function(t){return"number"==typeof t?this.eq(t):"string"==typeof t?this.if(t):this}};r.group=r.groups,r.fullSentence=r.fullSentences,r.sentence=r.fullSentences,r.lastTerm=r.lastTerms,r.firstTerm=r.firstTerms;const o=Object.assign({},r,e,n);o.get=o.eq;class View{constructor(e,n,r={}){[["document",e],["world",t],["_groups",r],["_cache",null],["viewType","View"]].forEach((t=>{Object.defineProperty(this,t[0],{value:t[1],writable:!0})})),this.ptrs=n}get docs(){let e=this.document;return this.ptrs&&(e=t.methods.one.getDoc(this.ptrs,this.document)),e}get pointer(){return this.ptrs}get methods(){return this.world.methods}get model(){return this.world.model}get hooks(){return this.world.hooks}get isView(){return!0}get found(){return this.docs.length>0}get length(){return this.docs.length}get fullPointer(){let{docs:t,ptrs:e,document:n}=this,r=e||t.map(((t,e)=>[e]));return r.map((t=>{let[e,r,o,i,s]=t;return r=r||0,o=o||(n[e]||[]).length,n[e]&&n[e][r]&&(i=i||n[e][r].id,n[e][o-1]&&(s=s||n[e][o-1].id)),[e,r,o,i,s]}))}update(t){let e=new View(this.document,t);if(this._cache&&t&&t.length>0){let n=[];t.forEach(((t,e)=>{let[r,o,i]=t;(1===t.length||0===o&&this.document[r].length===i)&&(n[e]=this._cache[r])})),n.length>0&&(e._cache=n)}return e.world=this.world,e}toView(t){return new View(this.document,t||this.pointer)}fromText(t){const{methods:e}=this;let n=e.one.tokenize.fromString(t,this.world),r=new View(n);return r.world=this.world,r.compute(["normal","freeze","lexicon"]),this.world.compute.preTagger&&r.compute("preTagger"),r.compute("unfreeze"),r}clone(){let t=this.document.slice(0);t=t.map((t=>t.map((t=>((t=Object.assign({},t)).tags=new Set(t.tags),t)))));let e=this.update(this.pointer);return e.document=t,e._cache=this._cache,e}}Object.assign(View.prototype,o);const i=function(t){return t&&"object"==typeof t&&!Array.isArray(t)};function s(t,e){if(i(e))for(const n in e)i(e[n])?(t[n]||Object.assign(t,{[n]:{}}),s(t[n],e[n])):Object.assign(t,{[n]:e[n]});return t}const l=function(t,e,n,r){const{methods:o,model:i,compute:l,hooks:a}=e;t.methods&&function(t,e){for(const n in e)t[n]=t[n]||{},Object.assign(t[n],e[n])}(o,t.methods),t.model&&s(i,t.model),t.irregulars&&function(t,e){let n=t.two.models||{};Object.keys(e).forEach((t=>{e[t].pastTense&&(n.toPast&&(n.toPast.ex[t]=e[t].pastTense),n.fromPast&&(n.fromPast.ex[e[t].pastTense]=t)),e[t].presentTense&&(n.toPresent&&(n.toPresent.ex[t]=e[t].presentTense),n.fromPresent&&(n.fromPresent.ex[e[t].presentTense]=t)),e[t].gerund&&(n.toGerund&&(n.toGerund.ex[t]=e[t].gerund),n.fromGerund&&(n.fromGerund.ex[e[t].gerund]=t)),e[t].comparative&&(n.toComparative&&(n.toComparative.ex[t]=e[t].comparative),n.fromComparative&&(n.fromComparative.ex[e[t].comparative]=t)),e[t].superlative&&(n.toSuperlative&&(n.toSuperlative.ex[t]=e[t].superlative),n.fromSuperlative&&(n.fromSuperlative.ex[e[t].superlative]=t))}))}(i,t.irregulars),t.compute&&Object.assign(l,t.compute),a&&(e.hooks=a.concat(t.hooks||[])),t.api&&t.api(n),t.lib&&Object.keys(t.lib).forEach((e=>r[e]=t.lib[e])),t.tags&&r.addTags(t.tags),t.words&&r.addWords(t.words),t.frozen&&r.addWords(t.frozen,!0),t.mutate&&t.mutate(e,r)},a=function(t){return"[object Array]"===Object.prototype.toString.call(t)},u=function(t,e,n){const{methods:r}=n;let o=new e([]);if(o.world=n,"number"==typeof t&&(t=String(t)),!t)return o;if("string"==typeof t)return new e(r.one.tokenize.fromString(t,n));if(i=t,"[object Object]"===Object.prototype.toString.call(i)&&t.isView)return new e(t.document,t.ptrs);var i;if(a(t)){if(a(t[0])){let n=t.map((t=>t.map((t=>({text:t,normal:t,pre:"",post:" ",tags:new Set})))));return new e(n)}let n=t.map((t=>t.terms.map((t=>(a(t.tags)&&(t.tags=new Set(t.tags)),t)))));return new e(n)}return o};let c=Object.assign({},t);const h=function(t,e){e&&h.addWords(e);let n=u(t,View,c);return t&&n.compute(c.hooks),n};Object.defineProperty(h,"_world",{value:c,writable:!0}),h.tokenize=function(t,e){const{compute:n}=this._world;e&&h.addWords(e);let r=u(t,View,c);return n.contractions&&r.compute(["alias","normal","machine","contractions"]),r},h.plugin=function(t){return l(t,this._world,View,this),this},h.extend=h.plugin,h.world=function(){return this._world},h.model=function(){return this._world.model},h.methods=function(){return this._world.methods},h.hooks=function(){return this._world.hooks},h.verbose=function(t){const e="undefined"!=typeof process&&process.env?process.env:self.env||{};return e.DEBUG_TAGS="tagger"===t||!0===t||"",e.DEBUG_MATCH="match"===t||!0===t||"",e.DEBUG_CHUNKS="chunker"===t||!0===t||"",this},h.version="14.14.0";var f={one:{cacheDoc:function(t){let e=t.map((t=>{let e=new Set;return t.forEach((t=>{""!==t.normal&&e.add(t.normal),t.switch&&e.add(`%${t.switch}%`),t.implicit&&e.add(t.implicit),t.machine&&e.add(t.machine),t.root&&e.add(t.root),t.alias&&t.alias.forEach((t=>e.add(t)));let n=Array.from(t.tags);for(let t=0;t{let n=e(t);t.replaceWith(n)})),t}(r,t);let o=r.docs[0],i=e.possessives&&o[o.length-1].tags.has("Possessive");t=function(t,e){if("string"!=typeof t)return t;let n=e.groups();return t=t.replace(S,(t=>{let e=t.replace(/\$/,"");return n.hasOwnProperty(e)?n[e].text():t})),t}(t,r);let s=this.update(n);n=n.map((t=>t.slice(0,3)));let l=(s.docs[0]||[]).map((t=>Array.from(t.tags)));if("string"==typeof t&&(t=this.fromText(t).compute("id")),r.insertAfter(t),s.has("@hasContraction")&&r.contractions&&r.grow("@hasContraction+").contractions().expand(),r.delete(s),i){let t=r.docs[0],e=t[t.length-1];e.tags.has("Possessive")||(e.text+="'s",e.normal+="'s",e.tags.add("Possessive"))}let a=r.toView(n).compute(["index","freeze","lexicon"]);return a.world.compute.preTagger&&a.compute("preTagger"),a.compute("unfreeze"),e.tags&&a.terms().forEach(((t,e)=>{t.tagSafe(l[e])})),e.case&&a.docs[0]&&a.docs[0][0]&&0===a.docs[0][0].index[1]&&(a.docs[0][0].text=a.docs[0][0].text.replace(/\w\S*/g,(t=>t.charAt(0).toUpperCase()+t.substring(1).toLowerCase()))),a},replace:function(t,e,n){if(t&&!e)return this.replaceWith(t,n);let r=this.match(t);return r.found?(this.soften(),r.replaceWith(e,n)):this}},A={remove:function(t){const{indexN:e}=this.methods.one.pointer;this.uncache();let n=this.all(),r=this;t&&(n=this,r=this.match(t));let o=!n.ptrs;r.has("@hasContraction")&&r.contractions&&r.grow("@hasContraction").contractions().expand();let i=n.fullPointer,s=r.fullPointer.reverse(),l=function(t,e){e.forEach((e=>{let[n,r,o]=e,i=o-r;t[n]&&(o===t[n].length&&o>1&&function(t,e){let n=t.length-1,r=t[n],o=t[n-e];o&&r&&(o.post+=r.post,o.post=o.post.replace(/ +([.?!,;:])/,"$1"),o.post=o.post.replace(/[,;:]+([.?!])/,"$1"))}(t[n],i),t[n].splice(r,i))}));for(let e=t.length-1;e>=0;e-=1)if(0===t[e].length&&(t.splice(e,1),e===t.length&&t[e-1])){let n=t[e-1],r=n[n.length-1];r&&(r.post=r.post.trimEnd())}return t}(this.document,s);return i=function(t,e){return t=t.map((t=>{let[n]=t;return e[n]?(e[n].forEach((e=>{let n=e[2]-e[1];t[1]<=e[1]&&t[2]>=e[2]&&(t[2]-=n)})),t):t})),t.forEach(((e,n)=>{if(0===e[1]&&0==e[2])for(let e=n+1;e{let i=n.before(t,e);if(i.found){let t=i.terms();r[o][1]-=t.length,r[o][3]=t.docs[0][0].id}})),this.update(r)},growRight:function(t,e,n){"string"==typeof t&&(t=this.world.methods.one.parseMatch(t,n,this.world)),t[0].start=!0;let r=this.fullPointer;return this.forEach(((n,o)=>{let i=n.after(t,e);if(i.found){let t=i.terms();r[o][2]+=t.length,r[o][4]=null}})),this.update(r)},grow:function(t,e,n){return this.growRight(t,e,n).growLeft(t,e,n)}};const It=function(t,e){return[t[0],t[1],e[2]]},Rt=(t,e,n)=>{return"string"==typeof t||(r=t,"[object Array]"===Object.prototype.toString.call(r))?e.match(t,n):t||e.none();var r},Qt=function(t,e){let[n,r,o]=t;return e.document[n]&&e.document[n][r]&&(t[3]=t[3]||e.document[n][r].id,e.document[n][o-1]&&(t[4]=t[4]||e.document[n][o-1].id)),t},Ht={splitOn:function(t,e){const{splitAll:n}=this.methods.one.pointer;let r=Rt(t,this,e).fullPointer,o=n(this.fullPointer,r),i=[];return o.forEach((t=>{i.push(t.passthrough),i.push(t.before),i.push(t.match),i.push(t.after)})),i=i.filter((t=>t)),i=i.map((t=>Qt(t,this))),this.update(i)},splitBefore:function(t,e){const{splitAll:n}=this.methods.one.pointer;let r=Rt(t,this,e).fullPointer,o=n(this.fullPointer,r);for(let t=0;t{delete r[t]})),r}(t,e,this.world());return Object.keys(o).forEach((t=>{n.one.typeahead.hasOwnProperty(t)?delete n.one.typeahead[t]:n.one.typeahead[t]=o[t]})),this}},so={model:{one:{typeahead:{}}},api:function(t){t.prototype.autoFill=ro},lib:io,compute:no,hooks:["typeahead"]};return h.extend(M),h.extend(wn),h.extend(Me),h.extend(_n),h.extend(ir),h.plugin(wt),h.extend(eo),h.extend(jt),h.plugin(d),h.extend(Vt),h.extend(so),h.extend(At),h.extend($n),h},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).nlp=e();
diff --git a/builds/one/compromise-one.mjs b/builds/one/compromise-one.mjs
index 73383731b..2d480c8a2 100644
--- a/builds/one/compromise-one.mjs
+++ b/builds/one/compromise-one.mjs
@@ -1 +1 @@
-var t={methods:{one:{},two:{},three:{},four:{}},model:{one:{},two:{},three:{}},compute:{},hooks:[]};const e={compute:function(t){const{world:e}=this,n=e.compute;return"string"==typeof t&&n.hasOwnProperty(t)?n[t](this):(t=>"[object Array]"===Object.prototype.toString.call(t))(t)?t.forEach((r=>{e.compute.hasOwnProperty(r)?n[r](this):console.warn("no compute:",t)})):"function"==typeof t?t(this):console.warn("no compute:",t),this}};var n=e;var r={forEach:function(t){return this.fullPointer.forEach(((e,n)=>{let r=this.update([e]);t(r,n)})),this},map:function(t,e){let n=this.fullPointer.map(((e,n)=>{let r=this.update([e]),o=t(r,n);return void 0===o?this.none():o}));if(0===n.length)return e||this.update([]);if(void 0!==n[0]){if("string"==typeof n[0])return n;if("object"==typeof n[0]&&(null===n[0]||!n[0].isView))return n}let r=[];return n.forEach((t=>{r=r.concat(t.fullPointer)})),this.toView(r)},filter:function(t){let e=this.fullPointer;return e=e.filter(((e,n)=>{let r=this.update([e]);return t(r,n)})),this.update(e)},find:function(t){let e=this.fullPointer.find(((e,n)=>{let r=this.update([e]);return t(r,n)}));return this.update([e])},some:function(t){return this.fullPointer.some(((e,n)=>{let r=this.update([e]);return t(r,n)}))},random:function(t=1){let e=this.fullPointer,n=Math.floor(Math.random()*e.length);return n+t>this.length&&(n=this.length-t,n=n<0?0:n),e=e.slice(n,n+t),this.update(e)}};const o={termList:function(){return this.methods.one.termList(this.docs)},terms:function(t){let e=this.match(".");return"number"==typeof t?e.eq(t):e},groups:function(t){if(t||0===t)return this.update(this._groups[t]||[]);let e={};return Object.keys(this._groups).forEach((t=>{e[t]=this.update(this._groups[t])})),e},eq:function(t){let e=this.pointer;return e||(e=this.docs.map(((t,e)=>[e]))),e[t]?this.update([e[t]]):this.none()},first:function(){return this.eq(0)},last:function(){let t=this.fullPointer.length-1;return this.eq(t)},firstTerms:function(){return this.match("^.")},lastTerms:function(){return this.match(".$")},slice:function(t,e){let n=this.pointer||this.docs.map(((t,e)=>[e]));return n=n.slice(t,e),this.update(n)},all:function(){return this.update().toView()},fullSentences:function(){let t=this.fullPointer.map((t=>[t[0]]));return this.update(t).toView()},none:function(){return this.update([])},isDoc:function(t){if(!t||!t.isView)return!1;let e=this.fullPointer,n=t.fullPointer;return!e.length!==n.length&&e.every(((t,e)=>!!n[e]&&(t[0]===n[e][0]&&t[1]===n[e][1]&&t[2]===n[e][2])))},wordCount:function(){return this.docs.reduce(((t,e)=>(t+=e.filter((t=>""!==t.text)).length,t)),0)},isFull:function(){let t=this.pointer;if(!t)return!0;if(0===t.length||0!==t[0][0])return!1;let e=0,n=0;return this.document.forEach((t=>e+=t.length)),this.docs.forEach((t=>n+=t.length)),e===n},getNth:function(t){return"number"==typeof t?this.eq(t):"string"==typeof t?this.if(t):this}};o.group=o.groups,o.fullSentence=o.fullSentences,o.sentence=o.fullSentences,o.lastTerm=o.lastTerms,o.firstTerm=o.firstTerms;var i=o;const s=Object.assign({},i,n,r);s.get=s.eq;var l=s;class View{constructor(e,n,r={}){[["document",e],["world",t],["_groups",r],["_cache",null],["viewType","View"]].forEach((t=>{Object.defineProperty(this,t[0],{value:t[1],writable:!0})})),this.ptrs=n}get docs(){let e=this.document;return this.ptrs&&(e=t.methods.one.getDoc(this.ptrs,this.document)),e}get pointer(){return this.ptrs}get methods(){return this.world.methods}get model(){return this.world.model}get hooks(){return this.world.hooks}get isView(){return!0}get found(){return this.docs.length>0}get length(){return this.docs.length}get fullPointer(){let{docs:t,ptrs:e,document:n}=this,r=e||t.map(((t,e)=>[e]));return r.map((t=>{let[e,r,o,i,s]=t;return r=r||0,o=o||(n[e]||[]).length,n[e]&&n[e][r]&&(i=i||n[e][r].id,n[e][o-1]&&(s=s||n[e][o-1].id)),[e,r,o,i,s]}))}update(t){let e=new View(this.document,t);if(this._cache&&t&&t.length>0){let n=[];t.forEach(((t,e)=>{let[r,o,i]=t;(1===t.length||0===o&&this.document[r].length===i)&&(n[e]=this._cache[r])})),n.length>0&&(e._cache=n)}return e.world=this.world,e}toView(t){return new View(this.document,t||this.pointer)}fromText(t){const{methods:e}=this;let n=e.one.tokenize.fromString(t,this.world),r=new View(n);return r.world=this.world,r.compute(["normal","freeze","lexicon"]),this.world.compute.preTagger&&r.compute("preTagger"),r.compute("unfreeze"),r}clone(){let t=this.document.slice(0);t=t.map((t=>t.map((t=>((t=Object.assign({},t)).tags=new Set(t.tags),t)))));let e=this.update(this.pointer);return e.document=t,e._cache=this._cache,e}}Object.assign(View.prototype,l);var a=View;const c=function(t){return t&&"object"==typeof t&&!Array.isArray(t)};function u(t,e){if(c(e))for(const n in e)c(e[n])?(t[n]||Object.assign(t,{[n]:{}}),u(t[n],e[n])):Object.assign(t,{[n]:e[n]});return t}var h=function(t,e,n,r){const{methods:o,model:i,compute:s,hooks:l}=e;t.methods&&function(t,e){for(const n in e)t[n]=t[n]||{},Object.assign(t[n],e[n])}(o,t.methods),t.model&&u(i,t.model),t.irregulars&&function(t,e){let n=t.two.models||{};Object.keys(e).forEach((t=>{e[t].pastTense&&(n.toPast&&(n.toPast.ex[t]=e[t].pastTense),n.fromPast&&(n.fromPast.ex[e[t].pastTense]=t)),e[t].presentTense&&(n.toPresent&&(n.toPresent.ex[t]=e[t].presentTense),n.fromPresent&&(n.fromPresent.ex[e[t].presentTense]=t)),e[t].gerund&&(n.toGerund&&(n.toGerund.ex[t]=e[t].gerund),n.fromGerund&&(n.fromGerund.ex[e[t].gerund]=t)),e[t].comparative&&(n.toComparative&&(n.toComparative.ex[t]=e[t].comparative),n.fromComparative&&(n.fromComparative.ex[e[t].comparative]=t)),e[t].superlative&&(n.toSuperlative&&(n.toSuperlative.ex[t]=e[t].superlative),n.fromSuperlative&&(n.fromSuperlative.ex[e[t].superlative]=t))}))}(i,t.irregulars),t.compute&&Object.assign(s,t.compute),l&&(e.hooks=l.concat(t.hooks||[])),t.api&&t.api(n),t.lib&&Object.keys(t.lib).forEach((e=>r[e]=t.lib[e])),t.tags&&r.addTags(t.tags),t.words&&r.addWords(t.words),t.frozen&&r.addWords(t.frozen,!0),t.mutate&&t.mutate(e)};const f=function(t){return"[object Array]"===Object.prototype.toString.call(t)};var p=function(t,e,n){const{methods:r}=n;let o=new e([]);if(o.world=n,"number"==typeof t&&(t=String(t)),!t)return o;if("string"==typeof t){return new e(r.one.tokenize.fromString(t,n))}if(i=t,"[object Object]"===Object.prototype.toString.call(i)&&t.isView)return new e(t.document,t.ptrs);var i;if(f(t)){if(f(t[0])){let n=t.map((t=>t.map((t=>({text:t,normal:t,pre:"",post:" ",tags:new Set})))));return new e(n)}let n=function(t){return t.map((t=>t.terms.map((t=>(f(t.tags)&&(t.tags=new Set(t.tags)),t)))))}(t);return new e(n)}return o};let d=Object.assign({},t);const m=function(t,e){e&&m.addWords(e);let n=p(t,a,d);return t&&n.compute(d.hooks),n};Object.defineProperty(m,"_world",{value:d,writable:!0}),m.tokenize=function(t,e){const{compute:n}=this._world;e&&m.addWords(e);let r=p(t,a,d);return n.contractions&&r.compute(["alias","normal","machine","contractions"]),r},m.plugin=function(t){return h(t,this._world,a,this),this},m.extend=m.plugin,m.world=function(){return this._world},m.model=function(){return this._world.model},m.methods=function(){return this._world.methods},m.hooks=function(){return this._world.hooks},m.verbose=function(t){const e="undefined"!=typeof process&&process.env?process.env:self.env||{};return e.DEBUG_TAGS="tagger"===t||!0===t||"",e.DEBUG_MATCH="match"===t||!0===t||"",e.DEBUG_CHUNKS="chunker"===t||!0===t||"",this},m.version="14.13.0";var w=m;var v=function(t){let e=t.map((t=>{let e=new Set;return t.forEach((t=>{""!==t.normal&&e.add(t.normal),t.switch&&e.add(`%${t.switch}%`),t.implicit&&e.add(t.implicit),t.machine&&e.add(t.machine),t.root&&e.add(t.root),t.alias&&t.alias.forEach((t=>e.add(t)));let n=Array.from(t.tags);for(let t=0;t{let n=e(t);t.replaceWith(n)})),t}(r,t);let o=r.docs[0],i=e.possessives&&o[o.length-1].tags.has("Possessive");t=function(t,e){if("string"!=typeof t)return t;let n=e.groups();return t=t.replace(L,(t=>{let e=t.replace(/\$/,"");return n.hasOwnProperty(e)?n[e].text():t})),t}(t,r);let s=this.update(n);n=n.map((t=>t.slice(0,3)));let l=(s.docs[0]||[]).map((t=>Array.from(t.tags)));if("string"==typeof t&&(t=this.fromText(t).compute("id")),r.insertAfter(t),s.has("@hasContraction")&&r.contractions){r.grow("@hasContraction+").contractions().expand()}if(r.delete(s),i){let t=r.docs[0],e=t[t.length-1];e.tags.has("Possessive")||(e.text+="'s",e.normal+="'s",e.tags.add("Possessive"))}let a=r.toView(n).compute(["index","freeze","lexicon"]);return a.world.compute.preTagger&&a.compute("preTagger"),a.compute("unfreeze"),e.tags&&a.terms().forEach(((t,e)=>{t.tagSafe(l[e])})),e.case&&a.docs[0]&&a.docs[0][0]&&0===a.docs[0][0].index[1]&&(a.docs[0][0].text=a.docs[0][0].text.replace(/\w\S*/g,(t=>t.charAt(0).toUpperCase()+t.substring(1).toLowerCase()))),a},V.replace=function(t,e,n){if(t&&!e)return this.replaceWith(t,n);let r=this.match(t);return r.found?(this.soften(),r.replaceWith(e,n)):this};var F=V;var q=function(t,e){e.forEach((e=>{let[n,r,o]=e,i=o-r;t[n]&&(o===t[n].length&&o>1&&function(t,e){let n=t.length-1,r=t[n],o=t[n-e];o&&r&&(o.post+=r.post,o.post=o.post.replace(/ +([.?!,;:])/,"$1"),o.post=o.post.replace(/[,;:]+([.?!])/,"$1"))}(t[n],i),t[n].splice(r,i))}));for(let e=t.length-1;e>=0;e-=1)if(0===t[e].length&&(t.splice(e,1),e===t.length&&t[e-1])){let n=t[e-1],r=n[n.length-1];r&&(r.post=r.post.trimEnd())}return t};const G={remove:function(t){const{indexN:e}=this.methods.one.pointer;this.uncache();let n=this.all(),r=this;t&&(n=this,r=this.match(t));let o=!n.ptrs;if(r.has("@hasContraction")&&r.contractions){r.grow("@hasContraction").contractions().expand()}let i=n.fullPointer,s=r.fullPointer.reverse(),l=q(this.document,s);return i=function(t,e){return t=t.map((t=>{let[n]=t;return e[n]?(e[n].forEach((e=>{let n=e[2]-e[1];t[1]<=e[1]&&t[2]>=e[2]&&(t[2]-=n)})),t):t})),t.forEach(((e,n)=>{if(0===e[1]&&0==e[2])for(let e=n+1;e{let i=n.before(t,e);if(i.found){let t=i.terms();r[o][1]-=t.length,r[o][3]=t.docs[0][0].id}})),this.update(r)},growRight:function(t,e,n){"string"==typeof t&&(t=this.world.methods.one.parseMatch(t,n,this.world)),t[0].start=!0;let r=this.fullPointer;return this.forEach(((n,o)=>{let i=n.after(t,e);if(i.found){let t=i.terms();r[o][2]+=t.length,r[o][4]=null}})),this.update(r)},grow:function(t,e,n){return this.growRight(t,e,n).growLeft(t,e,n)}};const le=function(t,e){return[t[0],t[1],e[2]]},ae=(t,e,n)=>{return"string"==typeof t||(r=t,"[object Array]"===Object.prototype.toString.call(r))?e.match(t,n):t||e.none();var r},ce=function(t,e){let[n,r,o]=t;return e.document[n]&&e.document[n][r]&&(t[3]=t[3]||e.document[n][r].id,e.document[n][o-1]&&(t[4]=t[4]||e.document[n][o-1].id)),t},ue={splitOn:function(t,e){const{splitAll:n}=this.methods.one.pointer;let r=ae(t,this,e).fullPointer,o=n(this.fullPointer,r),i=[];return o.forEach((t=>{i.push(t.passthrough),i.push(t.before),i.push(t.match),i.push(t.after)})),i=i.filter((t=>t)),i=i.map((t=>ce(t,this))),this.update(i)},splitBefore:function(t,e){const{splitAll:n}=this.methods.one.pointer;let r=ae(t,this,e).fullPointer,o=n(this.fullPointer,r);for(let t=0;t{delete r[t]})),r};const _i={safe:!0,min:3};var Si={typeahead:function(t=[],e={}){let n=this.model();var r;e=Object.assign({},_i,e),r=t,"[object Object]"===Object.prototype.toString.call(r)&&(Object.assign(n.one.lexicon,t),t=Object.keys(t));let o=Pi(t,e,this.world());return Object.keys(o).forEach((t=>{n.one.typeahead.hasOwnProperty(t)?delete n.one.typeahead[t]:n.one.typeahead[t]=o[t]})),this}};var zi={model:{one:{typeahead:{}}},api:ki,lib:Si,compute:Ei,hooks:["typeahead"]};w.extend(tt),w.extend(er),w.extend(bn),w.extend(dr),w.extend(lo),w.plugin($t),w.extend(ji),w.extend(Vt),w.plugin(x),w.extend(Xt),w.extend(zi),w.extend(Wt),w.extend(kr);export{w as default};
+var t={methods:{one:{},two:{},three:{},four:{}},model:{one:{},two:{},three:{}},compute:{},hooks:[]};const e={compute:function(t){const{world:e}=this,n=e.compute;return"string"==typeof t&&n.hasOwnProperty(t)?n[t](this):(t=>"[object Array]"===Object.prototype.toString.call(t))(t)?t.forEach((r=>{e.compute.hasOwnProperty(r)?n[r](this):console.warn("no compute:",t)})):"function"==typeof t?t(this):console.warn("no compute:",t),this}};var n={forEach:function(t){return this.fullPointer.forEach(((e,n)=>{let r=this.update([e]);t(r,n)})),this},map:function(t,e){let n=this.fullPointer.map(((e,n)=>{let r=this.update([e]),o=t(r,n);return void 0===o?this.none():o}));if(0===n.length)return e||this.update([]);if(void 0!==n[0]){if("string"==typeof n[0])return n;if("object"==typeof n[0]&&(null===n[0]||!n[0].isView))return n}let r=[];return n.forEach((t=>{r=r.concat(t.fullPointer)})),this.toView(r)},filter:function(t){let e=this.fullPointer;return e=e.filter(((e,n)=>{let r=this.update([e]);return t(r,n)})),this.update(e)},find:function(t){let e=this.fullPointer.find(((e,n)=>{let r=this.update([e]);return t(r,n)}));return this.update([e])},some:function(t){return this.fullPointer.some(((e,n)=>{let r=this.update([e]);return t(r,n)}))},random:function(t=1){let e=this.fullPointer,n=Math.floor(Math.random()*e.length);return n+t>this.length&&(n=this.length-t,n=n<0?0:n),e=e.slice(n,n+t),this.update(e)}};const r={termList:function(){return this.methods.one.termList(this.docs)},terms:function(t){let e=this.match(".");return"number"==typeof t?e.eq(t):e},groups:function(t){if(t||0===t)return this.update(this._groups[t]||[]);let e={};return Object.keys(this._groups).forEach((t=>{e[t]=this.update(this._groups[t])})),e},eq:function(t){let e=this.pointer;return e||(e=this.docs.map(((t,e)=>[e]))),e[t]?this.update([e[t]]):this.none()},first:function(){return this.eq(0)},last:function(){let t=this.fullPointer.length-1;return this.eq(t)},firstTerms:function(){return this.match("^.")},lastTerms:function(){return this.match(".$")},slice:function(t,e){let n=this.pointer||this.docs.map(((t,e)=>[e]));return n=n.slice(t,e),this.update(n)},all:function(){return this.update().toView()},fullSentences:function(){let t=this.fullPointer.map((t=>[t[0]]));return this.update(t).toView()},none:function(){return this.update([])},isDoc:function(t){if(!t||!t.isView)return!1;let e=this.fullPointer,n=t.fullPointer;return!e.length!==n.length&&e.every(((t,e)=>!!n[e]&&(t[0]===n[e][0]&&t[1]===n[e][1]&&t[2]===n[e][2])))},wordCount:function(){return this.docs.reduce(((t,e)=>(t+=e.filter((t=>""!==t.text)).length,t)),0)},isFull:function(){let t=this.pointer;if(!t)return!0;if(0===t.length||0!==t[0][0])return!1;let e=0,n=0;return this.document.forEach((t=>e+=t.length)),this.docs.forEach((t=>n+=t.length)),e===n},getNth:function(t){return"number"==typeof t?this.eq(t):"string"==typeof t?this.if(t):this}};r.group=r.groups,r.fullSentence=r.fullSentences,r.sentence=r.fullSentences,r.lastTerm=r.lastTerms,r.firstTerm=r.firstTerms;const o=Object.assign({},r,e,n);o.get=o.eq;class View{constructor(e,n,r={}){[["document",e],["world",t],["_groups",r],["_cache",null],["viewType","View"]].forEach((t=>{Object.defineProperty(this,t[0],{value:t[1],writable:!0})})),this.ptrs=n}get docs(){let e=this.document;return this.ptrs&&(e=t.methods.one.getDoc(this.ptrs,this.document)),e}get pointer(){return this.ptrs}get methods(){return this.world.methods}get model(){return this.world.model}get hooks(){return this.world.hooks}get isView(){return!0}get found(){return this.docs.length>0}get length(){return this.docs.length}get fullPointer(){let{docs:t,ptrs:e,document:n}=this,r=e||t.map(((t,e)=>[e]));return r.map((t=>{let[e,r,o,i,s]=t;return r=r||0,o=o||(n[e]||[]).length,n[e]&&n[e][r]&&(i=i||n[e][r].id,n[e][o-1]&&(s=s||n[e][o-1].id)),[e,r,o,i,s]}))}update(t){let e=new View(this.document,t);if(this._cache&&t&&t.length>0){let n=[];t.forEach(((t,e)=>{let[r,o,i]=t;(1===t.length||0===o&&this.document[r].length===i)&&(n[e]=this._cache[r])})),n.length>0&&(e._cache=n)}return e.world=this.world,e}toView(t){return new View(this.document,t||this.pointer)}fromText(t){const{methods:e}=this;let n=e.one.tokenize.fromString(t,this.world),r=new View(n);return r.world=this.world,r.compute(["normal","freeze","lexicon"]),this.world.compute.preTagger&&r.compute("preTagger"),r.compute("unfreeze"),r}clone(){let t=this.document.slice(0);t=t.map((t=>t.map((t=>((t=Object.assign({},t)).tags=new Set(t.tags),t)))));let e=this.update(this.pointer);return e.document=t,e._cache=this._cache,e}}Object.assign(View.prototype,o);const i=function(t){return t&&"object"==typeof t&&!Array.isArray(t)};function s(t,e){if(i(e))for(const n in e)i(e[n])?(t[n]||Object.assign(t,{[n]:{}}),s(t[n],e[n])):Object.assign(t,{[n]:e[n]});return t}const l=function(t,e,n,r){const{methods:o,model:i,compute:l,hooks:a}=e;t.methods&&function(t,e){for(const n in e)t[n]=t[n]||{},Object.assign(t[n],e[n])}(o,t.methods),t.model&&s(i,t.model),t.irregulars&&function(t,e){let n=t.two.models||{};Object.keys(e).forEach((t=>{e[t].pastTense&&(n.toPast&&(n.toPast.ex[t]=e[t].pastTense),n.fromPast&&(n.fromPast.ex[e[t].pastTense]=t)),e[t].presentTense&&(n.toPresent&&(n.toPresent.ex[t]=e[t].presentTense),n.fromPresent&&(n.fromPresent.ex[e[t].presentTense]=t)),e[t].gerund&&(n.toGerund&&(n.toGerund.ex[t]=e[t].gerund),n.fromGerund&&(n.fromGerund.ex[e[t].gerund]=t)),e[t].comparative&&(n.toComparative&&(n.toComparative.ex[t]=e[t].comparative),n.fromComparative&&(n.fromComparative.ex[e[t].comparative]=t)),e[t].superlative&&(n.toSuperlative&&(n.toSuperlative.ex[t]=e[t].superlative),n.fromSuperlative&&(n.fromSuperlative.ex[e[t].superlative]=t))}))}(i,t.irregulars),t.compute&&Object.assign(l,t.compute),a&&(e.hooks=a.concat(t.hooks||[])),t.api&&t.api(n),t.lib&&Object.keys(t.lib).forEach((e=>r[e]=t.lib[e])),t.tags&&r.addTags(t.tags),t.words&&r.addWords(t.words),t.frozen&&r.addWords(t.frozen,!0),t.mutate&&t.mutate(e,r)},a=function(t){return"[object Array]"===Object.prototype.toString.call(t)},u=function(t,e,n){const{methods:r}=n;let o=new e([]);if(o.world=n,"number"==typeof t&&(t=String(t)),!t)return o;if("string"==typeof t){return new e(r.one.tokenize.fromString(t,n))}if(i=t,"[object Object]"===Object.prototype.toString.call(i)&&t.isView)return new e(t.document,t.ptrs);var i;if(a(t)){if(a(t[0])){let n=t.map((t=>t.map((t=>({text:t,normal:t,pre:"",post:" ",tags:new Set})))));return new e(n)}let n=t.map((t=>t.terms.map((t=>(a(t.tags)&&(t.tags=new Set(t.tags)),t)))));return new e(n)}return o};let c=Object.assign({},t);const h=function(t,e){e&&h.addWords(e);let n=u(t,View,c);return t&&n.compute(c.hooks),n};Object.defineProperty(h,"_world",{value:c,writable:!0}),h.tokenize=function(t,e){const{compute:n}=this._world;e&&h.addWords(e);let r=u(t,View,c);return n.contractions&&r.compute(["alias","normal","machine","contractions"]),r},h.plugin=function(t){return l(t,this._world,View,this),this},h.extend=h.plugin,h.world=function(){return this._world},h.model=function(){return this._world.model},h.methods=function(){return this._world.methods},h.hooks=function(){return this._world.hooks},h.verbose=function(t){const e="undefined"!=typeof process&&process.env?process.env:self.env||{};return e.DEBUG_TAGS="tagger"===t||!0===t||"",e.DEBUG_MATCH="match"===t||!0===t||"",e.DEBUG_CHUNKS="chunker"===t||!0===t||"",this},h.version="14.14.0";var f={one:{cacheDoc:function(t){let e=t.map((t=>{let e=new Set;return t.forEach((t=>{""!==t.normal&&e.add(t.normal),t.switch&&e.add(`%${t.switch}%`),t.implicit&&e.add(t.implicit),t.machine&&e.add(t.machine),t.root&&e.add(t.root),t.alias&&t.alias.forEach((t=>e.add(t)));let n=Array.from(t.tags);for(let t=0;t{let n=e(t);t.replaceWith(n)})),t}(r,t);let o=r.docs[0],i=e.possessives&&o[o.length-1].tags.has("Possessive");t=function(t,e){if("string"!=typeof t)return t;let n=e.groups();return t=t.replace(S,(t=>{let e=t.replace(/\$/,"");return n.hasOwnProperty(e)?n[e].text():t})),t}(t,r);let s=this.update(n);n=n.map((t=>t.slice(0,3)));let l=(s.docs[0]||[]).map((t=>Array.from(t.tags)));if("string"==typeof t&&(t=this.fromText(t).compute("id")),r.insertAfter(t),s.has("@hasContraction")&&r.contractions){r.grow("@hasContraction+").contractions().expand()}if(r.delete(s),i){let t=r.docs[0],e=t[t.length-1];e.tags.has("Possessive")||(e.text+="'s",e.normal+="'s",e.tags.add("Possessive"))}let a=r.toView(n).compute(["index","freeze","lexicon"]);return a.world.compute.preTagger&&a.compute("preTagger"),a.compute("unfreeze"),e.tags&&a.terms().forEach(((t,e)=>{t.tagSafe(l[e])})),e.case&&a.docs[0]&&a.docs[0][0]&&0===a.docs[0][0].index[1]&&(a.docs[0][0].text=a.docs[0][0].text.replace(/\w\S*/g,(t=>t.charAt(0).toUpperCase()+t.substring(1).toLowerCase()))),a},z.replace=function(t,e,n){if(t&&!e)return this.replaceWith(t,n);let r=this.match(t);return r.found?(this.soften(),r.replaceWith(e,n)):this};const A={remove:function(t){const{indexN:e}=this.methods.one.pointer;this.uncache();let n=this.all(),r=this;t&&(n=this,r=this.match(t));let o=!n.ptrs;if(r.has("@hasContraction")&&r.contractions){r.grow("@hasContraction").contractions().expand()}let i=n.fullPointer,s=r.fullPointer.reverse(),l=function(t,e){e.forEach((e=>{let[n,r,o]=e,i=o-r;t[n]&&(o===t[n].length&&o>1&&function(t,e){let n=t.length-1,r=t[n],o=t[n-e];o&&r&&(o.post+=r.post,o.post=o.post.replace(/ +([.?!,;:])/,"$1"),o.post=o.post.replace(/[,;:]+([.?!])/,"$1"))}(t[n],i),t[n].splice(r,i))}));for(let e=t.length-1;e>=0;e-=1)if(0===t[e].length&&(t.splice(e,1),e===t.length&&t[e-1])){let n=t[e-1],r=n[n.length-1];r&&(r.post=r.post.trimEnd())}return t}(this.document,s);return i=function(t,e){return t=t.map((t=>{let[n]=t;return e[n]?(e[n].forEach((e=>{let n=e[2]-e[1];t[1]<=e[1]&&t[2]>=e[2]&&(t[2]-=n)})),t):t})),t.forEach(((e,n)=>{if(0===e[1]&&0==e[2])for(let e=n+1;e{let i=n.before(t,e);if(i.found){let t=i.terms();r[o][1]-=t.length,r[o][3]=t.docs[0][0].id}})),this.update(r)},growRight:function(t,e,n){"string"==typeof t&&(t=this.world.methods.one.parseMatch(t,n,this.world)),t[0].start=!0;let r=this.fullPointer;return this.forEach(((n,o)=>{let i=n.after(t,e);if(i.found){let t=i.terms();r[o][2]+=t.length,r[o][4]=null}})),this.update(r)},grow:function(t,e,n){return this.growRight(t,e,n).growLeft(t,e,n)}};const It=function(t,e){return[t[0],t[1],e[2]]},Rt=(t,e,n)=>{return"string"==typeof t||(r=t,"[object Array]"===Object.prototype.toString.call(r))?e.match(t,n):t||e.none();var r},Qt=function(t,e){let[n,r,o]=t;return e.document[n]&&e.document[n][r]&&(t[3]=t[3]||e.document[n][r].id,e.document[n][o-1]&&(t[4]=t[4]||e.document[n][o-1].id)),t},Ht={splitOn:function(t,e){const{splitAll:n}=this.methods.one.pointer;let r=Rt(t,this,e).fullPointer,o=n(this.fullPointer,r),i=[];return o.forEach((t=>{i.push(t.passthrough),i.push(t.before),i.push(t.match),i.push(t.after)})),i=i.filter((t=>t)),i=i.map((t=>Qt(t,this))),this.update(i)},splitBefore:function(t,e){const{splitAll:n}=this.methods.one.pointer;let r=Rt(t,this,e).fullPointer,o=n(this.fullPointer,r);for(let t=0;t{delete r[t]})),r}(t,e,this.world());return Object.keys(o).forEach((t=>{n.one.typeahead.hasOwnProperty(t)?delete n.one.typeahead[t]:n.one.typeahead[t]=o[t]})),this}};var so={model:{one:{typeahead:{}}},api:function(t){t.prototype.autoFill=ro},lib:io,compute:no,hooks:["typeahead"]};h.extend(M),h.extend(wn),h.extend(Me),h.extend(_n),h.extend(ir),h.plugin(wt),h.extend(eo),h.extend(jt),h.plugin(d),h.extend(Vt),h.extend(so),h.extend(At),h.extend($n);export{h as default};
diff --git a/builds/three/compromise-three.cjs b/builds/three/compromise-three.cjs
index 0947a6006..29f66ce63 100644
--- a/builds/three/compromise-three.cjs
+++ b/builds/three/compromise-three.cjs
@@ -1 +1 @@
-var e,t;e=this,t=function(){var e={methods:{one:{},two:{},three:{},four:{}},model:{one:{},two:{},three:{}},compute:{},hooks:[]};const t={compute:function(e){const{world:t}=this,n=t.compute;return"string"==typeof e&&n.hasOwnProperty(e)?n[e](this):(e=>"[object Array]"===Object.prototype.toString.call(e))(e)?e.forEach((r=>{t.compute.hasOwnProperty(r)?n[r](this):console.warn("no compute:",e)})):"function"==typeof e?e(this):console.warn("no compute:",e),this}};var n=t,r={forEach:function(e){return this.fullPointer.forEach(((t,n)=>{let r=this.update([t]);e(r,n)})),this},map:function(e,t){let n=this.fullPointer.map(((t,n)=>{let r=this.update([t]),a=e(r,n);return void 0===a?this.none():a}));if(0===n.length)return t||this.update([]);if(void 0!==n[0]){if("string"==typeof n[0])return n;if("object"==typeof n[0]&&(null===n[0]||!n[0].isView))return n}let r=[];return n.forEach((e=>{r=r.concat(e.fullPointer)})),this.toView(r)},filter:function(e){let t=this.fullPointer;return t=t.filter(((t,n)=>{let r=this.update([t]);return e(r,n)})),this.update(t)},find:function(e){let t=this.fullPointer.find(((t,n)=>{let r=this.update([t]);return e(r,n)}));return this.update([t])},some:function(e){return this.fullPointer.some(((t,n)=>{let r=this.update([t]);return e(r,n)}))},random:function(e=1){let t=this.fullPointer,n=Math.floor(Math.random()*t.length);return n+e>this.length&&(n=this.length-e,n=n<0?0:n),t=t.slice(n,n+e),this.update(t)}};const a={termList:function(){return this.methods.one.termList(this.docs)},terms:function(e){let t=this.match(".");return"number"==typeof e?t.eq(e):t},groups:function(e){if(e||0===e)return this.update(this._groups[e]||[]);let t={};return Object.keys(this._groups).forEach((e=>{t[e]=this.update(this._groups[e])})),t},eq:function(e){let t=this.pointer;return t||(t=this.docs.map(((e,t)=>[t]))),t[e]?this.update([t[e]]):this.none()},first:function(){return this.eq(0)},last:function(){let e=this.fullPointer.length-1;return this.eq(e)},firstTerms:function(){return this.match("^.")},lastTerms:function(){return this.match(".$")},slice:function(e,t){let n=this.pointer||this.docs.map(((e,t)=>[t]));return n=n.slice(e,t),this.update(n)},all:function(){return this.update().toView()},fullSentences:function(){let e=this.fullPointer.map((e=>[e[0]]));return this.update(e).toView()},none:function(){return this.update([])},isDoc:function(e){if(!e||!e.isView)return!1;let t=this.fullPointer,n=e.fullPointer;return!t.length!==n.length&&t.every(((e,t)=>!!n[t]&&e[0]===n[t][0]&&e[1]===n[t][1]&&e[2]===n[t][2]))},wordCount:function(){return this.docs.reduce(((e,t)=>(e+=t.filter((e=>""!==e.text)).length,e)),0)},isFull:function(){let e=this.pointer;if(!e)return!0;if(0===e.length||0!==e[0][0])return!1;let t=0,n=0;return this.document.forEach((e=>t+=e.length)),this.docs.forEach((e=>n+=e.length)),t===n},getNth:function(e){return"number"==typeof e?this.eq(e):"string"==typeof e?this.if(e):this}};a.group=a.groups,a.fullSentence=a.fullSentences,a.sentence=a.fullSentences,a.lastTerm=a.lastTerms,a.firstTerm=a.firstTerms;var o=a;const i=Object.assign({},o,n,r);i.get=i.eq;var s=i;class View{constructor(t,n,r={}){[["document",t],["world",e],["_groups",r],["_cache",null],["viewType","View"]].forEach((e=>{Object.defineProperty(this,e[0],{value:e[1],writable:!0})})),this.ptrs=n}get docs(){let t=this.document;return this.ptrs&&(t=e.methods.one.getDoc(this.ptrs,this.document)),t}get pointer(){return this.ptrs}get methods(){return this.world.methods}get model(){return this.world.model}get hooks(){return this.world.hooks}get isView(){return!0}get found(){return this.docs.length>0}get length(){return this.docs.length}get fullPointer(){let{docs:e,ptrs:t,document:n}=this,r=t||e.map(((e,t)=>[t]));return r.map((e=>{let[t,r,a,o,i]=e;return r=r||0,a=a||(n[t]||[]).length,n[t]&&n[t][r]&&(o=o||n[t][r].id,n[t][a-1]&&(i=i||n[t][a-1].id)),[t,r,a,o,i]}))}update(e){let t=new View(this.document,e);if(this._cache&&e&&e.length>0){let n=[];e.forEach(((e,t)=>{let[r,a,o]=e;(1===e.length||0===a&&this.document[r].length===o)&&(n[t]=this._cache[r])})),n.length>0&&(t._cache=n)}return t.world=this.world,t}toView(e){return new View(this.document,e||this.pointer)}fromText(e){const{methods:t}=this;let n=t.one.tokenize.fromString(e,this.world),r=new View(n);return r.world=this.world,r.compute(["normal","freeze","lexicon"]),this.world.compute.preTagger&&r.compute("preTagger"),r.compute("unfreeze"),r}clone(){let e=this.document.slice(0);e=e.map((e=>e.map((e=>((e=Object.assign({},e)).tags=new Set(e.tags),e)))));let t=this.update(this.pointer);return t.document=e,t._cache=this._cache,t}}Object.assign(View.prototype,s);var l=View;const u=function(e){return e&&"object"==typeof e&&!Array.isArray(e)};function c(e,t){if(u(t))for(const n in t)u(t[n])?(e[n]||Object.assign(e,{[n]:{}}),c(e[n],t[n])):Object.assign(e,{[n]:t[n]});return e}var h=function(e,t,n,r){const{methods:a,model:o,compute:i,hooks:s}=t;e.methods&&function(e,t){for(const n in t)e[n]=e[n]||{},Object.assign(e[n],t[n])}(a,e.methods),e.model&&c(o,e.model),e.irregulars&&function(e,t){let n=e.two.models||{};Object.keys(t).forEach((e=>{t[e].pastTense&&(n.toPast&&(n.toPast.ex[e]=t[e].pastTense),n.fromPast&&(n.fromPast.ex[t[e].pastTense]=e)),t[e].presentTense&&(n.toPresent&&(n.toPresent.ex[e]=t[e].presentTense),n.fromPresent&&(n.fromPresent.ex[t[e].presentTense]=e)),t[e].gerund&&(n.toGerund&&(n.toGerund.ex[e]=t[e].gerund),n.fromGerund&&(n.fromGerund.ex[t[e].gerund]=e)),t[e].comparative&&(n.toComparative&&(n.toComparative.ex[e]=t[e].comparative),n.fromComparative&&(n.fromComparative.ex[t[e].comparative]=e)),t[e].superlative&&(n.toSuperlative&&(n.toSuperlative.ex[e]=t[e].superlative),n.fromSuperlative&&(n.fromSuperlative.ex[t[e].superlative]=e))}))}(o,e.irregulars),e.compute&&Object.assign(i,e.compute),s&&(t.hooks=s.concat(e.hooks||[])),e.api&&e.api(n),e.lib&&Object.keys(e.lib).forEach((t=>r[t]=e.lib[t])),e.tags&&r.addTags(e.tags),e.words&&r.addWords(e.words),e.frozen&&r.addWords(e.frozen,!0),e.mutate&&e.mutate(t)};const d=function(e){return"[object Array]"===Object.prototype.toString.call(e)};var m=function(e,t,n){const{methods:r}=n;let a=new t([]);if(a.world=n,"number"==typeof e&&(e=String(e)),!e)return a;if("string"==typeof e)return new t(r.one.tokenize.fromString(e,n));if(o=e,"[object Object]"===Object.prototype.toString.call(o)&&e.isView)return new t(e.document,e.ptrs);var o;if(d(e)){if(d(e[0])){let n=e.map((e=>e.map((e=>({text:e,normal:e,pre:"",post:" ",tags:new Set})))));return new t(n)}let n=function(e){return e.map((e=>e.terms.map((e=>(d(e.tags)&&(e.tags=new Set(e.tags)),e)))))}(e);return new t(n)}return a};let p=Object.assign({},e);const f=function(e,t){t&&f.addWords(t);let n=m(e,l,p);return e&&n.compute(p.hooks),n};Object.defineProperty(f,"_world",{value:p,writable:!0}),f.tokenize=function(e,t){const{compute:n}=this._world;t&&f.addWords(t);let r=m(e,l,p);return n.contractions&&r.compute(["alias","normal","machine","contractions"]),r},f.plugin=function(e){return h(e,this._world,l,this),this},f.extend=f.plugin,f.world=function(){return this._world},f.model=function(){return this._world.model},f.methods=function(){return this._world.methods},f.hooks=function(){return this._world.hooks},f.verbose=function(e){const t="undefined"!=typeof process&&process.env?process.env:self.env||{};return t.DEBUG_TAGS="tagger"===e||!0===e||"",t.DEBUG_MATCH="match"===e||!0===e||"",t.DEBUG_CHUNKS="chunker"===e||!0===e||"",this},f.version="14.13.0";var v=f,b=function(e){let t=e.map((e=>{let t=new Set;return e.forEach((e=>{""!==e.normal&&t.add(e.normal),e.switch&&t.add(`%${e.switch}%`),e.implicit&&t.add(e.implicit),e.machine&&t.add(e.machine),e.root&&t.add(e.root),e.alias&&e.alias.forEach((e=>t.add(e)));let n=Array.from(e.tags);for(let e=0;e#FinancialQuarter] [
#Value] quarter (of|in)? [
{let t=e.timezones[e.tz];if(void 0===t)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(void 0===t.dst)return t.offset;let a=t.offset,n=t.offset+1;"n"===t.hem&&(n=a-1);let r=t.dst.split("->");return!0===d(e.epoch,r[0],r[1],a,n)?a:n},h={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/07:03->10/06:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/26:00->10/31:24":"0/cairo,egypt","3|n|04/20:02->10/26:02":"2/gaza,2/hebron","3|n|03/31:03->10/27:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet","3|n|03/31:02->10/27:03":"8/chisinau,8/tiraspol","3|n|03/31:00->10/26:24":"2/beirut","3|n|03/29:02->10/27:02":"2/jerusalem,2/tel_aviv,israel","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/31:02->10/27:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/31:02->10/27:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/31:01->10/27:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/07:03->09/29:02":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/07:03->04/07:02":"11/chatham,nz-chat","11|s|04/07:03->10/06:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/07:03->10/06:02":"11/norfolk","10|s|04/07:03->10/06:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/07:01->10/06:02":"4/lord_howe,4/lhi","0|s|03/10:03->04/14:02":"0/casablanca,0/el_aaiun","0|n|03/31:00->10/27:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/10:02->11/03:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/10:02->11/03:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/10:02->11/03:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/06:22->09/07:22":"11/easter,7/easterisland","-6|n|04/07:02->10/27:02":"1/merida","-6|n|03/10:02->11/03:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/10:02->11/03:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/06:24->09/08:00":"1/santiago,7/continental","-4|s|03/23:24->10/06:00":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/10:02->11/03:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/10:00->11/03:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/10:02->11/03:02":"1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic","-3|n":"1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem","-2|n|03/30:22->10/26:23":"1/nuuk,1/godthab","-2|n|03/10:02->11/03:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/10:02->11/03:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},m=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let c={};Object.keys(h).forEach((e=>{let t=e.split("|"),a={offset:Number(t[0]),hem:t[1]};t[2]&&(a.dst=t[2]),h[e].split(",").forEach((e=>{e=e.replace(/(^[0-9]+)\//,((e,t)=>(t=Number(t),m[t]+"/"))),c[e]=a}))})),c.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let a="etc/gmt"+t;c[a]={offset:-1*e,hem:"n"},a="utc/gmt"+t,c[a]={offset:-1*e,hem:"n"}}var f=c,y=()=>{let e=(()=>{if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;let e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null})();return null===e?"utc":e};const p=/(\-?[0-9]+)h(rs)?/i,g=/(\-?[0-9]+)/,w=/utc([\-+]?[0-9]+)/i,b=/gmt([\-+]?[0-9]+)/i,k=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};var D=function(e){let t=e.match(p);if(null!==t)return k(t[1]);if(t=e.match(w),null!==t)return k(t[1]);if(t=e.match(b),null!==t){let e=-1*Number(t[1]);return k(e)}return t=e.match(g),null!==t?k(t[1]):null};let v=y();const x=Object.keys(f).reduce(((e,t)=>{let a=t.split("/")[1]||"";return a=a.replace(/_/g," "),e[a]=t,e}),{});var O=(e,t)=>{if(!e)return t.hasOwnProperty(v)||(console.warn(`Unrecognized IANA id '${v}'. Setting fallback tz to UTC.`),v="utc"),v;"string"!=typeof e&&console.error("Timezone must be a string - recieved: '",e,"'\n");let a=e.trim();if(a=a.toLowerCase(),!0===t.hasOwnProperty(a))return a;if(a=(e=>(e=(e=(e=(e=(e=e.replace(/ time/g,"")).replace(/ (standard|daylight|summer)/g,"")).replace(/\b(east|west|north|south)ern/g,"$1")).replace(/\b(africa|america|australia)n/g,"$1")).replace(/\beuropean/g,"europe")).replace(/\islands/g,"island"))(a),!0===t.hasOwnProperty(a))return a;if(!0===x.hasOwnProperty(a))return x[a];if(!0===/[0-9]/.test(a)){let e=D(a);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function M(e){return e%4==0&&e%100!=0||e%400==0}function _(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function j(e){return"[object Object]"===Object.prototype.toString.call(e)}function $(e,t=2){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function z(e){let t=e%10,a=e%100;return 1===t&&11!==a?e+"st":2===t&&12!==a?e+"nd":3===t&&13!==a?e+"rd":e+"th"}function T(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function V(e=""){return"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e}function q(e){return"number"==typeof e?e:_(e)?e.getTime():e.epoch?e.epoch:null}function S(e,t){return!1===j(e)?t.clone().set(e):e}function C(e,t=""){const a=e>0?"+":"-",n=Math.abs(e);return`${a}${$(parseInt(""+n,10))}${t}${$(n%1*60)}`}const A={year:(new Date).getFullYear(),month:0,date:1};var E={parseArray:(e,t,a)=>{if(0===t.length)return e;let n=["year","month","date","hour","minute","second","millisecond"];for(let r=0;r