0)return null;if(f.ending&&u!==e.length-1&&!f.minMax)return null;if(r[l].astrix){if(!h)return e.terms.slice(t,e.length);var m=i(e,u,r[l+1]);if(!m)return null;u=m+1,l+=1}else if(r[l].minMax){if(!h){var p=e.length,d=r[l].minMax.max+t;return r[l].ending&&db.max)return null;u=g+1,l+=1}else if(f.optional){var v=r[l+1];u=o(e,u,f,v)}else if(a(c,f,s)){if(u+=1,f.consecutive){var y=r[l+1];u=o(e,u,f,y)}}else if(!c.silent_term||c.normal){var w=n(c,r,l);if(w)l=w,u+=1;else if(!f.optional)return null}else{if(0===l)return null;u+=1,l-=1}}return e.terms.slice(t,u)};t.exports=s},{"./isMatch":177,"./lumpMatch":178}],181:[function(e,t,r){"use strict";var n=e("./paths").fns,a=function(e){e=e||"",e=e.trim();var t={optional:!1};if(n.startsWith(e,"!")&&(e=e.substr(1,e.length),t.negative=!0),n.startsWith(e,"^")&&(e=e.substr(1,e.length),t.starting=!0),n.endsWith(e,"$")&&(e=e.replace(/\$$/,""),t.ending=!0),n.endsWith(e,"?")&&(e=e.replace(/\?$/,""),t.optional=!0),n.endsWith(e,"+")&&(e=e.replace(/\+$/,""),t.consecutive=!0),n.startsWith(e,"#")&&(e=e.replace(/^\#/,""),t.tag=[n.titleCase(e)],e=null),n.startsWith(e,"(")&&n.endsWith(e,")")&&(e=e.replace(/\)$/,""),e=e.replace(/^\(/,""),t.oneOf=e.split(/\|/g),e=null),n.startsWith(e,"{")&&n.endsWith(e,"}")){var r=e.match(/\{([0-9]+), ?([0-9]+)\}/);t.minMax={min:parseInt(r[1],10),max:parseInt(r[2],10)},e=null}return"."===e&&(t.anyOne=!0,e=null),"*"===e&&(t.astrix=!0,e=null),t.normal=e,t.normal&&(t.normal=t.normal.toLowerCase()),t},i=function(e){return e=e||"",e=e.split(/ +/),e.map(a)};t.exports=i},{"./paths":179}],182:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e("./lib/syntax"),i=e("./lib/startHere"),o=e("../../result/index"),s=function(e){var t={notObj:function(t,r){var n=[],a=[];return t.terms.forEach(function(e){r.hasOwnProperty(e.normal)?(a.length&&n.push(a),a=[]):a.push(e)}),a.length&&n.push(a),n=n.map(function(r){return new e(r,t.lexicon,t.refText,t.refTerms)}),new o(n,t.lexicon,t.parent)},notString:function(t,r,n){for(var s=[],u=a(r),l=[],c=0;c0&&(s.push(l),l=[]),c+=f.length-1):l.push(t.terms[c])}return l.length>0&&s.push(l),s=s.map(function(r){return new e(r,t.lexicon,t.refText,t.refTerms)}),new o(s,t.lexicon,t.parent)}};return t.notArray=function(e,r){var n=r.reduce(function(e,t){return e[t]=!0,e},{});return t.notObj(e,n)},e.prototype.not=function(e,r){if("object"===("undefined"==typeof e?"undefined":n(e))){var a=Object.prototype.toString.call(e);if("[object Array]"===a)return t.notArray(this,e,r);if("[object Object]"===a)return t.notObj(this,e,r)}return"string"==typeof e?t.notString(this,e,r):this},e};t.exports=s},{"../../result/index":44,"./lib/startHere":180,"./lib/syntax":181}],183:[function(e,t,r){"use strict";var n=e("../mutate"),a=function(e){var t={delete:function(e){if(!this.found)return this;if(!e)return this.parentTerms=n.deleteThese(this.parentTerms,this),this;var t=this.match(e);if(t.found){var r=n.deleteThese(this,t);return r}return this.parentTerms}};return Object.keys(t).forEach(function(r){e.prototype[r]=t[r]}),e};t.exports=a},{"../mutate":192}],184:[function(e,t,r){"use strict";var n=e("../mutate"),a=function(e,t){return e.terms.length&&e.terms[t]?(e.terms[t].whitespace.before=" ",e):e},i=function(e){var t=function(t){return"Terms"===t.isA?t:"Term"===t.isA?new e([t]):e.fromString(t)},r={insertBefore:function(e,r){var i=this.terms.length,o=t(e);r&&o.tagAs(r);var s=this.index();return a(this.parentTerms,s),s>0&&a(o,0),this.parentTerms.terms=n.insertAt(this.parentTerms.terms,s,o),this.terms.length===i&&(this.terms=o.terms.concat(this.terms)),this},insertAfter:function(e,r){var i=this.terms.length,o=t(e);r&&o.tagAs(r);var s=this.terms[this.terms.length-1].index();return a(o,0),this.parentTerms.terms=n.insertAt(this.parentTerms.terms,s+1,o),this.terms.length===i&&(this.terms=this.terms.concat(o.terms)),this},insertAt:function(e,r,i){e<0&&(e=0);var o=this.terms.length,s=t(r);return i&&s.tagAs(i),e>0&&a(s,0),this.parentTerms.terms=n.insertAt(this.parentTerms.terms,e,s),this.terms.length===o&&Array.prototype.splice.apply(this.terms,[e,0].concat(s.terms)),0===e&&(this.terms[0].whitespace.before="",s.terms[s.terms.length-1].whitespace.after=" "),this}};return Object.keys(r).forEach(function(t){e.prototype[t]=r[t]}),e};t.exports=i},{"../mutate":192}],185:[function(e,t,r){"use strict";var n=function(e){var t=[["toUpperCase","UpperCase"],["toLowerCase"],["toTitleCase","TitleCase"]];return t.forEach(function(t){var r=t[0],n=t[1],a=function(){var e=arguments;return this.terms.forEach(function(t){t[r].apply(t,e)}),n&&this.tagAs(n,r),this};e.prototype[r]=a}),e};t.exports=n},{}],186:[function(e,t,r){"use strict";var n=function(e){var t={term:function(e){return this.terms[e]},first:function(){var t=this.terms[0];return new e([t],this.lexicon,this.refText,this.refTerms)},last:function(){var t=this.terms[this.terms.length-1];return new e([t],this.lexicon,this.refText,this.refTerms)},slice:function(t,r){var n=this.terms.slice(t,r);return new e(n,this.lexicon,this.refText,this.refTerms)},endPunctuation:function(){return this.last().terms[0].endPunctuation()},canBe:function(e){e=e||"",e=e.replace(/^#/,"");for(var t=0;t0&&a[0]&&(a[0].whitespace.before=" "),Array.prototype.splice.apply(e,[t,0].concat(a)),e}},{}],193:[function(e,t,r){"use strict";t.exports={data:e("../data/index"),lexicon:e("../data/lexicon"),fns:e("../fns"),log:e("../log"),Term:e("../term")}},{"../data/index":8,"../data/lexicon":9,"../fns":40,"../log":42,"../term":157}],194:[function(e,t,r){"use strict";var n=e("./fix"),a={wanna:["want","to"],gonna:["going","to"],im:["i","am"],alot:["a","lot"],dont:["do","not"],dun:["do","not"],ive:["i","have"],"won't":["will","not"],wont:["will","not"],"can't":["can","not"],cant:["can","not"],cannot:["can","not"],aint:["is","not"],"ain't":["is","not"],"shan't":["should","not"],imma:["I","will"],"where'd":["where","did"],whered:["where","did"],"when'd":["when","did"],whend:["when","did"],"how'd":["how","did"],howd:["how","did"],"what'd":["what","did"],whatd:["what","did"],"let's":["let","us"],dunno:["do","not","know"],brb:["be","right","back"],gtg:["got","to","go"],irl:["in","real","life"],tbh:["to","be","honest"],imo:["in","my","opinion"],til:["today","i","learned"],rn:["right","now"]},i=function(e){for(var t=Object.keys(a),r=0;r0&&" - "===r.whitespace.before){var i=new a("");return i.silent_term="to",e.insertAt(t,i),e.terms[t-1].tagAs("NumberRange"),e.terms[t].tagAs("NumberRange"),e.terms[t].whitespace.before="",e.terms[t].whitespace.after="",e.terms[t+1].tagAs("NumberRange"),e}if(r.tag.NumberRange){var o=r.text.split(/(-)/);o[1]="to",e=n(e,o,t),e.terms[t].tagAs("NumberRange"),e.terms[t+1].tagAs("NumberRange"),e.terms[t+2].tagAs("NumberRange"),t+=2}}}return e};t.exports=i},{"../../../term":157,"./fix":198}],198:[function(e,t,r){"use strict";var n=e("../../../term"),a={not:"Negative",will:"Verb",would:"Modal",have:"Verb",are:"Copula",is:"Copula",am:"Verb"},i=function(e){a[e.silent_term]&&e.tagAs(a[e.silent_term])},o=function(e,t,r){var a=e.terms[r];a.silent_term=t[0],a.tagAs("Contraction","tagger-contraction");var o=new n("");if(o.silent_term=t[1],o.tagAs("Contraction","tagger-contraction"),e.insertAt(r+1,o),o.whitespace.before="",o.whitespace.after="",i(o),t[2]){var s=new n("");s.silent_term=t[2],e.insertAt(r+2,s),s.tagAs("Contraction","tagger-contraction"),i(s)}return e};t.exports=o},{"../../../term":157}],199:[function(e,t,r){"use strict";var n=e("./01-irregulars"),a=e("./02-hardOne"),i=e("./03-easyOnes"),o=e("./04-numberRange"),s=function(e){return e=n(e),e=a(e),e=i(e),e=o(e)};t.exports=s},{"./01-irregulars":194,"./02-hardOne":195,"./03-easyOnes":196,"./04-numberRange":197}],200:[function(e,t,r){"use strict";var n={re:!0,ve:!0,ll:!0,t:!0,s:!0,d:!0,m:!0},a=function(e){var t=e.text.match(/^([a-z]+)'([a-z][a-z]?)$/i);return t&&t[1]&&n[t[2]]?("t"===t[2]&&t[1].match(/[a-z]n$/)&&(t[1]=t[1].replace(/n$/,""),t[2]="n't"),e.tag.TitleCase&&(t[1]=t[1].replace(/^[a-z]/,function(e){return e.toUpperCase()})),{start:t[1],end:t[2]}):(t=e.text.match(/[a-z]s'$/i),t?{start:e.normal.replace(/s'?$/,""),end:""}:null)};t.exports=a},{}],201:[function(e,t,r){"use strict";var n=e("../paths").log,a="correction",i=e("./verb_corrections"),o=function(e){return n.here(a),e.match("so #Adjective").match("so").tag("Adverb","so-adv"),e.match("so #Noun").match("so").tag("Conjunction","so-conj"),e.match("do so").match("so").tag("Noun","so-noun"),e.match("still #Adjective").match("still").tag("Adverb","still-advb"),e.match("more #Noun").tag("Noun","more-noun"),e.match("still #Verb").term(0).tag("Adverb","still-verb"),e.match("second #Noun").term(0).unTag("Unit").tag("Ordinal","second-noun"),e.match("(foot|feet)").tag("Noun","foot-noun"),e.match("#Value (foot|feet)").match("(foot|feet)").tag("Unit","foot-unit"),e.match("how (#Copula|#Modal|#PastTense)").term(0).tag("QuestionWord","how-question"),e.match("will #Adjective").term(1).tag("Verb","will-adj"),e.match("u #Verb").term(0).tag("Pronoun","u-pronoun-1"),e.match("#Conjunction u").term(1).tag("Pronoun","u-pronoun-2"),e.match("is no #Verb").term(2).tag("Noun","is-no-verb"),e.match("the #Verb #Preposition .").match("#Verb").tag("Noun","correction-determiner1"),e.match("the #Verb").match("#Verb").tag("Noun","correction-determiner2"),e.match("the #Adjective #Verb").match("#Verb").tag("Noun","correction-determiner3"),e.match("the #Adverb #Adjective #Verb").match("#Verb").tag("Noun","correction-determiner4"),e.match("#Organization of the? #TitleCase").tag("Organization","org-of-place"),e.match("#Organization #Country").tag("Organization","org-country"),e.match("(world|global|international|national|#Demonym) #Organization").tag("Organization","global-org"),e.match("#TitleCase (ltd|co|inc|dept|assn|bros)").tag("Organization","org-abbrv"),e.match("#Determiner #Verb of").term(1).tag("Noun","the-verb-of"),e.match("#Noun #Adverb #Noun").term(2).tag("Verb","correction"),e.match("#Copula #Adjective to #Verb").match("#Adjective to").tag("Verb","correction"),e.match("#Verb than").term(0).tag("Noun","correction"),e.match("#Possessive #Verb").term(1).tag("Noun","correction-possessive"),e.match("just like").term(1).tag("Preposition","like-preposition"),e.match("#Noun like #Noun").term(1).tag("Preposition","noun-like"),e.match("#Verb like").term(1).tag("Adverb","verb-like"),e.match("#Adverb like").term(1).tag("Adverb","adverb-like"),e.match("#Determiner #Noun of #Verb").match("#Verb").tag("Noun","noun-of-noun"),e.match("#Adjective #PresentTense").term(1).tag("Noun","adj-presentTense"),e.match("#Possessive #FirstName").term(1).unTag("Person","possessive-name"),e.match("(a|an) (#Duration|#Value)").ifNo("#Plural").term(0).tag("Value","a-is-one"),e.match("half a? #Value").tag("Value","half-a-value"),e.match("#Value and a (half|quarter)").tag("Value","value-and-a-half"),e.match("#Value").match("!#Ordinal").tag("#Cardinal","not-ordinal"),e.match("#Value+ #Currency").tag("Money","value-currency"),e.match("#Money and #Money #Currency?").tag("Money","money-and-money"),e.match("holy (shit|fuck|hell)").tag("Expression","swears-expression"),e.match("#Determiner (shit|damn|hell)").term(1).tag("Noun","swears-noun"),e.match("(shit|damn|fuck) (#Determiner|#Possessive|them)").term(0).tag("Verb","swears-verb"),e.match("#Copula fucked up?").not("#Copula").tag("Adjective","swears-adjective"),e=i(e)};t.exports=o},{"../paths":208,"./verb_corrections":202}],202:[function(e,t,r){"use strict";var n=function(e){var t="(#Adverb|not)+?";return e.match("(has|had) "+t+" #PastTense").not("#Verb$").tag("Auxillary","had-walked"),e.match("#Copula "+t+" #Gerund").not("#Verb$").tag("Auxillary","copula-walking"),e.match("(be|been) "+t+" #Gerund").not("#Verb$").tag("Auxillary","be-walking"),e.match("(#Modal|did) "+t+" #Verb").not("#Verb$").tag("Auxillary","modal-verb"),e.match("#Modal "+t+" have "+t+" had "+t+" #Verb").not("#Verb$").tag("Auxillary","would-have"),e.match("(#Modal) "+t+" be "+t+" #Verb").not("#Verb$").tag("Auxillary","would-be"),e.match("(#Modal|had|has) "+t+" been "+t+" #Verb").not("#Verb$").tag("Auxillary","would-be"),e};t.exports=n},{}],203:[function(e,t,r){"use strict";var n={interpret:e("./contraction")},a={lexicon_lump:e("./lumper/lexicon_lump"),lump_two:e("./lumper/lump_two"),lump_three:e("./lumper/lump_three")},i={punctuation_step:e("./steps/01-punctuation_step"),lexicon_step:e("./steps/02-lexicon_step"),capital_step:e("./steps/03-capital_step"),web_step:e("./steps/04-web_step"),suffix_step:e("./steps/05-suffix_step"),neighbour_step:e("./steps/06-neighbour_step"),noun_fallback:e("./steps/07-noun_fallback"),date_step:e("./steps/08-date_step"),auxillary_step:e("./steps/09-auxillary_step"),negation_step:e("./steps/10-negation_step"),adverb_step:e("./steps/11-adverb_step"),phrasal_step:e("./steps/12-phrasal_step"),comma_step:e("./steps/13-comma_step"),possessive_step:e("./steps/14-possessive_step"),value_step:e("./steps/15-value_step"),acronym_step:e("./steps/16-acronym_step"),emoji_step:e("./steps/17-emoji_step"),person_step:e("./steps/18-person_step"),quotation_step:e("./steps/19-quotation_step"),organization_step:e("./steps/20-organization_step"),plural_step:e("./steps/21-plural_step")},o=e("./corrections"),s=e("./phrase"),u=function(e){e=i.punctuation_step(e),e=i.emoji_step(e),e=a.lexicon_lump(e),e=i.lexicon_step(e),e=i.web_step(e),e=i.suffix_step(e),e=i.neighbour_step(e),e=i.capital_step(e),e=i.noun_fallback(e),e=n.interpret(e),e=i.date_step(e),e=i.auxillary_step(e),e=i.negation_step(e),e=i.phrasal_step(e),e=i.comma_step(e),e=i.possessive_step(e),e=i.value_step(e),e=i.acronym_step(e),e=i.person_step(e),e=i.quotation_step(e),e=i.organization_step(e),e=i.plural_step(e);for(var t=0;t<3;t++)e=a.lump_three(e),e=a.lump_two(e);return e=o(e),e=s(e)};t.exports=u},{"./contraction":199,"./corrections":201,"./lumper/lexicon_lump":205,"./lumper/lump_three":206,"./lumper/lump_two":207,"./phrase":210,"./steps/01-punctuation_step":211,"./steps/02-lexicon_step":212,"./steps/03-capital_step":213,"./steps/04-web_step":214,"./steps/05-suffix_step":215,"./steps/06-neighbour_step":216,"./steps/07-noun_fallback":217,"./steps/08-date_step":218,"./steps/09-auxillary_step":219,"./steps/10-negation_step":220,"./steps/11-adverb_step":221,"./steps/12-phrasal_step":222,"./steps/13-comma_step":223,"./steps/14-possessive_step":224,"./steps/15-value_step":225,"./steps/16-acronym_step":226,"./steps/17-emoji_step":227,"./steps/18-person_step":228,"./steps/19-quotation_step":229,"./steps/20-organization_step":230,"./steps/21-plural_step":231}],204:[function(e,t,r){"use strict";var n=e("../paths"),a=n.Term,i=n.log,o="tagger/combine",s=function(e,t){var r=e.whitespace.before+e.text+e.whitespace.after;return r+=t.whitespace.before+t.text+t.whitespace.after},u=function(e,t){var r=e.terms[t],n=e.terms[t+1];if(n){i.tell('--combining: "'+r.normal+'"+"'+n.normal+'"',o);var u=s(r,n);e.terms[t]=new a(u,r.context),e.terms[t].normal=r.normal+" "+n.normal,e.terms[t+1]=null,e.terms=e.terms.filter(function(e){return null!==e})}};t.exports=u},{"../paths":208}],205:[function(e,t,r){"use strict";var n=e("./combine"),a=e("../paths"),i=a.log,o=a.lexicon,s=a.fns,u="tagger/multiple",l=function(e,t,r){for(var a=0;ae.length)return!1}return!1},f=function(e){i.here(u);for(var t=e.lexicon||{},r=0;r1&&t.match(/^[IVXCM]+$/))},s={a:!0,i:!0,u:!0,r:!0,c:!0,k:!0},u=function(e){return n.here(i),e.terms.forEach(function(e){var t=e.text;t.match(/^[A-Z][a-z']/)&&e.tagAs("TitleCase","punct-rule"),t=t.replace(/[,\.\?]$/,"");for(var r=0;r1&&(t=u(l[l.length-1],e))&&n.tagAs(t,"multiword-lexicon")}}}return e;
-};t.exports=l},{"../contraction/split":200,"../paths":208}],213:[function(e,t,r){"use strict";var n=e("../paths").log,a="tagger/capital",i=function(e){n.here(a);for(var t=1;t1e3&&e<3e3)},c=function(e){n.here(a),e.match("#Month #DateRange+").tag("Date","correction-numberRange"),e.match(i+" (#Determiner|#Value|#Date)").term(0).tag("Month","correction-may"),e.match("#Date "+i).term(1).tag("Month","correction-may"),e.match(o+" "+i).term(1).tag("Month","correction-may"),e.match("(next|this|last) "+i).term(1).tag("Month","correction-may"),e.match("#Value #Abbreviation").tag("Value","value-abbr"),e.match("a #Value").tag("Value","a-value"),e.match("(minus|negative) #Value").tag("Value","minus-value"),e.match("#Value grand").tag("Value","value-grand"),e.match("(half|quarter) #Ordinal").tag("Value","half-ordinal"),e.match("(hundred|thousand|million|billion|trillion) and #Value").tag("Value","magnitude-and-value"),e.match("#Value point #Value").tag("Value","value-point-value"),e.match("#Cardinal #Time").tag("Time","value-time"),e.match("(by|before|after|at|@|about) #Time").tag("Time","preposition-time"),e.match("(#Value|#Time) (am|pm)").tag("Time","value-ampm"),e.match("all day").tag("Time","all-day"),e.match(o+"? "+s+" (spring|summer|winter|fall|autumn)").tag("Date","thisNext-season"),e.match("the? "+u+" of (spring|summer|winter|fall|autumn)").tag("Date","section-season"),e.match("#Date the? #Ordinal").tag("Date","correction-date"),e.match("#Value of? #Month").tag("Date","value-of-month"),e.match("#Cardinal #Month").tag("Date","cardinal-month"),e.match("#Month #Value to #Value").tag("Date","value-to-value"),e.match(s+" #Date").tag("Date","thisNext-date"),e.match(o+"? #Value #Duration").tag("Date","value-duration"),e.match("due? (by|before|after|until) #Date").tag("Date","by-date"),e.match("#Date (by|before|after|at|@|about) #Cardinal").not("^#Date").tag("Time","date-before-Cardinal"),e.match("#Time (eastern|pacific|central|mountain)").term(1).tag("Time","timezone"),e.match("#Time (est|pst|gmt)").term(1).tag("Time","timezone abbr"),e.match("#Date (am|pm)").term(1).unTag("Verb").unTag("Copula").tag("Time","date-am"),e.match("at night").tag("Time","at-night"),e.match("in the (night|evening|morning|afternoon|day|daytime)").tag("Time","in-the-night"),e.match("(early|late) (at|in)? the? (night|evening|morning|afternoon|day|daytime)").tag("Time","early-evening"),e.match("#Month #Value #Cardinal").tag("Date","month-value-cardinal"),e.match("(last|next|this|previous|current|upcoming|coming|the) #Date").tag("Date","next-feb"),e.match("#Date #Value").tag("Date","date-value"),e.match("#Value #Date").tag("Date","value-date"),e.match("#Date #Preposition #Date").tag("Date","date-prep-date"),e.match("#Value #Duration #Conjunction").tag("Date","val-duration-conjunction"),e.match("the? "+u+" of #Date").tag("Date","section-of-date");var t=e.match("#Date #Value #Cardinal").lastTerm().values(),r=t.numbers()[0];return l(r)&&t.tag("Year","date-value-year"),t=e.match("#Date+ #Cardinal").lastTerm().values(),r=t.numbers()[0],l(r)&&t.tag("Year","date-year"),t=e.match("#Month #Value #Cardinal").lastTerm().values(),r=t.numbers()[0],l(r)&&t.tag("Year","date-year2"),t=e.match("#Month #Value to #Value #Cardinal").lastTerm().values(),r=t.numbers()[0],l(r)&&t.tag("Year","date-year3"),t=e.match("(in|of|by|during|before|starting|ending|for|year) #Cardinal").lastTerm().values(),r=t.numbers()[0],l(r)&&t.tag("Year","preposition-year"),e.match("#Duration in #Date").tag("Date","duration-in-date"),e};t.exports=c},{"../paths":208}],219:[function(e,t,r){"use strict";var n=e("../paths").log,a="tagger/auxillary",i={do:!0,"don't":!0,does:!0,"doesn't":!0,will:!0,wont:!0,"won't":!0,have:!0,"haven't":!0,had:!0,"hadn't":!0,not:!0},o=function(e){n.here(a);for(var t=0;t0&&l.tag.Conjunction)u=!0;else{if(l.tag[n]){if(l.tag.Comma){s+=1,o=0;continue}if(s>0&&u)return i(e,r,t),!0}if(o+=1,o>5)return!1}}return!1},s=function(e){for(var t=0;t35)))},s=function(e){var t=e.text.replace(/^[:;]/,":");return t=t.replace(/[:;]$/,":"),i[t]},u=function(e){for(var t=0;t8));o++)if(e.terms[t+o].text.match(/.["'\u201D\u2036\u2019]([;:,.])?$/)){i(e,t,o+t),t+=o;break}}return e};t.exports=o},{"../paths":208}],230:[function(e,t,r){"use strict";var n=e("../paths").log,a="tagger/organization_step",i=e("../paths").data.orgWords;i=i.reduce(function(e,t){return e[t]=!0,e},{});var o=function(e){return!!e.tag.Noun&&(!(e.tag.Pronoun||e.tag.Comma||e.tag.Possessive)&&!(!e.tag.TitleCase&&!e.tag.Organization))},s=function(e){n.here(a);for(var t=0;t (http://spencermounta.in)",name:"compromise",description:"natural language processing in the browser",version:"7.0.18",main:"./builds/compromise.js",repository:{type:"git",url:"git://github.com/nlp-compromise/compromise.git"},scripts:{test:"node ./scripts/test.js",browsertest:"node ./scripts/browserTest.js",build:"node ./scripts/build.js",demo:"node ./scripts/demo.js",watch:"node ./scripts/watch.js",filesize:"node ./scripts/filesize.js",coverage:"node ./scripts/coverage.js"},files:["builds/","docs/"],dependencies:{},devDependencies:{"babel-preset-es2015":"6.9.0","babel-preset-stage-2":"^6.11.0",babelify:"7.3.0",babili:"0.0.11",browserify:"13.0.1",chalk:"^1.1.3","codacy-coverage":"^2.0.0",derequire:"^2.0.3",eslint:"^3.1.1",gaze:"^1.1.1","http-server":"0.9.0","nlp-corpus":"latest",nyc:"^8.4.0",shelljs:"^0.7.2","tap-min":"^1.1.0","tap-spec":"4.1.1",tape:"4.6.0","uglify-js":"2.7.0"},license:"MIT"}},{}],2:[function(e,t,r){"use strict";var n=e("../fns"),a={going:"easy,fore,on,out",ight:"overn,overwe,r,sl,upt",ated:"antiqu,intoxic,sophistic,unregul,unrel",rant:"aber,exube,flag,igno,vib",wing:"harro,kno,left-,right-",ted:"expec,impor,limi,spiri,talen,tes,unexpec,unpreceden",ish:"dan,fool,hell,lout,self,snobb,squeam,styl",ary:"dre,legend,necess,prim,sc,second,w,we",ite:"el,favor,fin,oppos,pet,pol,recond,tr",ely:"hom,lik,liv,lon,lov,tim,unlik",tly:"cos,ghas,ghos,nigh,sain,sprigh,unsigh",dly:"cowar,cud,frien,frien,kin,ma",ble:"a,dou,hum,nim,no,proba",rly:"bu,disorde,elde,hou,neighbo,yea",ped:"cram,pum,stereoty,stri,war",sed:"clo,disea,distres,unsupervi,u",lly:"chi,hi,jo,si,sme",per:"dap,impro,pro,su,up",ile:"fert,host,juven,mob,volat",led:"detai,disgrunt,fab,paralle,troub",ast:"e,l,p,steadf",ent:"abs,appar,b,pres",ged:"dama,deran,jag,rag",ded:"crow,guar,retar,undeci",est:"b,dishon,hon,quick",ial:"colon,impart,init,part",ter:"bet,lat,ou,ut",ond:"bey,bl,vagab",ady:"he,re,sh,ste",eal:"ether,id,r,surr",ard:"abo,awkw,stand,straightforw",ior:"jun,pr,sen,super",ale:"fem,m,upsc,wholes",ed:"advanc,belov,craz,determin,hallow,hook,inbr,justifi,nak,nuanc,sacr,subdu,unauthoriz,unrecogniz,wick",ly:"dai,earth,gris,heaven,low,meas,month,oi,prick,seem,s,ug,unru,week,wi,woman",al:"actu,coloss,glob,illeg,leg,leth,liter,loy,ov,riv,roy,univers,usu",dy:"baw,bloo,clou,gau,gid,han,mol,moo,stur,ti,tren,unti,unwiel",se:"adver,den,diver,fal,immen,inten,obe,perver,preci,profu",er:"clev,form,inn,oth,ov,she,slend,somb,togeth,und",id:"afra,hum,langu,plac,rab,sord,splend,stup,torp",re:"awa,bizar,di,enti,macab,me,seve,since,spa",en:"barr,brok,crav,op,sudd,unev,unwritt,wood",ic:"alcohol,didact,gener,hispan,organ,publ,symbol",ny:"ma,pho,pu,shi,skin,ti,za",st:"again,mo,populi,raci,robu,uttermo",ne:"do,go,insa,obsce,picayu,sere",nd:"behi,bla,bli,profou,undergrou,wou",le:"multip,sing,so,subt,who",pt:"abru,ade,a,bankru,corru,nondescri",ty:"faul,hef,lof,mea,sal,uppi",sy:"bu,chee,lou,no,ro",ct:"abstra,exa,imperfe,inta,perfe",in:"certa,highfalut,ma,tw,va",et:"discre,secr,sovi,ups,viol",me:"part-ti,pri,sa,supre,welco",cy:"boun,fan,i,jui,spi",ry:"fur,sor,tawd,wi,w",te:"comple,concre,obsole,remo",ld:"ba,bo,go,mi",an:"deadp,republic,t,urb",ll:"a,i,overa,sti",ay:"everyd,g,gr,ok",or:"indo,maj,min,outdo",my:"foa,gloo,roo,sli",ck:"ba,qua,si,sli",rt:"cove,expe,hu,ove",ul:"fo,gainf,helpf,painf"},i=["ablaze","above","adult","ahead","aloof","arab","asleep","average","backwards","bad","blank","bogus","bottom","brisk","cagey","chief","civil","common","complex","cozy","crisp","devout","difficult","due","dumb","eerie","evil","excess","extra","fake","far","faux","fierce ","final","fit","foreign","fun","good","goofy","gratis","grey","groovy","gross","half","huge","humdrum","inside","kaput","left","level","lewd","magenta","makeshift","mammoth","medium","modern","moot","naive","nearby","next","nonstop","north","notable","offbeat","ok","online","offline","outside","overwrought","premium","pricey","pro","quaint","random","rear","rebel","ritzy","savvy","sexy","shut","shy","sleek","smug","solemn","south","stark","superb","taboo","teenage","top","tranquil","true","ultra","understood","unfair","unknown","upbeat","upstairs","vanilla","various","widespread","woozy","wrong"];t.exports=n.uncompress_suffixes(i,a)},{"../fns":7}],3:[function(e,t,r){"use strict";var n=e("../fns"),a={erate:"degen,delib,desp,lit,mod",icial:"artif,benef,off,superf",ntial:"esse,influe,pote,substa",teful:"gra,ha,tas,was",stant:"con,di,in,resi",hing:"astonis,das,far-reac,refres,scat,screec,self-loat,soot",eful:"car,grac,peac,sham,us,veng",ming:"alar,cal,glea,unassu,unbeco,upco",cial:"commer,cru,finan,ra,so,spe",ure:"insec,miniat,obsc,premat,sec,s",uent:"congr,fl,freq,subseq",rate:"accu,elabo,i,sepa",ific:"horr,scient,spec,terr",rary:"arbit,contempo,cont,tempo",ntic:"authe,fra,giga,roma",nant:"domi,malig,preg,reso",nent:"emi,immi,perma,promi",iant:"brill,def,g,luxur",ging:"dama,encoura,han,lon",iate:"appropr,immed,inappropr,intermed",rect:"cor,e,incor,indi",zing:"agoni,ama,appeti,free",ine:"div,femin,genu,mascul,prist,rout",ute:"absol,ac,c,m,resol",ern:"east,north,south,st,west",tful:"deligh,doub,fre,righ,though,wis",ant:"abund,arrog,eleg,extravag,exult,hesit,irrelev,miscre,nonchal,obeis,observ,pl,pleas,redund,relev,reluct,signific,vac,verd",ing:"absorb,car,coo,liv,lov,ly,menac,perplex,shock,stand,surpris,tell,unappeal,unconvinc,unend,unsuspect,vex,want",ate:"adequ,delic,fortun,inadequ,inn,intim,legitim,priv,sed,ultim"},i=["absurd","aggressive","alert","alive","angry","attractive","awesome","beautiful","big","bitter","black","blue","bored","boring","brash","brave","brief","brown","calm","charming","cheap","check","clean","clear","close","cold","cool","cruel","curly","cute","dangerous","dear","dirty","drunk","dry","dull","eager","early","easy","efficient","empty","even","extreme","faint","fair","fanc","feeble","few","fierce","fine","firm","forgetful","formal","frail","free","full","funny","gentle","glad","glib","glad","grand","green","gruesome","handsome","happy","harsh","heavy","high","hollow","hot","hungry","impolite","important","innocent","intellegent","interesting","keen","kind","lame","large","late","lean","little","long","loud","low","lucky","lush","macho","mature","mean","meek","mellow","mundane","narrow","near","neat","new","nice","noisy","normal","odd","old","orange","pale","pink","plain","poor","proud","pure","purple","rapid","rare","raw","rich","rotten","round","rude","safe","scarce","scared","shallow","shrill","simple","slim","slow","small","smooth","solid","soon","sore","sour","square","stale","steep","strange","strict","strong","swift","tall","tame","tart","tender","tense","thin","thirsty","tired","true","vague","vast","vulgar","warm","weird","wet","wild","windy","wise","yellow","young"];t.exports=n.uncompress_suffixes(i,a)},{"../fns":7}],4:[function(e,t,r){"use strict";t.exports=["bright","broad","coarse","damp","dark","dead","deaf","deep","fast","fat","flat","fresh","great","hard","light","loose","mad","moist","quick","quiet","red","ripe","rough","sad","sharp","short","sick","smart","soft","stiff","straight","sweet","thick","tight","tough","weak","white","wide"]},{}],5:[function(e,t,r){"use strict";for(var n=["january","february","april","june","july","august","september","october","november","december","jan","feb","mar","apr","jun","jul","aug","sep","oct","nov","dec","sept","sep"],a=["monday","tuesday","wednesday","thursday","friday","saturday","sunday","mon","tues","wed","thurs","fri","sat","sun"],i=0;i<=6;i++)a.push(a[i]+"s");for(var o=["millisecond","minute","hour","day","week","month","year","decade"],s=o.length,u=0;u1});f(h,"Unit"),f(n.dates.durations,"Duration"),c(n.abbreviations);var m=n.numbers.ordinal;f(Object.keys(m.ones),"Ordinal"),f(Object.keys(m.teens),"Ordinal"),f(Object.keys(m.tens),"Ordinal"),f(Object.keys(m.multiples),"Ordinal"),m=n.numbers.cardinal,f(Object.keys(m.ones),"Cardinal"),f(Object.keys(m.teens),"Cardinal"),f(Object.keys(m.tens),"Cardinal"),f(Object.keys(m.multiples),"Cardinal"),f(Object.keys(n.numbers.prefixes),"Cardinal"),f(Object.keys(n.irregular_plurals.toPlural),"Singular"),f(Object.keys(n.irregular_plurals.toSingle),"Plural"),f(n.dates.days,"WeekDay"),f(n.dates.months,"Month"),f(n.dates.relative,"RelativeDay"),f(n.holidays,"Holiday"),f(n.professions,"Actor"),f(n.demonyms,"Demonym"),f(n.sportsTeams,"SportsTeam"),f(n.bands,"Organization"),f(n.orgWords,"Noun"),Object.keys(n.irregular_verbs).forEach(function(e){l[e]="Infinitive";var t=n.irregular_verbs[e];Object.keys(t).forEach(function(e){t[e]&&(l[t[e]]=e)});var r=u(e);Object.keys(r).forEach(function(e){r[e]&&!l[r[e]]&&(l[r[e]]=e)})}),n.verbs.forEach(function(e){var t=u(e);Object.keys(t).forEach(function(e){t[e]&&!l[t[e]]&&(l[t[e]]=e)}),l[s(e)]="Adjective"}),n.superlatives.forEach(function(e){l[o.toNoun(e)]="Noun",l[o.toAdverb(e)]="Adverb",l[o.toSuperlative(e)]="Superlative",l[o.toComparative(e)]="Comparative"}),n.verbConverts.forEach(function(e){l[o.toNoun(e)]="Noun",l[o.toAdverb(e)]="Adverb",l[o.toSuperlative(e)]="Superlative",l[o.toComparative(e)]="Comparative";var t=o.toVerb(e);l[t]="Verb";var r=u(t);Object.keys(r).forEach(function(e){r[e]&&!l[r[e]]&&(l[r[e]]=e)})}),n.nouns.forEach(function(e){l[e]="Singular";var t=i(e);l[t]="Plural"}),c(n.firstnames),f(n.notable_people.female,"FemaleName"),f(n.notable_people.male,"MaleName"),f(n.titles,"Singular"),f(n.lastnames,"LastName"),f(n.places.airports,"Place"),f(n.places.cities,"City"),f(n.places.countries,"Country"),f(n.organizations,"Organization"),f(n.adjectives,"Adjective"),f(n.verbConverts,"Adjective"),f(n.superlatives,"Adjective"),f(n.currencies,"Currency"),c(n.misc),delete l[""],delete l[" "],delete l[null],t.exports=l},{"../result/subset/adjectives/methods/index":61,"../result/subset/nouns/methods/pluralize":98,"../result/subset/verbs/methods/conjugate/faster":137,"../result/subset/verbs/methods/toAdjective":148,"./fns":7,"./index":8}],10:[function(e,t,r){"use strict";t.exports=["a lot","a posteriori","abroad","ad nauseam","again","all but","all that","almost","alone","already","also","always","anymore","anyway","apart","aside","at best","at large","at least","at most","at worst","away","by far","by now","damn","de jure","de trop","directly","en masse","ever","for example","for good","for sure","forever","further","furthermore","hence","indeed","instead","just","just about","kinda","maybe","meanwhile","more","moreover","newly","no longer","not withstanding","of course","often","once","once again","once more","only","par excellence","per se","perhaps","point blank","quite","randomly","rather","really","several","so","somehow","sometimes","somewhat","soon","sort of","such","then","thus","too","totally","toward","twice","up to","upwards of","very","way","well","yes","yep"]},{}],11:[function(e,t,r){"use strict";t.exports=["this","any","enough","each","whatever","every","these","another","plenty","whichever","neither","an","a","least","own","few","both","those","the","that","various","either","much","some","else","la","le","les","des","de","du","el"]},{}],12:[function(e,t,r){"use strict";t.exports=["uh","uhh","uhm","uh huh","uh-oh","please","plz","ugh","sheesh","eww","pff","voila","oy","hi","hello","bye","goodbye","hey","hai","eep","hurrah","yuck","ow","duh","oh","hmm","yeah","whoa","ooh","whee","ah","bah","gah","yaa","phew","gee","ahem","eek","meh","yahoo","oops","d'oh","psst","argh","grr","nah","shhh","whew","mmm","ooo","yay","uh-huh","boo","wow","nope","haha","hahaha","lol","lols","lmao","lmfao","ya","hee","ohh","eh","yup","wtf","wtaf","et cetera","fuck","shit","damn","dang","damnit","dammit","hell","a la"]},{}],13:[function(e,t,r){"use strict";for(var n={here:"Noun",better:"Comparative",earlier:"Superlative","make sure":"Verb","keep tabs":"Verb",gonna:"Verb",cannot:"Verb",has:"Verb",sounds:"PresentTense",taken:"PastTense",msg:"Verb","a few":"Value","years old":"Unit",not:"Negative",non:"Negative",never:"Negative",no:"Negative","no doubt":"Noun","not only":"Adverb","how's":"QuestionWord"},a={Adjective:["so called","on board","vice versa","en route","upside down","up front","in front","in situ","in vitro","ad hoc","de facto","ad infinitum","for keeps","a priori","off guard","spot on","ipso facto","fed up","brand new","old fashioned","bona fide","well off","far off","straight forward","hard up","sui generis","en suite","avant garde","sans serif","gung ho","super duper","bourgeois"],Verb:["lengthen","heighten","worsen","lessen","awaken","frighten","threaten","hasten","strengthen","given","known","shown","seen","born"],Place:["new england","new hampshire","new jersey","new mexico","united states","united kingdom","great britain","great lakes","pacific ocean","atlantic ocean","indian ocean","arctic ocean","antarctic ocean","everglades"],Conjunction:["yet","therefore","or","while","nor","whether","though","tho","because","cuz","but","for","and","however","before","although","how","plus","versus","otherwise"],Time:["noon","midnight","now","morning","evening","afternoon","night","breakfast time","lunchtime","dinnertime","ago","sometime","eod","oclock"],Date:["eom","standard time","daylight time"],Condition:["if","unless","notwithstanding"],PastTense:["said","had","been","began","came","did","meant","went"],Gerund:["going","being","according","resulting","developing","staining"],Copula:["is","are","was","were","am"],Determiner:e("./determiners"),Preposition:e("./prepositions"),Modal:["can","may","could","might","will","ought to","would","must","shall","should","ought","shant","lets"],Possessive:["mine","something","none","anything","anyone","theirs","himself","ours","his","my","their","yours","your","our","its","herself","hers","themselves","myself","her"],Pronoun:["it","they","i","them","you","she","me","he","him","ourselves","us","we","thou","il","elle","yourself","'em","he's","she's"],QuestionWord:["where","why","when","who","whom","whose","what","which"],Adverb:e("./adverbs"),Expression:e("./expressions"),Person:["father","mother","mom","dad","mommy","daddy","sister","brother","aunt","uncle","grandfather","grandmother","cousin","stepfather","stepmother","boy","girl","man","woman","guy","dude","bro","gentleman","someone"]},i=Object.keys(a),o=0;o1&&(a[t]=!0);var r=n[e][t];a[r]=!0,a[r+"s"]=!0})}),a=Object.keys(a),t.exports={words:a,units:n}},{}],37:[function(e,t,r){"use strict";var n=e("./participles"),a={take:{PerfectTense:"have taken",pluPerfectTense:"had taken",FuturePerfect:"will have taken"},can:{Gerund:"",PresentTense:"can",PastTense:"could",FutureTense:"can",PerfectTense:"could",pluPerfectTense:"could",FuturePerfect:"can",Actor:""},free:{Gerund:"freeing",Actor:""},arise:{PastTense:"arose",Participle:"arisen"},babysit:{PastTense:"babysat",Actor:"babysitter"},be:{PastTense:"was",Participle:"been",PresentTense:"is",Actor:"",Gerund:"am"},is:{PastTense:"was",PresentTense:"is",Actor:"",Gerund:"being"},beat:{Gerund:"beating",Actor:"beater",Participle:"beaten"},begin:{Gerund:"beginning",PastTense:"began"},ban:{PastTense:"banned",Gerund:"banning",Actor:""},bet:{Actor:"better"},bind:{PastTense:"bound"},bite:{Gerund:"biting",PastTense:"bit"},bleed:{PastTense:"bled"},break:{PastTense:"broke"},breed:{PastTense:"bred"},bring:{PastTense:"brought"},broadcast:{PastTense:"broadcast"},build:{PastTense:"built"},buy:{PastTense:"bought"},catch:{PastTense:"caught"},choose:{Gerund:"choosing",PastTense:"chose"},cost:{PastTense:"cost"},deal:{PastTense:"dealt"},die:{PastTense:"died",Gerund:"dying"},dig:{Gerund:"digging",PastTense:"dug"},do:{PastTense:"did",PresentTense:"does"},draw:{PastTense:"drew"},drink:{PastTense:"drank",Participle:"drunk"},drive:{Gerund:"driving",PastTense:"drove"},eat:{Gerund:"eating",PastTense:"ate",Actor:"eater",Participle:"eaten"},fall:{PastTense:"fell"},feed:{PastTense:"fed"},feel:{PastTense:"felt",Actor:"feeler"},fight:{PastTense:"fought"},find:{PastTense:"found"},fly:{PastTense:"flew",Participle:"flown"},blow:{PastTense:"blew",Participle:"blown"},forbid:{PastTense:"forbade"},forget:{Gerund:"forgeting",PastTense:"forgot"},forgive:{Gerund:"forgiving",PastTense:"forgave"},freeze:{Gerund:"freezing",PastTense:"froze"},get:{PastTense:"got"},give:{Gerund:"giving",PastTense:"gave"},go:{PastTense:"went",PresentTense:"goes"},hang:{PastTense:"hung"},have:{Gerund:"having",PastTense:"had",PresentTense:"has"},hear:{PastTense:"heard"},hide:{PastTense:"hid"},hold:{PastTense:"held"},hurt:{PastTense:"hurt"},lay:{PastTense:"laid"},lead:{PastTense:"led"},leave:{PastTense:"left"},lie:{Gerund:"lying",PastTense:"lay"},light:{PastTense:"lit"},lose:{Gerund:"losing",PastTense:"lost"},make:{PastTense:"made"},mean:{PastTense:"meant"},meet:{Gerund:"meeting",PastTense:"met",Actor:"meeter"},pay:{PastTense:"paid"},read:{PastTense:"read"},ring:{PastTense:"rang"},rise:{PastTense:"rose",Gerund:"rising",pluPerfectTense:"had risen",FuturePerfect:"will have risen"},run:{Gerund:"running",PastTense:"ran"},say:{PastTense:"said"},see:{PastTense:"saw"},sell:{PastTense:"sold"},shine:{PastTense:"shone"},shoot:{PastTense:"shot"},show:{PastTense:"showed"},sing:{PastTense:"sang",Participle:"sung"},sink:{PastTense:"sank",pluPerfectTense:"had sunk"},sit:{PastTense:"sat"},slide:{PastTense:"slid"},speak:{PastTense:"spoke",PerfectTense:"have spoken",pluPerfectTense:"had spoken",FuturePerfect:"will have spoken"},spin:{Gerund:"spinning",PastTense:"spun"},spread:{PastTense:"spread"},stand:{PastTense:"stood"},steal:{PastTense:"stole",Actor:"stealer"},stick:{PastTense:"stuck"},sting:{PastTense:"stung"},stream:{Actor:"streamer"},strike:{Gerund:"striking",PastTense:"struck"},swear:{PastTense:"swore"},swim:{PastTense:"swam"},swing:{PastTense:"swung"},teach:{PastTense:"taught",PresentTense:"teaches"},tear:{PastTense:"tore"},tell:{PastTense:"told"},think:{PastTense:"thought"},understand:{PastTense:"understood"},wake:{PastTense:"woke"},wear:{PastTense:"wore"},win:{Gerund:"winning",PastTense:"won"},withdraw:{PastTense:"withdrew"},write:{Gerund:"writing",PastTense:"wrote",Participle:"written"},tie:{Gerund:"tying",PastTense:"tied"},ski:{PastTense:"skiied"},boil:{Actor:"boiler"},miss:{PresentTense:"miss"},act:{Actor:"actor"},compete:{Gerund:"competing",PastTense:"competed",Actor:"competitor"},being:{Gerund:"are",PastTense:"were",PresentTense:"are"},imply:{PastTense:"implied",PresentTense:"implies"},ice:{Gerund:"icing",PastTense:"iced"},develop:{PastTense:"developed",Actor:"developer",Gerund:"developing"},wait:{Gerund:"waiting",PastTense:"waited",Actor:"waiter"},aim:{Actor:"aimer"},spill:{PastTense:"spilt"},drop:{Gerund:"dropping",PastTense:"dropped"},log:{Gerund:"logging",PastTense:"logged"},rub:{Gerund:"rubbing",PastTense:"rubbed"},smash:{PresentTense:"smashes"},suit:{Gerund:"suiting",PastTense:"suited",Actor:"suiter"}};Object.keys(n).forEach(function(e){a[e]?a[e].Participle=n[e]:a[e]={Participle:n[e]}}),t.exports=a},{"./participles":38}],38:[function(e,t,r){"use strict";t.exports={become:"become",begin:"begun",bend:"bent",bet:"bet",bite:"bitten",bleed:"bled",brake:"broken",bring:"brought",build:"built",burn:"burned",burst:"burst",buy:"bought",catch:"caught",choose:"chosen",cling:"clung",come:"come",creep:"crept",cut:"cut",deal:"dealt",dig:"dug",dive:"dived",do:"done",draw:"drawn",dream:"dreamt",drive:"driven",eat:"eaten",fall:"fallen",feed:"fed",fight:"fought",flee:"fled",fling:"flung",forget:"forgotten",forgive:"forgiven",freeze:"frozen",got:"gotten",give:"given",go:"gone",grow:"grown",hang:"hung",have:"had",hear:"heard",hide:"hidden",hit:"hit",hold:"held",hurt:"hurt",keep:"kept",kneel:"knelt",know:"known",lay:"laid",lead:"led",leap:"leapt",leave:"left",lend:"lent",light:"lit",loose:"lost",make:"made",mean:"meant",meet:"met",pay:"paid",prove:"proven",put:"put",quit:"quit",read:"read",ride:"ridden",ring:"rung",rise:"risen",run:"run",say:"said",see:"seen",seek:"sought",sell:"sold",send:"sent",set:"set",sew:"sewn",shake:"shaken",shave:"shaved",shine:"shone",shoot:"shot",shut:"shut",seat:"sat",slay:"slain",sleep:"slept",slide:"slid",sneak:"snuck",speak:"spoken",speed:"sped",spend:"spent",spill:"spilled",spin:"spun",spit:"spat",split:"split",spring:"sprung",stink:"stunk",strew:"strewn",sware:"sworn",sweep:"swept",thrive:"thrived",throw:"thrown",undergo:"undergone",upset:"upset",weave:"woven",weep:"wept",wind:"wound",wring:"wrung"}},{}],39:[function(e,t,r){"use strict";var n=e("../fns"),a={prove:",im,ap,disap",serve:",de,ob,re",ress:"exp,p,prog,st,add,d",lect:"ref,se,neg,col,e",sist:"in,con,per,re,as",tain:"ob,con,main,s,re",mble:"rese,gru,asse,stu",ture:"frac,lec,tor,fea",port:"re,sup,ex,im",ate:"rel,oper,indic,cre,h,activ,estim,particip,d,anticip,evalu",use:",ca,over,ref,acc,am,pa",ive:"l,rece,d,arr,str,surv,thr,rel",are:"prep,c,comp,sh,st,decl,d,sc",ine:"exam,imag,determ,comb,l,decl,underm,def",nce:"annou,da,experie,influe,bou,convi,enha",ain:"tr,rem,expl,dr,compl,g,str",ent:"prev,repres,r,res,rel,inv",age:"dam,mess,man,encour,eng,discour",rge:"su,cha,eme,u,me",ise:"ra,exerc,prom,surpr,pra",ect:"susp,dir,exp,def,rej",ter:"en,mat,cen,ca,al",end:",t,dep,ext,att",est:"t,sugg,prot,requ,r",ock:"kn,l,sh,bl,unl",nge:"cha,excha,ra,challe,plu",ase:"incre,decre,purch,b,ce",ish:"establ,publ,w,fin,distingu",mit:"per,ad,sub,li",ure:"fig,ens,end,meas",der:"won,consi,mur,wan",
+ave:"s,sh,w,cr",ire:"requ,des,h,ret",tch:"scra,swi,ma,stre",ack:"att,l,p,cr",ion:"ment,quest,funct,envis",ump:"j,l,p,d",ide:"dec,prov,gu,s",ush:"br,cr,p,r",eat:"def,h,tr,ch",ash:"sm,spl,w,fl",rry:"ca,ma,hu,wo",ear:"app,f,b,disapp",er:"answ,rememb,off,suff,cov,discov,diff,gath,deliv,both,empow,with",le:"fi,sett,hand,sca,whist,enab,smi,ming,ru,sprink,pi",st:"exi,foreca,ho,po,twi,tru,li,adju,boa,contra,boo",it:"vis,ed,depos,sp,awa,inhib,cred,benef,prohib,inhab",nt:"wa,hu,pri,poi,cou,accou,confro,warra,pai",ch:"laun,rea,approa,sear,tou,ar,enri,atta",ss:"discu,gue,ki,pa,proce,cro,glo,dismi",ll:"fi,pu,ki,ca,ro,sme,reca,insta",rn:"tu,lea,conce,retu,bu,ea,wa,gove",ce:"redu,produ,divor,noti,for,repla",te:"contribu,uni,tas,vo,no,constitu,ci",rt:"sta,comfo,exe,depa,asse,reso,conve",ck:"su,pi,che,ki,tri,wre",ct:"intera,restri,predi,attra,depi,condu",ke:"sta,li,bra,overta,smo,disli",se:"collap,suppo,clo,rever,po,sen",nd:"mi,surrou,dema,remi,expa,comma",ve:"achie,invol,remo,lo,belie,mo",rm:"fo,perfo,confi,confo,ha",or:"lab,mirr,fav,monit,hon",ue:"arg,contin,val,iss,purs",ow:"all,foll,sn,fl,borr",ay:"pl,st,betr,displ,portr",ze:"recogni,reali,snee,ga,emphasi",ip:"cl,d,gr,sl,sk",re:"igno,sto,interfe,sco",ng:"spri,ba,belo,cli",ew:"scr,vi,revi,ch",gh:"cou,lau,outwei,wei",ly:"app,supp,re,multip",ge:"jud,acknowled,dod,alle",en:"list,happ,threat,strength",ee:"fors,agr,disagr,guarant",et:"budg,regr,mark,targ",rd:"rega,gua,rewa,affo",am:"dre,j,sl,ro",ry:"va,t,c,bu"},i=["abandon","accept","add","added","adopt","aid","appeal","applaud","archive","ask","assign","associate","assume","attempt","avoid","ban","become","bomb","cancel","claim","claw","come","control","convey","cook","copy","cut","deem","defy","deny","describe","design","destroy","die","divide","do","doubt","drag","drift","drop","echo","embody","enjoy","envy","excel","fall","fail","fix","float","flood","focus","fold","get","goes","grab","grasp","grow","happen","head","help","hold fast","hope","include","instruct","invest","join","keep","know","learn","let","lift","link","load","loan","look","make due","mark","melt","minus","multiply","name","need","occur","overcome","overlap","overwhelm","owe","pay","plan","plug","plus","pop","pour","proclaim","put","rank","reason","reckon","relax","repair","reply","reveal","revel","risk","rub","ruin","sail","seek","seem","send","set","shout","sleep","sneak","sort","spoil","stem","step","stop","study","take","talk","thank","took","trade","transfer","trap","travel","tune","undergo","undo","uplift","walk","watch","win","wipe","work","yawn","yield"];t.exports=n.uncompress_suffixes(i,a)},{"../fns":7}],40:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e("./tags/colors"),i={reset:"[0m",red:"[31m",green:"[32m",yellow:"[33m",blue:"[34m",magenta:"[35m",cyan:"[36m",black:"[30m"};"undefined"==typeof t&&Object.keys(i).forEach(function(e){i[e]=""}),r.ensureString=function(e){return"string"==typeof e?e:"number"==typeof e?""+e:""},r.ensureObject=function(e){return"object"!==("undefined"==typeof e?"undefined":n(e))?{}:null===e||e instanceof Array?{}:e},r.endsWith=function(e,t){return!(!e||e.substr(-t.length)!==t)},r.startsWith=function(e,t){return!(!e||!t||e.substr(0,t.length)!==t)},r.titleCase=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},r.flatten=function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t},r.copy=function(e){var t={};return e=r.ensureObject(e),Object.keys(e).forEach(function(r){t[r]=e[r]}),t},r.green=function(e){return i.green+e+i.reset},r.red=function(e){return i.red+e+i.reset},r.blue=function(e){return i.blue+e+i.reset},r.magenta=function(e){return i.magenta+e+i.reset},r.cyan=function(e){return i.cyan+e+i.reset},r.yellow=function(e){return i.yellow+e+i.reset},r.black=function(e){return i.black+e+i.reset},r.printTag=function(e){return a[e]?r[a[e]](e):e},r.printTerm=function(e){for(var t=Object.keys(e.tag),n=0;n "+a.printTag(t),n=a.leftPad(n,54),console.log(" "+n+"("+a.cyan(r||"")+")")}}}},{"../fns":40}],43:[function(e,t,r){"use strict";var n=e("./index"),a=e("./tokenize"),i=e("./paths").Terms,o=e("../term/methods/normalize/normalize").normalize,s=e("../tags"),u=function(e){return e=e||{},Object.keys(e).reduce(function(t,r){t[r]=e[r];var n=o(r);return r!==n&&(t[n]=e[r]),t},{})},l=function(e){console.log(e),console.log(s)},c=function(e,t,r){var o=a(e);t=u(t);var s=o.map(function(e){return i.fromString(e,t)});r&&l(r);var c=new n(s,t,null,r);return c.list.forEach(function(e){e.refText=c}),c};t.exports=c},{"../tags":156,"../term/methods/normalize/normalize":163,"./index":44,"./paths":56,"./tokenize":153}],44:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var r=0;r0}},{key:"length",get:function(){return this.list.length}},{key:"isA",get:function(){return"Text"}},{key:"parent",get:function(){return this.reference||this},set:function(e){return this.reference=e,this}},{key:"whitespace",get:function(){var e=this;return{before:function(t){return e.list.forEach(function(e){e.whitespace.before(t)}),e},after:function(t){return e.list.forEach(function(e){e.whitespace.after(t)}),e}}}}]),e}();t.exports=i,i=e("./methods/array")(i),i=e("./methods/loops")(i),i=e("./methods/match")(i),i=e("./methods/out")(i),i=e("./methods/sort")(i),i=e("./methods/split")(i),i=e("./methods/tag")(i),i=e("./methods/normalize")(i);var o={acronyms:e("./subset/acronyms"),adjectives:e("./subset/adjectives"),adverbs:e("./subset/adverbs"),clauses:e("./subset/clauses"),contractions:e("./subset/contractions"),dates:e("./subset/dates"),hashTags:e("./subset/hashTags"),nouns:e("./subset/nouns"),organizations:e("./subset/organizations"),people:e("./subset/people"),phoneNumbers:e("./subset/phoneNumbers"),places:e("./subset/places"),questions:e("./subset/sentences/questions"),quotations:e("./subset/quotations"),sentences:e("./subset/sentences"),statements:e("./subset/sentences/statements"),terms:e("./subset/terms"),topics:e("./subset/topics"),urls:e("./subset/urls"),values:e("./subset/values"),verbs:e("./subset/verbs"),ngrams:e("./subset/ngrams"),startGrams:e("./subset/ngrams/startGrams"),endGrams:e("./subset/ngrams/endGrams")};Object.keys(o).forEach(function(e){i.prototype[e]=function(t,r){var n=o[e],a=n.find(this,t,r);return new o[e](a.list,this.lexicon,this.parent)}})},{"./methods/array":45,"./methods/loops":46,"./methods/match":47,"./methods/normalize":48,"./methods/out":49,"./methods/sort":52,"./methods/split":54,"./methods/tag":55,"./subset/acronyms":57,"./subset/adjectives":59,"./subset/adverbs":67,"./subset/clauses":69,"./subset/contractions":73,"./subset/dates":75,"./subset/hashTags":85,"./subset/ngrams":89,"./subset/ngrams/endGrams":86,"./subset/ngrams/startGrams":90,"./subset/nouns":92,"./subset/organizations":101,"./subset/people":103,"./subset/phoneNumbers":105,"./subset/places":106,"./subset/quotations":108,"./subset/sentences":109,"./subset/sentences/questions":110,"./subset/sentences/statements":113,"./subset/terms":116,"./subset/topics":118,"./subset/urls":119,"./subset/values":120,"./subset/verbs":133}],45:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e("../../terms"),i=function(e){var t={clone:function(){var t=this.list.map(function(e){return e.clone()});return new e(t)},term:function(t){var r=this,n=this.list.map(function(e){var n=[],i=e.terms[t];return i&&(n=[i]),new a(n,r.lexicon,r.refText,r.refTerms)});return new e(n,this.lexicon,this.parent)},firstTerm:function(){return this.match("^.")},lastTerm:function(){return this.match(".$")},slice:function(e,t){return this.list=this.list.slice(e,t),this},get:function(t){if(!t&&0!==t||!this.list[t])return new e([],this.lexicon,this.parent);var r=this.list[t];return new e([r],this.lexicon,this.parent)},first:function(t){return t||0===t?new e(this.list.slice(0,t),this.lexicon,this.parent):this.get(0)},last:function(t){if(!t&&0!==t)return this.get(this.list.length-1);var r=this.list.length,n=r-t;return new e(this.list.slice(n,r),this.lexicon,this.parent)},concat:function(){for(var e=0;e0&&(r.whitespace.before=" "),r.whitespace.after=""}),e},case:function(e){return e.terms().list.forEach(function(e,t){var r=e.terms[0];0===t||r.tag.Person||r.tag.Place||r.tag.Organization?e.toTitleCase():e.toLowerCase()}),e},numbers:function(e){return e.values().toNumber()},punctuation:function(e){return e.terms().list.forEach(function(e,t){var r=e.terms[0];t"+r+"\n "},"");return" "+e+"\n"},terms:function(e){var t=[];return e.list.forEach(function(e){e.terms.forEach(function(e){t.push({text:e.text,normal:e.normal,tags:Object.keys(e.tag)})})}),t},debug:function(e){return console.log("===="),e.list.forEach(function(e){console.log(" --"),e.debug()}),e},topk:function(e){return n(e)}};i.plaintext=i.text,i.normalized=i.normal,i.colors=i.color,i.tags=i.terms,i.offset=i.offsets,i.frequency=i.topk,i.freq=i.topk,i.arr=i.array;var o=function(e){return e.prototype.out=function(e){return i[e]?i[e](this):i.text(this)},e.prototype.debug=function(){return i.debug(this)},e};t.exports=o},{"./offset":50,"./topk":51}],50:[function(e,t,r){"use strict";var n=function(e,t){for(var r=0,n=0;nt.count?-1:1}),t&&(n=n.splice(0,t)),n};t.exports=n},{}],52:[function(e,t,r){"use strict";var n=e("./methods"),a=function(e){var t={sort:function(t){return t=t||"alphabetical",t=t.toLowerCase(),t&&"alpha"!==t&&"alphabetical"!==t?"chron"===t||"chronological"===t?n.chron(this,e):"length"===t?n.lengthFn(this,e):"freq"===t||"frequency"===t?n.freq(this,e):"wordcount"===t?n.wordCount(this,e):this:n.alpha(this,e)},reverse:function(){return this.list=this.list.reverse(),this},unique:function(){var e={};return this.list=this.list.filter(function(t){var r=t.out("root");return!e[r]&&(e[r]=!0,!0)}),this}};return Object.keys(t).forEach(function(r){e.prototype[r]=t[r]}),e};t.exports=a},{"./methods":53}],53:[function(e,t,r){"use strict";var n=function(e){return e=e.sort(function(e,t){return e.index>t.index?1:e.index===t.index?0:-1}),e.map(function(e){return e.ts})};r.alpha=function(e){return e.list.sort(function(e,t){if(e===t)return 0;if(e.terms[0]&&t.terms[0]){if(e.terms[0].root>t.terms[0].root)return 1;if(e.terms[0].roott.out("root")?1:-1}),e},r.chron=function(e){var t=e.list.map(function(e){return{ts:e,index:e.termIndex()}});return e.list=n(t),e},r.lengthFn=function(e){var t=e.list.map(function(e){return{ts:e,index:e.chars()}});return e.list=n(t).reverse(),e},r.wordCount=function(e){var t=e.list.map(function(e){return{ts:e,index:e.length}});return e.list=n(t),e},r.freq=function(e){var t={};e.list.forEach(function(e){var r=e.out("root");t[r]=t[r]||0,t[r]+=1});var r=e.list.map(function(e){var r=t[e.out("root")]||0;return{ts:e,index:r*-1}});return e.list=n(r),e}},{}],54:[function(e,t,r){"use strict";var n=function(e){var t={splitAfter:function(e,t){var r=[];return this.list.forEach(function(n){n.splitAfter(e,t).forEach(function(e){r.push(e)})}),this.list=r,this},splitBefore:function(e,t){var r=[];return this.list.forEach(function(n){n.splitBefore(e,t).forEach(function(e){r.push(e)})}),this.list=r,this},splitOn:function(e,t){var r=[];return this.list.forEach(function(n){n.splitOn(e,t).forEach(function(e){r.push(e)})}),this.list=r,this}};return Object.keys(t).forEach(function(r){e.prototype[r]=t[r]}),e};t.exports=n},{}],55:[function(e,t,r){"use strict";var n=function(e){var t={tag:function(e,t){var r=this;return this.list.forEach(function(n){n.tagAs(e,t,r.tagSet)}),this},unTag:function(e,t){var r=this;return this.list.forEach(function(n){n.unTag(e,t,r.tagSet)}),this},canBe:function(e){var t=this;return this.list.forEach(function(r){r.terms=r.terms.filter(function(r){return r.canBe(e,t.tagSet)})}),this}};return Object.keys(t).forEach(function(r){e.prototype[r]=t[r]}),e};t.exports=n},{}],56:[function(e,t,r){"use strict";t.exports={fns:e("../fns"),log:e("../log"),data:e("../data"),Terms:e("../terms"),tags:e("../tags")}},{"../data":8,"../fns":40,"../log":42,"../tags":156,"../terms":176}],57:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var r=0;r0)},s=function(e){return!!(e&&e>1e3&&e<3e3)},u=function(e){var t={month:null,date:null,weekday:null,year:null,knownDate:null,timeOfDay:null},r=e.match("(#Holiday|today|tomorrow|yesterday)");if(r.found&&(t.knownDate=r.out("normal")),r=e.match("#Month"),r.found&&(t.month=i.index(r.list[0].terms[0])),r=e.match("#WeekDay"),r.found&&(t.weekday=a.index(r.list[0].terms[0])),r=e.match("#Time"),r.found&&(t.timeOfDay=n(e),e.not("#Time")),r=e.match("#Month #Value #Year"),r.found){var u=r.values().numbers();o(u[0])&&(t.date=u[0]);var l=parseInt(e.match("#Year").out("normal"),10);s(l)&&(t.year=l)}if(!r.found){if(r=e.match("#Month #Value"),r.found){var c=r.values().numbers(),f=c[0];o(f)&&(t.date=f)}if(r=e.match("#Month #Year"),r.found){var h=parseInt(e.match("#Year").out("normal"),10);s(h)&&(t.year=h)}}if(r=e.match("#Value of #Month"),r.found){var m=r.values().numbers()[0];o(m)&&(t.date=m)}return t};t.exports=u},{"./month":77,"./parseTime":82,"./weekday":84}],79:[function(e,t,r){"use strict";var n={year:!0,quarter:!0,month:!0,week:!0,weekend:!0,day:!0,hour:!0},a=function(e){var t=null,r={},a=e.match("#Value #Duration (from|after|following)");return a.found?t="forward":(a=e.match("#Value #Duration (before)"),a.found&&(t="backward")),a.found&&e.match("#Value #Duration").list.forEach(function(e){var t=e.match("*").values().data()[0]||{};if(t=t.number,t||0===t){var a=e.match("#Duration").nouns().toSingular().out("normal");n[a]&&(r[a]=t)}}),{direction:t,duration:r}};t.exports=a},{}],80:[function(e,t,r){"use strict";var n={this:"this",next:"next",last:"last",upcoming:"next"},a=function(e){var t="("+Object.keys(n).join("|")+")",r=e.match(t+"+").lastTerm();if(r.found){var a=r.match(t).out("normal");return n[a]}return null};t.exports=a},{}],81:[function(e,t,r){"use strict";var n={start:"start",end:"end",middle:"middle",beginning:"start",ending:"end",midpoint:"middle",midst:"middle"},a=function(e){var t="("+Object.keys(n).join("|")+")",r=e.match("the? "+t+" of");if(r.found){var a=r.match(t).out("normal");return n[a]}return null};t.exports=a},{}],82:[function(e,t,r){"use strict";var n=function(e){return!!(e&&e>0&&e<25)},a=function(e){return!!(e&&e>0&&e<60)},i=function(e){var t={logic:null,hour:null,minute:null,second:null,timezone:null},r=e.match("(by|before|for|during|at|until|after) #Time").firstTerm();r.found&&(t.logic=r.out("normal"));var i=e.match("#Time");return i.terms().list.forEach(function(e){var r=e.terms[0],i=r.text.match(/([12]?[0-9]) ?(am|pm)/i);i&&(t.hour=parseInt(i[1],10),"pm"===i[2]&&(t.hour+=12),n(t.hour)||(t.hour=null)),i=r.text.match(/([12]?[0-9]):([0-9][0-9]) ?(am|pm)?/i),i&&(t.hour=parseInt(i[1],10),t.minute=parseInt(i[2],10),a(t.minute)||(t.minute=null),"pm"===i[3]&&(t.hour+=12),n(t.hour)||(t.hour=null))}),t};t.exports=i},{}],83:[function(e,t,r){"use strict";r.longDays={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6},r.shortDays={sun:0,mon:1,tues:2,wed:3,thurs:4,fri:5,sat:6}},{}],84:[function(e,t,r){"use strict";var n=e("./data"),a=n.shortDays,i=n.longDays;t.exports={index:function(e){if(e.tag.WeekDay){if(void 0!==i[e.normal])return i[e.normal];if(void 0!==a[e.normal])return a[e.normal]}return null},toShortForm:function(e){if(e.tag.WeekDay&&void 0!==i[e.normal]){var t=Object.keys(a);e.text=t[i[e.normal]]}return e},toLongForm:function(e){if(e.tag.WeekDay&&void 0!==a[e.normal]){var t=Object.keys(i);e.text=t[a[e.normal]]}return e}}},{"./data":83}],85:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var r=0;rt.count?-1:e.count===t.count&&(e.size>t.size||e.key.length>t.key.length)?-1:1}),this}}],[{key:"find",value:function(e,r,n){var a={size:[1,2,3,4]};n&&(a.size=[n]);var i=u(e,a);return e=new t(i),e.sort(),"number"==typeof r&&(e=e.get(r)),e}}]),t}(s);t.exports=l},{"../../index":44,"./getGrams":87}],90:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var r=0;r3)};t.exports=u},{"../../../data":8,"./methods/data/indicators":95}],94:[function(e,t,r){"use strict";var n={hour:"an",heir:"an",heirloom:"an",honest:"an",honour:"an",honor:"an",uber:"an"},a={a:!0,e:!0,f:!0,h:!0,i:!0,l:!0,m:!0,n:!0,o:!0,r:!0,s:!0,x:!0},i=[/^onc?e/i,/^u[bcfhjkqrstn][aeiou]/i,/^eul/i],o=function(e){var t=e.normal;if(n.hasOwnProperty(t))return n[t];var r=t.substr(0,1);if(e.isAcronym()&&a.hasOwnProperty(r))return"an";for(var o=0;o1){var l=u.not("(#Acronym|#Honorific)");u.firstName=l.first(),u.lastName=l.last()}return s=u,a(u,s)}return i(t,e),o(t,[{key:"data",value:function(){return{text:this.out("text"),normal:this.out("normal"),firstName:this.firstName.out("normal"),
+middleName:this.middleName.out("normal"),lastName:this.lastName.out("normal"),genderGuess:this.guessGender(),pronoun:this.pronoun(),honorifics:this.honorifics.out("array")}}}]),o(t,[{key:"guessGender",value:function(){if(this.honorifics.match("(mr|mister|sr|sir|jr)").found)return l.tell("known male honorific"),"Male";if(this.honorifics.match("(mrs|miss|ms|misses|mme|mlle)").found)return l.tell("known female honorific"),"Female";if(this.firstName.match("#MaleName").found)return l.tell("known male name"),"Male";if(this.firstName.match("#FemaleName").found)return l.tell("known female name"),"Female";var e=this.firstName.out("normal");return u(e)}},{key:"pronoun",value:function(){var e=this.firstName.out("normal"),t=this.guessGender(e);return"Male"===t?"he":"Female"===t?"she":"they"}},{key:"root",value:function(){var e=this.firstName.out("root"),t=this.lastName.out("root");return e&&t?e+" "+t:t||e||this.out("root")}}]),t}(s);t.exports=c},{"../../paths":56,"./guessGender":102}],105:[function(e,t,r){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var r=0;ru[t].parents.length?-1:1:-1}),e[0]}},{key:"data",value:function(){var e=this.t;return{spaceBefore:e.whitespace.before,text:e.text,spaceAfter:e.whitespace.after,normal:e.normal,implicit:e.silent_term,bestTag:this.bestTag(),tags:Object.keys(e.tag)}}}]),t}(s);t.exports=c},{"../../paths":56}],118:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var r=0;r10&&r<20)return""+t+"th";var a={0:"th",1:"st",2:"nd",3:"rd"},i=""+t,o=i.slice(i.length-1,i.length);return i+=a[o]?a[o]:"th"};t.exports=a},{"../toNumber":127}],122:[function(e,t,r){"use strict";t.exports=e("../../paths")},{"../../paths":56}],123:[function(e,t,r){"use strict";var n=e("../toNumber"),a=e("../toText"),i=e("../../../paths").data.ordinalMap.toOrdinal,o=function(e){var t=n(e),r=a(t),o=r[r.length-1];return r[r.length-1]=i[o]||o,r.join(" ")};t.exports=o},{"../../../paths":56,"../toNumber":127,"../toText":131}],124:[function(e,t,r){"use strict";var n=function(e){if(!e&&0!==e)return null;e=""+e;for(var t=e.split("."),r=t[0],n=t.length>1?"."+t[1]:"",a=/(\d+)(\d{3})/;a.test(r);)r=r.replace(a,"$1,$2");return r+n};t.exports=n},{}],125:[function(e,t,r){"use strict";var n=e("../paths"),a=n.data.numbers,i=Object.assign({},a.ordinal.ones,a.cardinal.ones),o=Object.assign({},a.ordinal.teens,a.cardinal.teens),s=Object.assign({},a.ordinal.tens,a.cardinal.tens),u=Object.assign({},a.ordinal.multiples,a.cardinal.multiples);t.exports={ones:i,teens:o,tens:s,multiples:u}},{"../paths":122}],126:[function(e,t,r){"use strict";var n=function(e){for(var t=[{reg:/^(minus|negative)[\s\-]/i,mult:-1},{reg:/^(a\s)?half[\s\-](of\s)?/i,mult:.5}],r=0;rn[0]){var a=Math.floor(t/n[0]);t-=a*n[0],a&&r.push({unit:n[1],count:a})}}),r},a=function(e){for(var t=[["ninety",90],["eighty",80],["seventy",70],["sixty",60],["fifty",50],["forty",40],["thirty",30],["twenty",20]],r=["","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],n=[],a=0;a=t[a][1]&&(e-=t[a][1],n.push(t[a][0]));return r[e]&&n.push(r[e]),n},i=function(e){var t=["zero","one","two","three","four","five","six","seven","eight","nine"],r=[],n=(""+e).match(/\.([0-9]+)/);if(!n||!n[0])return r;r.push("point");for(var a=n[0].split(""),i=0;i1&&t.push("and")),t=t.concat(a(r[o].count)),t.push(s)}return t=t.concat(i(e)),t=t.filter(function(e){return e}),0===t.length&&(t[0]="zero"),t};t.exports=o},{}],132:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var r=0;r0&&(t.push(r[h]),r[h]="");return 0===t.length?[e]:t};t.exports=s},{"../data/index":8,"./paths":56}],154:[function(e,t,r){"use strict";var n={blue:["Noun","Plural","Singular","Pronoun","Possessive","Place","Person","City"],red:["Value","Ordinal","Cardinal","TextValue","NumericValue"],green:["Verb","Auxillary","Negative","PastTense","PresentTense","FutureTense","Modal","Infinitive","Gerund","Copula","Participle"],cyan:["Preposition","Conjunction","Determiner"],black:["Adjective","Adverb"]};t.exports=Object.keys(n).reduce(function(e,t){return n[t].forEach(function(r){e[r]=t}),e},{})},{}],155:[function(e,t,r){"use strict";var n=[["Noun","Verb","Adjective","Adverb","Determiner","Conjunction","Preposition","QuestionWord","Expression","Url","PhoneNumber","Email","Emoji"],["Person","Organization","Value","Place","Actor","Demonym","Pronoun"],["Plural","Singular"],["Plural","Person"],["Plural","Organization"],["Plural","Currency"],["Plural","Ordinal"],["MaleName","FemaleName"],["FirstName","LastName","Honorific"],["Comparative","Superlative"],["Value","Verb","Adjective"],["Ordinal","Cardinal"],["TextValue","NumericValue"],["NiceNumber","TextValue"],["Ordinal","Currency"],["PastTense","PerfectTense","Pluperfect","FuturePerfect","Copula","Modal","Participle","Infinitive","Gerund"],["Month","WeekDay","Year","Duration"],["Particle","Conjunction","Adverb","Preposition"],["Date","Verb","Adjective","Person"],["NounPhrase","VerbPhrase","AdjectivePhrase","ConditionalPhrase"],["Value","Determiner"],["Verb","NounPhrase"],["Noun","VerbPhrase"],["RomanNumeral","Fraction","NiceNumber"],["RomanNumeral","Money"],["UpperCase","TitleCase","CamelCase"]],a=function(e){for(var t=[],r=0;r1&&!e.normal.match(/[aeiouy]/i))return!1;if(e.normal.match(/[0-9]/)){if(e.normal.match(/[a-z][0-9][a-z]/))return!1;if(!e.normal.match(/^([$-])*?([0-9,\.])*?([s\$%])*?$/))return!1}return!0}};return Object.keys(t).forEach(function(r){e.prototype[r]=t[r]}),e};t.exports=n},{}],162:[function(e,t,r){"use strict";var n=e("./normalize").addNormal,a=e("./root"),i=function(e){var t={normalize:function(){return n(this),a(this),this}};return Object.keys(t).forEach(function(r){e.prototype[r]=t[r]}),e};t.exports=i},{"./normalize":163,"./root":164}],163:[function(e,t,r){"use strict";var n=e("./unicode");r.normalize=function(e){return e=e||"",e=e.toLowerCase(),e=e.trim(),e=n(e),e=e.replace(/^[#@]/,""),e=e.replace(/[\u2018\u2019\u201A\u201B\u2032\u2035]+/g,"'"),e=e.replace(/[\u201C\u201D\u201E\u201F\u2033\u2036"]+/g,""),e=e.replace(/\u2026/g,"..."),e.match(/^[:;]/)||(e=e.replace(/\.{3,}$/g,""),e=e.replace(/['",\.!:;\?\)]$/g,""),e=e.replace(/^['"\(]/g,"")),e},r.addNormal=function(e){var t=e._text||"";t=r.normalize(t),e.isAcronym()&&(t=t.replace(/\./g,"")),t=t.replace(/([0-9]),([0-9])/g,"$1$2"),e.normal=t}},{"./unicode":165}],164:[function(e,t,r){"use strict";var n=function(e){var t=e.normal||e.silent_term||"";t=t.replace(/'s\b/,""),t=t.replace(/'\b/,""),e.root=t};t.exports=n},{}],165:[function(e,t,r){"use strict";var n={"!":"¡","?":"¿Ɂ",a:"ªÀÁÂÃÄÅàáâãäåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧȺΆΑΔΛάαλАДадѦѧӐӑӒӓƛɅæ",b:"ßþƀƁƂƃƄƅɃΒβϐϦБВЪЬбвъьѢѣҌҍҔҕƥƾ",c:"¢©ÇçĆćĈĉĊċČčƆƇƈȻȼͻͼͽϲϹϽϾϿЄСсєҀҁҪҫ",d:"ÐĎďĐđƉƊȡƋƌǷ",e:"ÈÉÊËèéêëĒēĔĕĖėĘęĚěƎƏƐǝȄȅȆȇȨȩɆɇΈΕΞΣέεξϱϵ϶ЀЁЕЭеѐёҼҽҾҿӖӗӘәӚӛӬӭ",f:"ƑƒϜϝӺӻҒғӶӷſ",g:"ĜĝĞğĠġĢģƓǤǥǦǧǴǵ",h:"ĤĥĦħƕǶȞȟΉΗЂЊЋНнђћҢңҤҥҺһӉӊ",I:"ÌÍÎÏ",i:"ìíîïĨĩĪīĬĭĮįİıƖƗȈȉȊȋΊΐΪίιϊІЇії",j:"ĴĵǰȷɈɉϳЈј",k:"ĶķĸƘƙǨǩΚκЌЖКжкќҚқҜҝҞҟҠҡ",l:"ĹĺĻļĽľĿŀŁłƚƪǀǏǐȴȽΙӀӏ",m:"ΜϺϻМмӍӎ",n:"ÑñŃńŅņŇňʼnŊŋƝƞǸǹȠȵΝΠήηϞЍИЙЛПийлпѝҊҋӅӆӢӣӤӥπ",o:"ÒÓÔÕÖØðòóôõöøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱΌΘΟθοσόϕϘϙϬϭϴОФоѲѳӦӧӨөӪӫ¤ƍΏ",p:"ƤƿΡρϷϸϼРрҎҏÞ",q:"Ɋɋ",r:"ŔŕŖŗŘřƦȐȑȒȓɌɍЃГЯгяѓҐґ",s:"ŚśŜŝŞşŠšƧƨȘșȿςϚϛϟϨϩЅѕ",t:"ŢţŤťŦŧƫƬƭƮȚțȶȾΓΤτϮϯТт҂Ҭҭ",u:"µÙÚÛÜùúûüŨũŪūŬŭŮůŰűŲųƯưƱƲǓǔǕǖǗǘǙǚǛǜȔȕȖȗɄΰμυϋύϑЏЦЧцџҴҵҶҷӋӌӇӈ",v:"νѴѵѶѷ",w:"ŴŵƜωώϖϢϣШЩшщѡѿ",x:"×ΧχϗϰХхҲҳӼӽӾӿ",y:"ÝýÿŶŷŸƳƴȲȳɎɏΎΥΫγψϒϓϔЎУучўѰѱҮүҰұӮӯӰӱӲӳ",z:"ŹźŻżŽžƩƵƶȤȥɀΖζ"},a={};Object.keys(n).forEach(function(e){n[e].split("").forEach(function(t){a[t]=e})});var i=function(e){var t=e.split("");return t.forEach(function(e,r){a[e]&&(t[r]=a[e])}),t.join("")};t.exports=i},{}],166:[function(e,t,r){"use strict";var n=e("./renderHtml"),a=e("../../paths").fns,i={text:function(e){return e.whitespace.before+e._text+e.whitespace.after},normal:function(e){return e.normal},root:function(e){return e.root||e.normal},html:function(e){return n(e)},tags:function(e){return{text:e.text,normal:e.normal,tags:Object.keys(e.tag)}},debug:function(e){var t=Object.keys(e.tag).map(function(e){return a.printTag(e)}).join(", "),r=e.text;r="'"+a.yellow(r||"-")+"'",e.dirty;var n="";e.silent_term&&(n="["+e.silent_term+"]"),r=a.leftPad(r,25),r+=a.leftPad(n,5),console.log(" "+r+" - "+t)}},o=function(e){return e.prototype.out=function(e){return i[e]||(e="text"),i[e](this)},e};t.exports=o},{"../../paths":173,"./renderHtml":167}],167:[function(e,t,r){"use strict";var n=function(e){var t={"<":"<",">":">","&":"&",'"':""","'":"'"," ":" "};return e.replace(/[<>&"' ]/g,function(e){return t[e]})},a=function(e){var t="(?:[^\"'>]|\"[^\"]*\"|'[^']*')*",r=new RegExp("<(?:!--(?:(?:-*[^->])*--+|-?)|script\\b"+t+">[\\s\\S]*?[\\s\\S]*?","gi"),n=void 0;do n=e,e=e.replace(r,"");while(e!==n);return e.replace(/'+r+"";return n(e.whitespace.before)+i+n(e.whitespace.after)};t.exports=i},{}],168:[function(e,t,r){"use strict";var n=function(e){var t={endPunctuation:function(){var e=this.text.match(/[a-z]([,:;\/.(\.\.\.)\!\?]+)$/i);if(e){var t={",":"comma",":":"colon",";":"semicolon",".":"period","...":"elipses","!":"exclamation","?":"question"};if(t[e[1]])return e[1]}return null},setPunctuation:function(e){return this.text=this.text.replace(/[a-z]([,:;\/.(\.\.\.)\!\?]+)$/i,""),this.text+=e,this},hasComma:function(){return"comma"===this.endPunctuation()},killPunctuation:function(){return this.text=this._text.replace(/([,:;\/.(\.\.\.)\!\?]+)$/,""),this}};return Object.keys(t).forEach(function(r){e.prototype[r]=t[r]}),e};t.exports=n},{}],169:[function(e,t,r){"use strict";var n=e("./setTag"),a=e("./unTag"),i=e("./paths").tags,o=function(e){var t={tagAs:function(e,t){n(this,e,t)},unTag:function(e,t){a(this,e,t)},canBe:function(e){e=e||"",e=e.replace(/^#/,"");for(var t=i[e].not||[],r=0;r0&&(t[t.length-1]+=f),t.map(function(e){
+return new n(e)})};t.exports=i},{"../term":158}],176:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var r=0;r0}},{key:"length",get:function(){return this.terms.length}},{key:"isA",get:function(){return"Terms"}},{key:"refTerms",get:function(){return this._refTerms||this},set:function(e){return this._refTerms=e,this}},{key:"dirty",set:function(e){this.terms.forEach(function(t){t.dirty=e})}},{key:"parent",get:function(){return this.refText||this},set:function(e){return this.refText=e,this}},{key:"parentTerms",get:function(){return this.refTerms||this},set:function(e){return this.refTerms=e,this}},{key:"whitespace",get:function(){var e=this;return{before:function(t){return e.firstTerm().whitespace.before=t,e},after:function(t){return e.lastTerm().whitespace.after=t,e}}}}],[{key:"fromString",value:function(t,r){var n=o(t),a=new e(n,r,null);return a.terms.forEach(function(e){e.parentTerms=a}),a.posTag(),a}}]),e}();s=e("./match")(s),s=e("./match/not")(s),s=e("./methods/tag")(s),s=e("./methods/loops")(s),s=e("./methods/delete")(s),s=e("./methods/insert")(s),s=e("./methods/misc")(s),s=e("./methods/out")(s),s=e("./methods/replace")(s),s=e("./methods/split")(s),s=e("./methods/transform")(s),t.exports=s},{"./build":175,"./match":177,"./match/not":183,"./methods/delete":184,"./methods/insert":185,"./methods/loops":186,"./methods/misc":187,"./methods/out":188,"./methods/replace":189,"./methods/split":190,"./methods/tag":191,"./methods/transform":192,"./tagger":204}],177:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e("./lib/syntax"),i=e("./lib/startHere"),o=e("../../result/index"),s=function(e){var t=function(t,r){var n=t.terms.filter(function(e){return r[e.normal]});return n=n.map(function(r){return new e([r],t.lexicon,t.refText,t.refTerms)}),new o(n,t.lexicon,t.parent)},r=function(e,r){var n=r.reduce(function(e,t){return e[t]=!0,e},{});return t(e,n)},s=function(t,r,n){for(var s=[],u=a(r),l=0;l0);l++){var c=i(t,l,u,n);if(c){s.push(c);var f=c.length-1;l+=f}}return s=s.map(function(r){return new e(r,t.lexicon,t.refText,t.refTerms)}),new o(s,t.lexicon,t.parent)},u={match:function(e,a){if("string"==typeof e)return s(this,e,a);if("object"===("undefined"==typeof e?"undefined":n(e))){var i=Object.prototype.toString.call(e);if("[object Array]"===i)return r(this,e,a);if("[object Object]"===i)return t(this,e,a)}return this},matchOne:function(e){for(var t=a(e),r=0;r0);r++){var n=i(this,r,t);if(n)return n}return null},has:function(e){var t=this.matchOne(e);return!!t}};return Object.keys(u).forEach(function(t){e.prototype[t]=u[t]}),e};t.exports=s},{"../../result/index":44,"./lib/startHere":181,"./lib/syntax":182}],178:[function(e,t,r){"use strict";var n=e("./paths").fns,a=function(e,t){if(!e||!t)return!1;if(t.anyOne)return!0;if(t.tag){for(var r=0;r0)return null;if(f.ending&&u!==e.length-1&&!f.minMax)return null;if(r[l].astrix){if(!h)return e.terms.slice(t,e.length);var m=i(e,u,r[l+1]);if(!m)return null;u=m+1,l+=1}else if(r[l].minMax){if(!h){var p=e.length,d=r[l].minMax.max+t;return r[l].ending&&db.max)return null;u=g+1,l+=1}else if(f.optional){var v=r[l+1];u=o(e,u,f,v)}else if(a(c,f,s)){if(u+=1,f.consecutive){var y=r[l+1];u=o(e,u,f,y)}}else if(!c.silent_term||c.normal){var w=n(c,r,l);if(w)l=w,u+=1;else if(!f.optional)return null}else{if(0===l)return null;u+=1,l-=1}}return e.terms.slice(t,u)};t.exports=s},{"./isMatch":178,"./lumpMatch":179}],182:[function(e,t,r){"use strict";var n=e("./paths").fns,a=function(e){e=e||"",e=e.trim();var t={optional:!1};if(n.startsWith(e,"!")&&(e=e.substr(1,e.length),t.negative=!0),n.startsWith(e,"^")&&(e=e.substr(1,e.length),t.starting=!0),n.endsWith(e,"$")&&(e=e.replace(/\$$/,""),t.ending=!0),n.endsWith(e,"?")&&(e=e.replace(/\?$/,""),t.optional=!0),n.endsWith(e,"+")&&(e=e.replace(/\+$/,""),t.consecutive=!0),n.startsWith(e,"#")&&(e=e.replace(/^\#/,""),t.tag=[n.titleCase(e)],e=null),n.startsWith(e,"(")&&n.endsWith(e,")")&&(e=e.replace(/\)$/,""),e=e.replace(/^\(/,""),t.oneOf=e.split(/\|/g),e=null),n.startsWith(e,"{")&&n.endsWith(e,"}")){var r=e.match(/\{([0-9]+), ?([0-9]+)\}/);t.minMax={min:parseInt(r[1],10),max:parseInt(r[2],10)},e=null}return"."===e&&(t.anyOne=!0,e=null),"*"===e&&(t.astrix=!0,e=null),t.normal=e,t.normal&&(t.normal=t.normal.toLowerCase()),t},i=function(e){return e=e||"",e=e.split(/ +/),e.map(a)};t.exports=i},{"./paths":180}],183:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e("./lib/syntax"),i=e("./lib/startHere"),o=e("../../result/index"),s=function(e){var t={notObj:function(t,r){var n=[],a=[];return t.terms.forEach(function(e){r.hasOwnProperty(e.normal)?(a.length&&n.push(a),a=[]):a.push(e)}),a.length&&n.push(a),n=n.map(function(r){return new e(r,t.lexicon,t.refText,t.refTerms)}),new o(n,t.lexicon,t.parent)},notString:function(t,r,n){for(var s=[],u=a(r),l=[],c=0;c0&&(s.push(l),l=[]),c+=f.length-1):l.push(t.terms[c])}return l.length>0&&s.push(l),s=s.map(function(r){return new e(r,t.lexicon,t.refText,t.refTerms)}),new o(s,t.lexicon,t.parent)}};return t.notArray=function(e,r){var n=r.reduce(function(e,t){return e[t]=!0,e},{});return t.notObj(e,n)},e.prototype.not=function(e,r){if("object"===("undefined"==typeof e?"undefined":n(e))){var a=Object.prototype.toString.call(e);if("[object Array]"===a)return t.notArray(this,e,r);if("[object Object]"===a)return t.notObj(this,e,r)}return"string"==typeof e?t.notString(this,e,r):this},e};t.exports=s},{"../../result/index":44,"./lib/startHere":181,"./lib/syntax":182}],184:[function(e,t,r){"use strict";var n=e("../mutate"),a=function(e){var t={delete:function(e){if(!this.found)return this;if(!e)return this.parentTerms=n.deleteThese(this.parentTerms,this),this;var t=this.match(e);if(t.found){var r=n.deleteThese(this,t);return r}return this.parentTerms}};return Object.keys(t).forEach(function(r){e.prototype[r]=t[r]}),e};t.exports=a},{"../mutate":193}],185:[function(e,t,r){"use strict";var n=e("../mutate"),a=function(e,t){return e.terms.length&&e.terms[t]?(e.terms[t].whitespace.before=" ",e):e},i=function(e){var t=function(t){return"Terms"===t.isA?t:"Term"===t.isA?new e([t]):e.fromString(t)},r={insertBefore:function(e,r){var i=this.terms.length,o=t(e);r&&o.tagAs(r);var s=this.index();return a(this.parentTerms,s),s>0&&a(o,0),this.parentTerms.terms=n.insertAt(this.parentTerms.terms,s,o),this.terms.length===i&&(this.terms=o.terms.concat(this.terms)),this},insertAfter:function(e,r){var i=this.terms.length,o=t(e);r&&o.tagAs(r);var s=this.terms[this.terms.length-1].index();return a(o,0),this.parentTerms.terms=n.insertAt(this.parentTerms.terms,s+1,o),this.terms.length===i&&(this.terms=this.terms.concat(o.terms)),this},insertAt:function(e,r,i){e<0&&(e=0);var o=this.terms.length,s=t(r);return i&&s.tagAs(i),e>0&&a(s,0),this.parentTerms.terms=n.insertAt(this.parentTerms.terms,e,s),this.terms.length===o&&Array.prototype.splice.apply(this.terms,[e,0].concat(s.terms)),0===e&&(this.terms[0].whitespace.before="",s.terms[s.terms.length-1].whitespace.after=" "),this}};return Object.keys(r).forEach(function(t){e.prototype[t]=r[t]}),e};t.exports=i},{"../mutate":193}],186:[function(e,t,r){"use strict";var n=function(e){var t=[["toUpperCase","UpperCase"],["toLowerCase"],["toTitleCase","TitleCase"]];return t.forEach(function(t){var r=t[0],n=t[1],a=function(){var e=arguments;return this.terms.forEach(function(t){t[r].apply(t,e)}),n&&this.tagAs(n,r),this};e.prototype[r]=a}),e};t.exports=n},{}],187:[function(e,t,r){"use strict";var n=function(e){var t={term:function(e){return this.terms[e]},first:function(){var t=this.terms[0];return new e([t],this.lexicon,this.refText,this.refTerms)},last:function(){var t=this.terms[this.terms.length-1];return new e([t],this.lexicon,this.refText,this.refTerms)},slice:function(t,r){var n=this.terms.slice(t,r);return new e(n,this.lexicon,this.refText,this.refTerms)},endPunctuation:function(){return this.last().terms[0].endPunctuation()},canBe:function(e){e=e||"",e=e.replace(/^#/,"");for(var t=0;t0&&a[0]&&(a[0].whitespace.before=" "),Array.prototype.splice.apply(e,[t,0].concat(a)),e}},{}],194:[function(e,t,r){"use strict";t.exports={data:e("../data/index"),lexicon:e("../data/lexicon"),fns:e("../fns"),log:e("../log"),Term:e("../term")}},{"../data/index":8,"../data/lexicon":9,"../fns":40,"../log":42,"../term":158}],195:[function(e,t,r){"use strict";var n=e("./fix"),a={wanna:["want","to"],gonna:["going","to"],im:["i","am"],alot:["a","lot"],dont:["do","not"],dun:["do","not"],ive:["i","have"],"won't":["will","not"],wont:["will","not"],"can't":["can","not"],cant:["can","not"],cannot:["can","not"],aint:["is","not"],"ain't":["is","not"],"shan't":["should","not"],imma:["I","will"],"where'd":["where","did"],whered:["where","did"],"when'd":["when","did"],whend:["when","did"],"how'd":["how","did"],howd:["how","did"],"what'd":["what","did"],whatd:["what","did"],"let's":["let","us"],dunno:["do","not","know"],brb:["be","right","back"],gtg:["got","to","go"],irl:["in","real","life"],tbh:["to","be","honest"],imo:["in","my","opinion"],til:["today","i","learned"],rn:["right","now"]},i=function(e){for(var t=Object.keys(a),r=0;r0&&" - "===r.whitespace.before){var i=new a("");return i.silent_term="to",e.insertAt(t,i),e.terms[t-1].tagAs("NumberRange"),e.terms[t].tagAs("NumberRange"),e.terms[t].whitespace.before="",e.terms[t].whitespace.after="",e.terms[t+1].tagAs("NumberRange"),e}if(r.tag.NumberRange){var o=r.text.split(/(-)/);o[1]="to",e=n(e,o,t),e.terms[t].tagAs("NumberRange"),e.terms[t+1].tagAs("NumberRange"),e.terms[t+2].tagAs("NumberRange"),t+=2}}}return e};t.exports=i},{"../../../term":158,"./fix":199}],199:[function(e,t,r){"use strict";var n=e("../../../term"),a={not:"Negative",will:"Verb",would:"Modal",have:"Verb",are:"Copula",is:"Copula",am:"Verb"},i=function(e){a[e.silent_term]&&e.tagAs(a[e.silent_term])},o=function(e,t,r){var a=e.terms[r];a.silent_term=t[0],a.tagAs("Contraction","tagger-contraction");var o=new n("");if(o.silent_term=t[1],o.tagAs("Contraction","tagger-contraction"),e.insertAt(r+1,o),o.whitespace.before="",o.whitespace.after="",i(o),t[2]){var s=new n("");s.silent_term=t[2],e.insertAt(r+2,s),s.tagAs("Contraction","tagger-contraction"),i(s)}return e};t.exports=o},{"../../../term":158}],200:[function(e,t,r){"use strict";var n=e("./01-irregulars"),a=e("./02-hardOne"),i=e("./03-easyOnes"),o=e("./04-numberRange"),s=function(e){return e=n(e),e=a(e),e=i(e),e=o(e)};t.exports=s},{"./01-irregulars":195,"./02-hardOne":196,"./03-easyOnes":197,"./04-numberRange":198}],201:[function(e,t,r){"use strict";var n={re:!0,ve:!0,ll:!0,t:!0,s:!0,d:!0,m:!0},a=function(e){var t=e.text.match(/^([a-z]+)'([a-z][a-z]?)$/i);return t&&t[1]&&n[t[2]]?("t"===t[2]&&t[1].match(/[a-z]n$/)&&(t[1]=t[1].replace(/n$/,""),t[2]="n't"),e.tag.TitleCase&&(t[1]=t[1].replace(/^[a-z]/,function(e){return e.toUpperCase()})),{start:t[1],end:t[2]}):(t=e.text.match(/[a-z]s'$/i),t?{start:e.normal.replace(/s'?$/,""),end:""}:null)};t.exports=a},{}],202:[function(e,t,r){"use strict";var n=e("../paths").log,a="correction",i=e("./verb_corrections"),o=function(e){return n.here(a),e.match("so #Adjective").match("so").tag("Adverb","so-adv"),e.match("so #Noun").match("so").tag("Conjunction","so-conj"),e.match("do so").match("so").tag("Noun","so-noun"),e.match("still #Adjective").match("still").tag("Adverb","still-advb"),e.match("more #Noun").tag("Noun","more-noun"),e.match("still #Verb").term(0).tag("Adverb","still-verb"),e.match("second #Noun").term(0).unTag("Unit").tag("Ordinal","second-noun"),e.match("(foot|feet)").tag("Noun","foot-noun"),e.match("#Value (foot|feet)").match("(foot|feet)").tag("Unit","foot-unit"),e.match("how (#Copula|#Modal|#PastTense)").term(0).tag("QuestionWord","how-question"),e.match("will #Adjective").term(1).tag("Verb","will-adj"),e.match("u #Verb").term(0).tag("Pronoun","u-pronoun-1"),e.match("#Conjunction u").term(1).tag("Pronoun","u-pronoun-2"),e.match("is no #Verb").term(2).tag("Noun","is-no-verb"),e.match("the #Verb #Preposition .").match("#Verb").tag("Noun","correction-determiner1"),e.match("the #Verb").match("#Verb").tag("Noun","correction-determiner2"),e.match("the #Adjective #Verb").match("#Verb").tag("Noun","correction-determiner3"),e.match("the #Adverb #Adjective #Verb").match("#Verb").tag("Noun","correction-determiner4"),e.match("#Organization of the? #TitleCase").tag("Organization","org-of-place"),e.match("#Organization #Country").tag("Organization","org-country"),e.match("(world|global|international|national|#Demonym) #Organization").tag("Organization","global-org"),e.match("#TitleCase (ltd|co|inc|dept|assn|bros)").tag("Organization","org-abbrv"),e.match("#Determiner #Verb of").term(1).tag("Noun","the-verb-of"),e.match("#Noun #Adverb #Noun").term(2).tag("Verb","correction"),e.match("#Copula #Adjective to #Verb").match("#Adjective to").tag("Verb","correction"),e.match("#Verb than").term(0).tag("Noun","correction"),e.match("#Possessive #Verb").term(1).tag("Noun","correction-possessive"),e.match("just like").term(1).tag("Preposition","like-preposition"),e.match("#Noun like #Noun").term(1).tag("Preposition","noun-like"),e.match("#Verb like").term(1).tag("Adverb","verb-like"),e.match("#Adverb like").term(1).tag("Adverb","adverb-like"),e.match("#Determiner #Noun of #Verb").match("#Verb").tag("Noun","noun-of-noun"),e.match("#Adjective #PresentTense").term(1).tag("Noun","adj-presentTense"),e.match("#Possessive #FirstName").term(1).unTag("Person","possessive-name"),e.match("(a|an) (#Duration|#Value)").ifNo("#Plural").term(0).tag("Value","a-is-one"),e.match("half a? #Value").tag("Value","half-a-value"),e.match("#Value and a (half|quarter)").tag("Value","value-and-a-half"),e.match("#Value").match("!#Ordinal").tag("#Cardinal","not-ordinal"),e.match("#Value+ #Currency").tag("Money","value-currency"),e.match("#Money and #Money #Currency?").tag("Money","money-and-money"),e.match("holy (shit|fuck|hell)").tag("Expression","swears-expression"),e.match("#Determiner (shit|damn|hell)").term(1).tag("Noun","swears-noun"),e.match("(shit|damn|fuck) (#Determiner|#Possessive|them)").term(0).tag("Verb","swears-verb"),e.match("#Copula fucked up?").not("#Copula").tag("Adjective","swears-adjective"),e=i(e)};t.exports=o},{"../paths":209,"./verb_corrections":203}],203:[function(e,t,r){"use strict";var n=function(e){var t="(#Adverb|not)+?";return e.match("(has|had) "+t+" #PastTense").not("#Verb$").tag("Auxillary","had-walked"),e.match("#Copula "+t+" #Gerund").not("#Verb$").tag("Auxillary","copula-walking"),e.match("(be|been) "+t+" #Gerund").not("#Verb$").tag("Auxillary","be-walking"),e.match("(#Modal|did) "+t+" #Verb").not("#Verb$").tag("Auxillary","modal-verb"),e.match("#Modal "+t+" have "+t+" had "+t+" #Verb").not("#Verb$").tag("Auxillary","would-have"),e.match("(#Modal) "+t+" be "+t+" #Verb").not("#Verb$").tag("Auxillary","would-be"),e.match("(#Modal|had|has) "+t+" been "+t+" #Verb").not("#Verb$").tag("Auxillary","would-be"),e};t.exports=n},{}],204:[function(e,t,r){"use strict";var n={interpret:e("./contraction")},a={lexicon_lump:e("./lumper/lexicon_lump"),lump_two:e("./lumper/lump_two"),lump_three:e("./lumper/lump_three")},i={punctuation_step:e("./steps/01-punctuation_step"),lexicon_step:e("./steps/02-lexicon_step"),capital_step:e("./steps/03-capital_step"),web_step:e("./steps/04-web_step"),suffix_step:e("./steps/05-suffix_step"),neighbour_step:e("./steps/06-neighbour_step"),noun_fallback:e("./steps/07-noun_fallback"),date_step:e("./steps/08-date_step"),auxillary_step:e("./steps/09-auxillary_step"),negation_step:e("./steps/10-negation_step"),phrasal_step:e("./steps/12-phrasal_step"),comma_step:e("./steps/13-comma_step"),possessive_step:e("./steps/14-possessive_step"),value_step:e("./steps/15-value_step"),acronym_step:e("./steps/16-acronym_step"),emoji_step:e("./steps/17-emoji_step"),person_step:e("./steps/18-person_step"),quotation_step:e("./steps/19-quotation_step"),organization_step:e("./steps/20-organization_step"),plural_step:e("./steps/21-plural_step")},o=e("./corrections"),s=e("./phrase"),u=function(e){e=i.punctuation_step(e),e=i.emoji_step(e),e=a.lexicon_lump(e),e=i.lexicon_step(e),e=i.web_step(e),e=i.suffix_step(e),e=i.neighbour_step(e),e=i.capital_step(e),e=i.noun_fallback(e),e=n.interpret(e),e=i.date_step(e),e=i.auxillary_step(e),e=i.negation_step(e),e=i.phrasal_step(e),e=i.comma_step(e),e=i.possessive_step(e),e=i.value_step(e),e=i.acronym_step(e),e=i.person_step(e),e=i.quotation_step(e),e=i.organization_step(e),e=i.plural_step(e);for(var t=0;t<3;t++)e=a.lump_three(e),e=a.lump_two(e);return e=o(e),e=s(e)};t.exports=u},{"./contraction":200,"./corrections":202,"./lumper/lexicon_lump":206,"./lumper/lump_three":207,"./lumper/lump_two":208,"./phrase":211,"./steps/01-punctuation_step":212,"./steps/02-lexicon_step":213,"./steps/03-capital_step":214,"./steps/04-web_step":215,"./steps/05-suffix_step":216,"./steps/06-neighbour_step":217,"./steps/07-noun_fallback":218,"./steps/08-date_step":219,"./steps/09-auxillary_step":220,"./steps/10-negation_step":221,"./steps/12-phrasal_step":222,"./steps/13-comma_step":223,"./steps/14-possessive_step":224,"./steps/15-value_step":225,"./steps/16-acronym_step":226,"./steps/17-emoji_step":227,"./steps/18-person_step":228,"./steps/19-quotation_step":229,"./steps/20-organization_step":230,"./steps/21-plural_step":231}],205:[function(e,t,r){"use strict";var n=e("../paths"),a=n.Term,i=n.log,o="tagger/combine",s=function(e,t){var r=e.whitespace.before+e.text+e.whitespace.after;return r+=t.whitespace.before+t.text+t.whitespace.after},u=function(e,t){var r=e.terms[t],n=e.terms[t+1];if(n){i.tell('--combining: "'+r.normal+'"+"'+n.normal+'"',o);var u=s(r,n);e.terms[t]=new a(u,r.context),e.terms[t].normal=r.normal+" "+n.normal,e.terms[t+1]=null,e.terms=e.terms.filter(function(e){return null!==e})}};t.exports=u},{"../paths":209}],206:[function(e,t,r){"use strict";var n=e("./combine"),a=e("../paths"),i=a.log,o=a.lexicon,s=a.fns,u="tagger/multiple",l=function(e,t,r){for(var a=0;ae.length)return!1}return!1},f=function(e){i.here(u);for(var t=e.lexicon||{},r=0;r1&&t.match(/^[IVXCM]+$/))},s={a:!0,i:!0,u:!0,r:!0,c:!0,k:!0},u=function(e){return n.here(i),e.terms.forEach(function(e){var t=e.text;t.match(/^[A-Z][a-z']/)&&e.tagAs("TitleCase","punct-rule"),t=t.replace(/[,\.\?]$/,"");for(var r=0;r1&&(t=u(l[l.length-1],e))&&n.tagAs(t,"multiword-lexicon")}}}return e};t.exports=l},{"../contraction/split":201,"../paths":209}],214:[function(e,t,r){"use strict";var n=e("../paths").log,a="tagger/capital",i=function(e){n.here(a);for(var t=1;t1e3&&e<3e3)},c=function(e){n.here(a),e.match("#Month #DateRange+").tag("Date","correction-numberRange"),e.match(i+" (#Determiner|#Value|#Date)").term(0).tag("Month","correction-may"),e.match("#Date "+i).term(1).tag("Month","correction-may"),e.match(o+" "+i).term(1).tag("Month","correction-may"),e.match("(next|this|last) "+i).term(1).tag("Month","correction-may"),e.match("#Value #Abbreviation").tag("Value","value-abbr"),e.match("a #Value").tag("Value","a-value"),e.match("(minus|negative) #Value").tag("Value","minus-value"),e.match("#Value grand").tag("Value","value-grand"),e.match("(half|quarter) #Ordinal").tag("Value","half-ordinal"),e.match("(hundred|thousand|million|billion|trillion) and #Value").tag("Value","magnitude-and-value"),e.match("#Value point #Value").tag("Value","value-point-value"),e.match("#Cardinal #Time").tag("Time","value-time"),e.match("(by|before|after|at|@|about) #Time").tag("Time","preposition-time"),e.match("(#Value|#Time) (am|pm)").tag("Time","value-ampm"),e.match("all day").tag("Time","all-day"),e.match(o+"? "+s+" (spring|summer|winter|fall|autumn)").tag("Date","thisNext-season"),e.match("the? "+u+" of (spring|summer|winter|fall|autumn)").tag("Date","section-season"),e.match("#Date the? #Ordinal").tag("Date","correction-date"),e.match("#Value of? #Month").tag("Date","value-of-month"),e.match("#Cardinal #Month").tag("Date","cardinal-month"),e.match("#Month #Value to #Value").tag("Date","value-to-value"),e.match(s+" #Date").tag("Date","thisNext-date"),e.match(o+"? #Value #Duration").tag("Date","value-duration"),e.match("due? (by|before|after|until) #Date").tag("Date","by-date"),e.match("#Date (by|before|after|at|@|about) #Cardinal").not("^#Date").tag("Time","date-before-Cardinal"),e.match("#Time (eastern|pacific|central|mountain)").term(1).tag("Time","timezone"),e.match("#Time (est|pst|gmt)").term(1).tag("Time","timezone abbr"),e.match("#Date (am|pm)").term(1).unTag("Verb").unTag("Copula").tag("Time","date-am"),e.match("at night").tag("Time","at-night"),e.match("in the (night|evening|morning|afternoon|day|daytime)").tag("Time","in-the-night"),e.match("(early|late) (at|in)? the? (night|evening|morning|afternoon|day|daytime)").tag("Time","early-evening"),e.match("#Month #Value #Cardinal").tag("Date","month-value-cardinal"),e.match("(last|next|this|previous|current|upcoming|coming|the) #Date").tag("Date","next-feb"),e.match("#Date #Value").tag("Date","date-value"),e.match("#Value #Date").tag("Date","value-date"),e.match("#Date #Preposition #Date").tag("Date","date-prep-date"),e.match("#Value #Duration #Conjunction").tag("Date","val-duration-conjunction"),e.match("the? "+u+" of #Date").tag("Date","section-of-date");var t=e.match("#Date #Value #Cardinal").lastTerm().values(),r=t.numbers()[0];return l(r)&&t.tag("Year","date-value-year"),t=e.match("#Date+ #Cardinal").lastTerm().values(),r=t.numbers()[0],l(r)&&t.tag("Year","date-year"),t=e.match("#Month #Value #Cardinal").lastTerm().values(),r=t.numbers()[0],l(r)&&t.tag("Year","date-year2"),t=e.match("#Month #Value to #Value #Cardinal").lastTerm().values(),r=t.numbers()[0],l(r)&&t.tag("Year","date-year3"),t=e.match("(in|of|by|during|before|starting|ending|for|year) #Cardinal").lastTerm().values(),r=t.numbers()[0],l(r)&&t.tag("Year","preposition-year"),e.match("#Duration in #Date").tag("Date","duration-in-date"),e};t.exports=c},{"../paths":209}],220:[function(e,t,r){"use strict";var n=e("../paths").log,a="tagger/auxillary",i={do:!0,"don't":!0,does:!0,"doesn't":!0,will:!0,wont:!0,"won't":!0,have:!0,"haven't":!0,had:!0,"hadn't":!0,not:!0},o=function(e){n.here(a);for(var t=0;t0&&l.tag.Conjunction)u=!0;else{if(l.tag[n]){if(l.tag.Comma){s+=1,o=0;continue}if(s>0&&u)return i(e,r,t),!0}if(o+=1,o>5)return!1}}return!1},s=function(e){for(var t=0;t35)))},s=function(e){var t=e.text.replace(/^[:;]/,":");return t=t.replace(/[:;]$/,":"),i[t]},u=function(e){for(var t=0;t8));o++)if(e.terms[t+o].text.match(/.["'\u201D\u2036\u2019]([;:,.])?$/)){i(e,t,o+t),t+=o;break}}return e};t.exports=o},{"../paths":209}],230:[function(e,t,r){"use strict";var n=e("../paths").log,a="tagger/organization_step",i=e("../paths").data.orgWords;i=i.reduce(function(e,t){return e[t]=!0,e},{});var o=function(e){return!!e.tag.Noun&&(!(e.tag.Pronoun||e.tag.Comma||e.tag.Possessive)&&!(!e.tag.TitleCase&&!e.tag.Organization))},s=function(e){n.here(a);for(var t=0;t (http://spencermounta.in)",
"name": "compromise",
"description": "natural language processing in the browser",
- "version": "7.0.17",
+ "version": "7.0.18",
"main": "./builds/compromise.js",
"repository": {
"type": "git",