Skip to content

Instantly share code, notes, and snippets.

@kirbysayshi
Created May 5, 2014 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kirbysayshi/11529127 to your computer and use it in GitHub Desktop.
Save kirbysayshi/11529127 to your computer and use it in GitHub Desktop.
requirebin sketch
var nlp = require('nlp_compromise')
var sentences = nlp.pos('Cats always follow the player');
console.log(sentences);
sentences[0].tokens.forEach(function(part) {
console.log(part.pos.tag, part.pos.description, part.normalised, part.pos_reason)
});
require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({eCrcRd:[function(require,module,exports){exports.sentences=require("./lib/tokenization/sentence").sentences;exports.tokenize=require("./lib/tokenization/tokenize").tokenize;exports.ngram=require("./lib/tokenization/ngram").ngram;exports.syllables=require("./lib/hyphenization/syllable").syllables;var l=require("./lib/localization/britishize");exports.americanize=l.americanize;exports.britishize=l.britishize;exports.noun={singularize:require("./lib/conjugation/noun/inflect").singularize,pluralize:require("./lib/conjugation/noun/inflect").pluralize};exports.adjective={to_noun:require("./lib/conjugation/adjective/to_noun").adj_to_noun};exports.verb={conjugate:require("./lib/conjugation/verb/conjugate").conjugate};exports.dates=require("./lib/mining/date_parser");var l=require("./lib/transliteration/unicode_normalisation");exports.normalize=l.normalize;exports.denormalize=l.denormalize;exports.pos=require("./lib/pos/pos").pos;exports.tests=require("./test")},{"./lib/conjugation/adjective/to_noun":3,"./lib/conjugation/noun/inflect":4,"./lib/conjugation/verb/conjugate":5,"./lib/hyphenization/syllable":7,"./lib/localization/britishize":8,"./lib/mining/date_parser":9,"./lib/pos/pos":15,"./lib/tokenization/ngram":17,"./lib/tokenization/sentence":18,"./lib/tokenization/tokenize":19,"./lib/transliteration/unicode_normalisation":20,"./test":21}],nlp_compromise:[function(require,module,exports){module.exports=require("eCrcRd")},{}],3:[function(require,module,exports){var adj_to_noun=function(){var main=function(w){var irregulars;irregulars={clean:"cleanliness",naivety:"naivety"};if(!w){return""}if(irregulars[w]){return irregulars[w]}if(w.match(" ")){return w}if(w.match(/w$/)){return w}if(w.match(/y$/)){return w.replace(/y$/,"iness")}if(w.match(/le$/)){return w.replace(/le$/,"ility")}if(w.match(/ial$/)){return w.replace(/ial$/,"y")}if(w.match(/al$/)){return w.replace(/al$/,"ality")}if(w.match(/ting$/)){return w.replace(/ting$/,"ting")}if(w.match(/ring$/)){return w.replace(/ring$/,"ring")}if(w.match(/bing$/)){return w.replace(/bing$/,"bingness")}if(w.match(/ning$/)){return w.replace(/ning$/,"ningness")}if(w.match(/sing$/)){return w.replace(/sing$/,"se")}if(w.match(/ing$/)){return w.replace(/ing$/,"ment")}if(w.match(/ess$/)){return w.replace(/ess$/,"essness")}if(w.match(/ous$/)){return w.replace(/ous$/,"ousness")}if(w.match(/s$/)){return w}return w+"ness"};if(typeof module!=="undefined"&&module.exports){exports.adj_to_noun=main}return main}()},{}],4:[function(require,module,exports){var inflect=function(){var irregulars=[["child","children"],["person","people"],["man","men"],["database","databases"],["quiz","quizzes"],["child","children"],["stomach","stomachs"],["sex","sexes"],["move","moves"],["shoe","shoes"],["goose","geese"],["phenomenon","phenomena"],["barracks","barracks"],["deer","deer"],["syllabus","syllabi"],["index","indices"],["appendix","appendices"],["criterion","criteria"],["i","we"],["person","people"],["man","men"],["child","children"],["move","moves"],["she","they"],["he","they"],["myself","ourselves"],["yourself","yourselves"],["himself","themselves"],["herself","themselves"],["themself","themselves"],["mine","ours"],["hers","theirs"],["his","theirs"],["its","theirs"],["theirs","theirs"],["sex","sexes"],["photo","photos"],["video","videos"],["narrative","narratives"],["rodeo","rodeos"],["gas","gases"],["epoch","epochs"],["zero","zeros"],["avocado","avocados"],["halo","halos"],["tornado","tornados"],["tuxedo","tuxedos"],["sombrero","sombreros"]];var uncountables={aircraft:1,bass:1,bison:1,fowl:1,halibut:1,moose:1,salmon:1,spacecraft:1,tuna:1,trout:1,advice:1,help:1,information:1,knowledge:1,trouble:1,work:1,enjoyment:1,fun:1,recreation:1,relaxation:1,meat:1,rice:1,bread:1,cake:1,coffee:1,ice:1,water:1,oil:1,grass:1,hair:1,fruit:1,wildlife:1,equipment:1,machinery:1,furniture:1,mail:1,luggage:1,jewelry:1,clothing:1,money:1,mathematics:1,economics:1,physics:1,civics:1,ethics:1,mumps:1,measles:1,news:1,tennis:1,baggage:1,currency:1,travel:1,soap:1,toothpaste:1,food:1,sugar:1,butter:1,flour:1,progress:1,research:1,leather:1,wool:1,wood:1,coal:1,weather:1,homework:1,cotton:1,silk:1,patience:1,impatience:1,talent:1,energy:1,experience:1,vinegar:1,polish:1,air:1,alcohol:1,anger:1,art:1,beef:1,blood:1,cash:1,chaos:1,cheese:1,chewing:1,conduct:1,confusion:1,courage:1,damage:1,education:1,electricity:1,entertainment:1,fiction:1,forgiveness:1,gold:1,gossip:1,ground:1,happiness:1,history:1,honey:1,hope:1,hospitality:1,importance:1,jam:1,justice:1,laughter:1,leisure:1,lightning:1,literature:1,love:1,luck:1,melancholy:1,milk:1,mist:1,music:1,noise:1,oxygen:1,paper:1,pay:1,peace:1,peanut:1,pepper:1,petrol:1,plastic:1,pork:1,power:1,pressure:1,rain:1,recognition:1,sadness:1,safety:1,salt:1,sand:1,scenery:1,shopping:1,silver:1,snow:1,softness:1,space:1,speed:1,steam:1,sunshine:1,tea:1,thunder:1,time:1,traffic:1,trousers:1,violence:1,warmth:1,washing:1,wind:1,wine:1,steel:1,soccer:1,hockey:1,golf:1,fish:1,gum:1,liquid:1,series:1,sheep:1,species:1};var pluralize_rules=[{reg:/(ax|test)is$/i,repl:"$1es"},{reg:/(octop|vir|radi|nucle|fung|cact|stimul)us$/i,repl:"$1i"},{reg:/(octop|vir)i$/i,repl:"$1i"},{reg:/([rl])f$/i,repl:"$1ves"},{reg:/(alias|status)$/i,repl:"$1es"},{reg:/(bu)s$/i,repl:"$1ses"},{reg:/(al|ad|at|er|et|ed|ad)o$/i,repl:"$1oes"},{reg:/([ti])um$/i,repl:"$1a"},{reg:/([ti])a$/i,repl:"$1a"},{reg:/sis$/i,repl:"ses"},{reg:/(?:([^f])fe|([lr])f)$/i,repl:"$1ves"},{reg:/(hive)$/i,repl:"$1s"},{reg:/([^aeiouy]|qu)y$/i,repl:"$1ies"},{reg:/(x|ch|ss|sh|s|z)$/i,repl:"$1es"},{reg:/(matr|vert|ind|cort)(ix|ex)$/i,repl:"$1ices"},{reg:/([m|l])ouse$/i,repl:"$1ice"},{reg:/([m|l])ice$/i,repl:"$1ice"},{reg:/^(ox)$/i,repl:"$1en"},{reg:/^(oxen)$/i,repl:"$1"},{reg:/(quiz)$/i,repl:"$1zes"},{reg:/(antenn|formul|nebul|vertebr|vit)a$/i,repl:"$1ae"},{reg:/(sis)$/i,repl:"ses"},{reg:/^(?!talis|.*hu)(.*)man$/i,repl:"$1men"},{reg:/(.*)/i,repl:"$1s"}];var pluralize=function(str){var low=str.toLowerCase();if(uncountables[low]){return str}var found=irregulars.filter(function(r){return r[0]==low});if(found[0]){if(low==str){return found[0][1]}else{return found[0][1].charAt(0).toUpperCase()+string.slice(1)}}for(var i in pluralize_rules){if(str.match(pluralize_rules[i].reg)){return str.replace(pluralize_rules[i].reg,pluralize_rules[i].repl)}}};var singularize_rules=[{reg:/([^v])ies$/i,repl:"$1y"},{reg:/ises$/i,repl:"isis"},{reg:/ives$/i,repl:"ife"},{reg:/(antenn|formul|nebul|vertebr|vit)ae$/i,repl:"$1a"},{reg:/(octop|vir|radi|nucle|fung|cact|stimul)(i)$/i,repl:"$1us"},{reg:/(buffal|tomat|tornad)(oes)$/i,repl:"$1o"},{reg:/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i,repl:"$1sis"},{reg:/(vert|ind|cort)(ices)$/i,repl:"$1ex"},{reg:/(matr|append)(ices)$/i,repl:"$1ix"},{reg:/(x|ch|ss|sh|s|z|o)es$/i,repl:"$1"},{reg:/men$/i,repl:"man"},{reg:/(n)ews$/i,repl:"$1ews"},{reg:/([ti])a$/i,repl:"$1um"},{reg:/([^f])ves$/i,repl:"$1fe"},{reg:/([lr])ves$/i,repl:"$1f"},{reg:/([^aeiouy]|qu)ies$/i,repl:"$1y"},{reg:/(s)eries$/i,repl:"$1eries"},{reg:/(m)ovies$/i,repl:"$1ovie"},{reg:/([m|l])ice$/i,repl:"$1ouse"},{reg:/(cris|ax|test)es$/i,repl:"$1is"},{reg:/(alias|status)es$/i,repl:"$1"},{reg:/s$/i,repl:""}];var singularize=function(str){var low=str.toLowerCase();if(uncountables[low]){return str}var found=irregulars.filter(function(r){return r[1]==low});if(found[0]){if(low==str){return found[0][0]}else{return found[0][0].charAt(0).toUpperCase()+string.slice(1)}}for(var i in singularize_rules){if(str.match(singularize_rules[i].reg)){return str.replace(singularize_rules[i].reg,singularize_rules[i].repl)}}};var methods={singularize:singularize,pluralize:pluralize};if(typeof module!=="undefined"&&module.exports){module.exports=methods}return methods}()},{}],5:[function(require,module,exports){var conjugate=function(){if(typeof module!=="undefined"&&module.exports){rules=require("./rules").rules}var irregulars=[{infinitive:"go",present:"goes",gerund:"going",past:"went"},{infinitive:"be",present:"is",gerund:"being",past:"were"},{infinitive:"be",present:"am",gerund:"is",past:"was"}];var fallback=function(w){var infinitive=w;var present,past,gerund;if(w.match(/[^aeiou]$/)){gerund=w+"ing";past=w+"ed";present=w+"s"}else{gerund=w.replace(/[aeiou]$/,"ing");past=w.replace(/[aeiou]$/,"ed");present=w.replace(/[aeiou]$/,"es")}return{infinitive:infinitive,present:present,past:past,gerund:gerund}};var main=function(w){if(!w){return{}}for(var i=0;i<irregulars.length;i++){var x=irregulars[i];if(w==x.present||w==x.gerund||w==x.past||w==x.infinitive){return irregulars[i]}}var obj,r,_i,_len;for(_i=0,_len=rules.length;_i<_len;_i++){r=rules[_i];if(w.match(r.reg)){obj=Object.keys(r.repl).reduce(function(h,k){h[k]=w.replace(r.reg,r.repl[k]);return h},{});obj[r.tense]=w;return obj}}return fallback(w)};if(typeof module!=="undefined"&&module.exports){exports.conjugate=main}return main}()},{"./rules":6}],6:[function(require,module,exports){exports.rules=[{reg:/([a[tg]|i[zn]]|ur|nc|gl|is)e$/i,repl:{present:"$1es",gerund:"$1ing",past:"$1ed"},examples:"angulate, stipulate, orientate",exceptions:["ate","overate"],power:804,tense:"infinitive"},{reg:/(if)y$/i,repl:{present:"$1ies",gerund:"$1ying",past:"$1ied"},examples:"unify, classify, glorify",exceptions:[],power:128,tense:"infinitive"},{reg:/([td])er$/i,repl:{present:"$1s",gerund:"$1ing",past:"$1ed"},examples:"sputter, fritter, charter",exceptions:[],power:123,tense:"infinitive"},{reg:/([bd])le$/i,repl:{present:"$1es",gerund:"$1ing",past:"$1ed"},examples:"shamble, warble, grabble",exceptions:[],power:69,tense:"infinitive"},{reg:/(ish|tch|ess)$/i,repl:{present:"$1es",gerund:"$1ing",past:"$1ed"},examples:"relish, wish, brandish",exceptions:[],power:62,tense:"infinitive"},{reg:/(ion|end|e[nc]t)$/i,repl:{present:"$1s",gerund:"$1ing",past:"$1ed"},examples:"caution, aircondition, cushion",exceptions:["sent","bent","overspent","misspent","went","kent","outwent","forwent","spent","pent","lent","underwent","rent","unbent","shent"],power:55,tense:"infinitive"},{reg:/(om)e$/i,repl:{present:"$1es",gerund:"$1ing",past:"ame"},examples:"become",exceptions:[],power:1,tense:"infinitive"},{reg:/([tzlshicgrvdnkmu])es$/i,repl:{infinitive:"$1e",gerund:"$1ing",past:"$1ed"},examples:"convolutes, angulates, stipulates",exceptions:[],power:923,tense:"present"},{reg:/(n[dtk]|c[kt]|[eo]n|i[nl]|er|a[ytrl])s$/i,repl:{infinitive:"$1",gerund:"$1ing",past:"$1ed"},examples:"wants, squints, garments",exceptions:[],power:153,tense:"present"},{reg:/(ow)s$/i,repl:{infinitive:"$1",gerund:"$1ing",past:"ew"},examples:"wants, squints, garments",exceptions:[],power:153,tense:"present"},{reg:/(op)s$/i,repl:{infinitive:"$1",gerund:"$1ping",past:"$1ped"},examples:"wants, squints, garments",exceptions:[],power:153,tense:"present"},{reg:/([eirs])ts$/i,repl:{infinitive:"$1t",gerund:"$1tting",past:"$1tted"},examples:"outwits, revisits, knits",exceptions:[],power:105,tense:"present"},{reg:/(ll)s$/i,repl:{infinitive:"$1",gerund:"$1ing",past:"$1ed"},examples:"culls, tolls, shalls",exceptions:[],power:92,tense:"present"},{reg:/(el)s$/i,repl:{infinitive:"$1",gerund:"$1ling",past:"$1led"},examples:"swivels, rebels, travels",exceptions:[],power:88,tense:"present"},{reg:/([aeiou][^aeiouwyrlm])ing$/i,repl:{infinitive:"$1e",present:"$1es",past:"$1ed"},examples:"convoluting, compensating, fouling",exceptions:[],power:8475,tense:"gerund"},{reg:/([^aeiou])ing$/i,repl:{infinitive:"$1",present:"$1s",past:"$1ed"},examples:"walking, fawning, farming",exceptions:[],power:8475,tense:"gerund"},{reg:/(.[pigmcvwbyfkt])ed$/i,repl:{infinitive:"$1e",present:"$1es",gerund:"$1ing"},examples:"convoluted, outwitted, angulated",exceptions:[],power:1854,tense:"past"},{reg:/([rl])ew$/i,repl:{infinitive:"$1ow",present:"$1ows",gerund:"$1owing"},example:"overthrew",exceptions:["brew","crew","screw","unscrew"],tense:"past"}]},{}],7:[function(require,module,exports){var syllables=function(str){var main=function(str){var all=[];function postprocess(arr){if(!arr.length<=2){return arr}var twos=[/[^aeiou]ying$/,/yer$/];var ones=[/^[^aeiou]?ion/,/^[^aeiou]?ised/,/^[^aeiou]?iled/];var l=arr.length;var suffix=arr[l-2]+arr[l-1];for(var i=0;i<ones.length;i++){if(suffix.match(ones[i])){arr[l-2]=arr[l-2]+arr[l-1];arr.pop()}}return arr}var doer=function(str){var vow=/[aeiouy]$/;if(!str){return}var chars=str.split("");var before="";var after="";var current="";for(var i=0;i<chars.length;i++){before=chars.slice(0,i).join("");current=chars[i];after=chars.slice(i+1,chars.length).join("");var candidate=before+chars[i];if(before.match(vow)&&!current.match(vow)){if(after.match(/^e[sm]/)){candidate+="e";after=after.replace(/^e/,"")}all.push(candidate);return doer(after)}if(candidate.match(/(eo|eu|ia|oa|ua|ui)$/i)){all.push(before);all.push(current);return doer(after)}}if(str.match(/[aiouy]/)){all.push(str)}else{all[all.length-1]=(all[all.length-1]||"")+str}};str.split(/\s-/).forEach(function(s){doer(s)});all=postprocess(all);return all};if(typeof module!=="undefined"&&module.exports){module.exports=main}return main}()},{}],8:[function(require,module,exports){var britishize=function(){var main=function(str){var patterns=[{reg:/([^aeiou][iy])z(e|ed|es|ing)?$/,repl:"$1s$2",exceptions:[]},{reg:/([aeiou]+[^aeiou]+[aeiou]+)l(ful|ment|est|ing|or|er|ed)$/,repl:"$1ll$2",exceptions:[]}];for(var i=0;i<patterns.length;i++){if(str.match(patterns[i].reg)){for(var o in patterns[i].exceptions){if(str.match(patterns[i].exceptions[o])){return str}}return str.replace(patterns[i].reg,patterns[i].repl)}}return str};if(typeof module!=="undefined"&&module.exports){exports.britishize=main}return main}();var americanize=function(){var main=function(str){var patterns=[{reg:/([^aeiou][iy])s(e|ed|es|ing)?$/,repl:"$1z$2",exceptions:[]},{reg:/(..)our(ly|y|ite)?$/,repl:"$1or$2",exceptions:[]},{reg:/([^cdnv])re(s)?$/,repl:"$1er$2",exceptions:[]},{reg:/([aeiou])xion([ed])?$/,repl:"$1tion$2",exceptions:[]},{reg:/logue$/,repl:"log",exceptions:[]},{reg:/([o|a])e/,repl:"e",exceptions:[]},{reg:/e(ing|able)$/,repl:"$1",exceptions:[]},{reg:/([aeiou]+[^aeiou]+[aeiou]+)ll(ful|ment|est|ing|or|er|ed)$/,repl:"$1l$2",exceptions:[]}];for(var i=0;i<patterns.length;i++){if(str.match(patterns[i].reg)){for(var o in patterns[i].exceptions){if(str.match(patterns[i].exceptions[o])){return str}}return str.replace(patterns[i].reg,patterns[i].repl)}}return str};if(typeof module!=="undefined"&&module.exports){exports.americanize=main}return main}();arr=["synthesized"];arr=[]},{}],9:[function(require,module,exports){var date_extractor=function(){var date_extractor=function(text){var results=finddate(text);return{text:results[0],from:formatdate(results[1]),to:formatdate(results[2])}};function finddate(text){if(text==null){return""}var foundarray=new Array;text=text.replace(/ Feb\.? /g," February ");text=text.replace(/ Mar\.? /g," March ");text=text.replace(/ Apr\.? /g," April ");text=text.replace(/ Jun\.? /g," June ");text=text.replace(/ Jul\.? /g," July ");text=text.replace(/ Aug\.? /g," August ");text=text.replace(/ Sep\.? /g," September ");text=text.replace(/ Oct\.? /g," October ");text=text.replace(/ Nov\.? /g," November ");text=text.replace(/ Dec\.? /g," December ");text=text.replace(/\(/g,"( ");text=text.replace(/\)/g," )");var sentences=text.split(/\. /);for(var i in sentences){var found;sentences[i]=" "+sentences[i]+"";sentences[i]=sentences[i].replace(/\Bfirst\B/,"1st");sentences[i]=sentences[i].replace(/second of /,"2nd of");sentences[i]=sentences[i].replace(/second of /,"2nd of");sentences[i]=sentences[i].replace(/second of /,"2nd of");sentences[i]=sentences[i].replace(/second of /,"2nd of");sentences[i]=sentences[i].replace(/second of /,"2nd of");var best=/(july|august|september|october|november|december|january|february|march|april|may|june),? (the )?[0-9]{1,2}(th|rd|st)? ?(\-| to | until | till ) ?[0-9]{1,2}(th|rd|st)?,? [0-9]{4}/i.exec(sentences[i]);if(best!=null){found=best[0];var remove=/ ?(-| to | until ) ?[0-9]{1,2}(th|rd|st)?,?/i.exec(found);foundarray[0]=found;foundarray[1]=found.replace(remove[0],"");var remove=/[0-9]{1,2}(th|rd|st)?,? ?(-| to | until )/i.exec(found);foundarray[2]=found.replace(remove[0],"");return foundarray}var best=/[0-9]{1,2}(th|rd|st)? (of )?(july|august|september|october|november|december|january|february|march|april|may|june),? ?(-| to | until | till ) ?[0-9]{1,2}(th|rd|st)? (of )?(july|august|september|october|november|december|january|february|march|april|may|june),? [0-9]{4}/i.exec(sentences[i]);if(best!=null){var found=best[0];foundarray[0]=found;var remove=/(-| to | until | till ) ?[0-9]{1,2}(th|rd|st)? (of )?(july|august|september|october|november|december|january|february|march|april|may|june),?/i.exec(found);var tfound=found.replace(remove[0],"");tfound=tfound.replace(/( of | to | until | till |-)/," ");foundarray[1]=tfound.replace(remove[0],"");var remove=/[0-9]{1,2}(th|rd|st)? (of )?(july|august|september|october|november|december|january|february|march|april|may|june),? ?(-| to | until | till )/i.exec(found);var tfound=found.replace(remove[0],"");tfound=tfound.replace(/( of | to | until | till |-)/," ");foundarray[2]=tfound.replace(remove[0],"");return foundarray}var best=/(july|august|september|october|november|december|january|february|march|april|may|june),? (the )?[0-9]{1,2}(th|rd|st)? ?(-| to | until | till ) ?(july|august|september|october|november|december|january|february|march|april|may|june),? (the )?[0-9]{1,2}(th|rd|st)?( |, )[0-9]{4}/i.exec(sentences[i]);if(best!=null){found=best[0];var remove=/ ?(-| to | until | till ) ?(july|august|september|october|november|december|january|february|march|april|may|june),? (the )?[0-9]{1,2}(th|rd|st)?,?/i.exec(found);foundarray[0]=found;foundarray[1]=found.replace(remove[0],"");var end=found.replace(/(july|august|september|october|november|december|january|february|march|april|may|june),? (the )?[0-9]{1,2}(th|rd|st)? ?(-| to | until | till ) ?/i,"");foundarray[2]=end;return foundarray}var best=/(through|throughout|during|within|between) [0-9]{1,2}(th|rd|st)? (july|august|september|october|november|december|january|february|march|april|may|june),? ?(-| to | until | till | and ) ?[0-9]{1,2}(th|rd|st)? (july|august|september|october|november|december|january|february|march|april|may|june),? [0-9]{4}/i.exec(sentences[i]);if(best!=null){found=best[0];var end=/[0-9]{1,2}(th|rd|st)? (july|august|september|october|november|december|january|february|march|april|may|june),? [0-9]{4}/i.exec(found);var start=found.replace(/(through|throughout|during|within|between) /i,"");start=start.replace(/,? ?(-| to | until | till | and ) ?[0-9]{1,2}(th|rd|st)? (july|august|september|october|november|december|january|february|march|april|may|june),?/i,"");foundarray[0]=found;foundarray[1]=start;foundarray[2]=end[0];return foundarray}var best=/between (july|august|september|october|november|december|january|february|march|april|may|june),? (the )?[0-9]{1,2}(th|rd|st)? ?(-| and ) ?(july|august|september|october|november|december|january|february|march|april|may|june),? (the )?[0-9]{1,2}(th|rd|st)?( |, )[0-9]{4}/i.exec(sentences[i]);if(best!=null){found=best[0];foundarray[0]=found;var remove=/ ?(-| and ) ?(july|august|september|october|november|december|january|february|march|april|may|june),? (the )?[0-9]{1,2}(th|rd|st)?,?/i.exec(found);foundarray[1]=found.replace(remove[0],"");foundarray[1]=foundarray[1].replace("between","");var remove=/between (july|august|september|october|november|december|january|february|march|april|may|june),? (the )?[0-9]{1,2}(th|rd|st)? ?(-| and ) ?/i.exec(found);foundarray[2]=found.replace(remove[0],"");foundarray[2]=foundarray[2].replace("between","");return foundarray}var best=/(july|august|september|october|november|december|january|february|march|april|may|june),? (the )?[0-9]{1,2}(th|rd|st)?( |, |,)[0-9]{4}/i.exec(sentences[i]);if(best!=null){found=best[0];foundarray[0]=found;foundarray[1]=found;return foundarray}if(found==null){var second=/[0-9]{1,2}(th|rd|st)? ?( to |-| until |\/) ?[0-9]{1,2}(th|rd|st)? (of )?(july|august|september|october|november|december|january|february|march|april|may|june)( |, |,)[0-9]{4}/i.exec(sentences[i]);if(second!=null){found=second[0];foundarray[0]=found;var start=found.replace(/(th|rd|st)? ?( to |-| until |\/) ?[0-9]{1,2}(th|rd|st)?( of)?/i,"");var end=found.replace(/[0-9]{1,2}(th|rd|st)? ?( to |-| until |\/) ?/i,"");start=start.replace("of","");end=end.replace("of","");foundarray[1]=start;foundarray[2]=end;return foundarray}}if(found==null){var second=/[0-9]{1,2}(th|rd|st)? ?(of )?(july|august|september|october|november|december|january|february|march|april|may|june)( |, |,)[0-9]{4}/i.exec(sentences[i]);if(second!=null){found=second[0];foundarray[0]=found;foundarray[1]=found;return foundarray}}if(found==null){var third=/(july|august|september|october|november|december|january|february|march|april|may|june)( |, |,)(of )?[0-9]{4,4} ?( to |-| until ) ?(july|august|september|october|november|december|january|february|march|april|may|june)( |, |,)(of )?[0-9]{4,4}/i.exec(sentences[i]);if(third!=null){var start=third[0].replace(/ (to|-|until) (july|august|september|october|november|december|january|february|march|april|may|june)( |, |,)(of )?[0-9]{4,4}/i,"");var end=third[0].replace(/(july|august|september|october|november|december|january|february|march|april|may|june)( |, |,)(of )?[0-9]{4,4} (to|-|until) /i,"");found=third[0];foundarray[0]=found;foundarray[1]=start;foundarray[2]=end;return foundarray}}if(found==null){var third=/(july|august|september|october|november|december|january|february|march|april|may|june)( |, |,)(of )?[0-9]{4,4}/i.exec(sentences[i]);if(third!=null){found=third[0];foundarray[0]=found;foundarray[1]=found;return foundarray}}if(found==null){var year=/ ([0-9]{3,4} ?- ?[0-9]{2,4} ?(BC.|B.C.|BC ))/i.exec(sentences[i]);if(year!=null){found=year[1];found=found.replace(/ ?- ?[0-9]{2,4}/,"");foundarray[0]=found;foundarray[1]=found.replace(/(BC.|B.C.|BC |BCE.|B.C.E.|BCE )/,"B.C.");return foundarray}}if(found==null){var year=/ [0-9]{4,4} ?(-|–| to | until ) ?'?[0-9]{4,4}/i.exec(sentences[i]);if(year!=null){found=year[0];foundarray[0]=found;var tfound=found.replace(/ ?- ?'?[0-9]{4,4}/,"");if(tfound!=null&&tfound<2020){foundarray[1]=tfound;var remove=/[0-9]{4} ?- ?/i.exec(found);foundarray[2]=found.replace(remove[0],"");return foundarray}}}if(found==null){var year=/ [0-9]{4,4} ?(-|–| to | until ) ?'?[0-9]{2,2}/i.exec(sentences[i]);if(year!=null){found=year[0];foundarray[0]=found;var tfound=found.replace(/ ?- ?'?[0-9]{2,2}/,"");if(tfound!=null&&tfound<2020){foundarray[1]=tfound;var remove=/[0-9]{2} ?- ?/i.exec(found);foundarray[2]=found.replace(remove[0],"");return foundarray}}}if(found==null){var year=/ ([0-9]{3,4} (BC.|B.C.|BC ))/i.exec(sentences[i]);if(year!=null){found=year[1];foundarray[0]=found;foundarray[1]=found.replace(/(BC.|B.C.|BC |BCE.|B.C.E.|BCE )/,"B.C.");return foundarray}}if(found==null){var year=/ [0-9]{4,4}/i.exec(sentences[i]);if(year!=null&&year<2020){found=year[0];foundarray[0]=found;foundarray[1]=found;return foundarray}}if(found!=null){break}}return foundarray}function formatdate(found){if(!found){return{}}found=found.replace("of ","");found=found.replace("the ","");found=found.replace("th "," ");found=found.replace("rd "," ");found=found.replace("1st ","01");var month=/july|august|september|october|november|december|january|february|march|april|may|june/i.exec(found);month=""+month;month=month.toLowerCase();var monthnum=0;if(month=="january"){monthnum="01"}if(month=="february"){monthnum="02"}if(month=="march"){monthnum="03"}if(month=="april"){monthnum="04"}if(month=="may"){monthnum="05"}if(month=="june"){monthnum="06"}if(month=="july"){monthnum="07"}if(month=="august"){monthnum="08"}if(month=="september"){monthnum="09"}if(month=="october"){monthnum="10"}if(month=="november"){monthnum="11"}if(month=="december"){monthnum="12"}if(found.match("B.C.")){var year=/[0-9]{3,4}/i.exec(found);year=year+"";if(year.length==3){year="0"+year}if(year.length==2){year="00"+year}year="-"+year;return year}else{var year=/[0-9]{4}/i.exec(found)}year=""+year;found=found.replace(year,"");var date=/[0-9]{1,2}/i.exec(found);if(date!=null){if(date<10){date="0"+date}}return{year:year,month:monthnum,day:date}}if(typeof define!=="undefined"&&define.amd){define([],function(){return date_extractor})}else if(typeof module!=="undefined"&&module.exports){module.exports=date_extractor}return date_extractor}()},{}],10:[function(require,module,exports){var lexicon=function(){var main={yet:"CC",therefore:"CC",or:"CC","while":"CC",nor:"CC",whether:"CC",though:"CC",because:"CC",but:"CC","for":"CC",and:"CC","if":"CC",however:"CC",before:"CC",so:"CC",although:"CC",eighty:"CD",seventeen:"CD",two:"CD",eighteen:"CD",one:"CD",nineteen:"CD",four:"CD",twenty:"CD",six:"CD",thirty:"CD",eight:"CD",fourty:"CD",ten:"CD",fifty:"CD",twelve:"CD",sixty:"CD",fourteen:"CD",seventy:"CD",sixteen:"CD",five:"CD",nine:"CD",ninety:"CD",eleven:"CD",seven:"CD",three:"CD",fifteen:"CD",thirteen:"CD",is:"CP","will be":"CP",are:"CP",was:"CP",were:"CP","this":"DT",any:"DT",enough:"DT",each:"DT",whatever:"DT",every:"DT",which:"DT",all:"DT",these:"DT",another:"DT",such:"DT",little:"DT",plenty:"DT",whichever:"DT",neither:"DT",an:"DT",more:"DT",a:"DT",least:"DT",own:"DT",few:"DT",both:"DT",those:"DT",the:"DT",that:"DT",various:"DT",many:"DT",what:"DT",either:"DT",less:"DT",last:"DT",much:"DT",some:"DT","else":"DT",several:"DT",until:"IN",onto:"IN",near:"IN",of:"IN",into:"IN",except:"IN",across:"IN",by:"IN",between:"IN",at:"IN",down:"IN",as:"IN",from:"IN",around:"IN","with":"IN",among:"IN",upon:"IN",amid:"IN",to:"IN",along:"IN",since:"IN",about:"IN",behind:"IN",above:"IN",on:"IN",within:"IN","in":"IN",under:"IN",during:"IN",per:"IN",without:"IN",beyond:"IN",throughout:"IN",against:"IN",through:"IN",than:"IN",via:"IN",up:"IN",hit:"JJ",different:"JJ",similar:"JJ","final":"JJ",late:"JJ",full:"JJ",normal:"JJ",economic:"JJ",hard:"JJ",federal:"JJ",western:"JJ",special:"JJ",natural:"JJ",available:"JJ",foreign:"JJ",human:"JJ",religious:"JJ",level:"JJ",simple:"JJ",effective:"JJ",medical:"JJ",even:"JJ",dark:"JJ",second:"JJ",complete:"JJ",whole:"JJ",military:"JJ",easy:"JJ","private":"JJ",particular:"JJ",basic:"JJ",local:"JJ",sure:"JJ",black:"JJ",high:"JJ",third:"JJ",just:"JJ",ready:"JJ",bad:"JJ",clear:"JJ",modern:"JJ",able:"JJ","short":"JJ",best:"JJ",strong:"JJ",next:"JJ",entire:"JJ",good:"JJ",likely:"JJ",pass:"JJ",free:"JJ",national:"JJ",common:"JJ",white:"JJ",small:"JJ",later:"JJ",beautiful:"JJ",technical:"JJ",patient:"JJ",firm:"JJ",low:"JJ",big:"JJ",single:"JJ",kind:"JJ",hot:"JJ",serious:"JJ",political:"JJ",important:"JJ",difficult:"JJ",possible:"JJ",former:"JJ",latter:"JJ",moral:"JJ",according:"JJ",real:"JJ",young:"JJ",larger:"JJ",same:"JJ",cold:"JJ",wide:"JJ",southern:"JJ",toward:"JJ",international:"JJ",specific:"JJ",dead:"JJ",great:"JJ",physical:"JJ",old:"JJ","true":"JJ",still:"JJ",industrial:"JJ",recent:"JJ",democratic:"JJ",fiscal:"JJ",large:"JJ",social:"JJ",personal:"JJ",central:"JJ",necessary:"JJ",can:"MD",may:"MD",could:"MD",might:"MD",will:"MD","ought to":"MD",would:"MD",must:"MD",shall:"MD",should:"MD",situation:"NN",product:"NN",animal:"NN",hope:"NN",problem:"NN",information:"NN",procedure:"NN",dog:"NN",word:"NN",hall:"NN",area:"NN",mark:"NN",importance:"NN",year:"NN",fact:"NN",purpose:"NN",program:"NN",relation:"NN",earth:"NN",century:"NN",country:"NN",ship:"NN",captain:"NN",date:"NN",group:"NN",ground:"NN","case":"NN",model:"NN",night:"NN",stage:"NN",government:"NN",state:"NN",head:"NN",poet:"NN",tree:"NN",department:"NN",church:"NN",role:"NN",authority:"NN",hill:"NN",employee:"NN",father:"NN","class":"NN",choice:"NN",child:"NN",point:"NN",farm:"NN",distance:"NN",piece:"NN",addition:"NN",bed:"NN",opinion:"NN",end:"NN",marriage:"NN",weapon:"NN",religion:"NN",service:"NN",room:"NN",side:"NN",image:"NN",series:"NN",parent:"NN",week:"NN","function":"NN",water:"NN",relationship:"NN",manager:"NN",picture:"NN",business:"NN",rule:"NN",finger:"NN",glass:"NN",house:"NN",music:"NN",saint:"NN",growth:"NN",page:"NN",road:"NN",value:"NN",university:"NN",machine:"NN",system:"NN",work:"NN",affair:"NN",member:"NN",bank:"NN",form:"NN",Mister:"NN",matter:"NN",part:"NN",top:"NN",eye:"NN",John:"NN",front:"NN",power:"NN",time:"NN",French:"NN",letter:"NN",development:"NN",structure:"NN",force:"NN",paper:"NN",English:"NN",region:"NN",type:"NN",go:"NN",nation:"NN",cell:"NN",cost:"NN",mile:"NN",bar:"NN",arm:"NN",door:"NN",report:"NN",home:"NN",success:"NN",park:"NN",land:"NN",election:"NN",evidence:"NN",month:"NN",floor:"NN",audience:"NN",issue:"NN",office:"NN",man:"NN",world:"NN",age:"NN",field:"NN",plan:"NN",example:"NN",peace:"NN",action:"NN",difficulty:"NN",poem:"NN",hair:"NN",rate:"NN",strength:"NN",back:"NN",length:"NN",life:"NN",step:"NN",position:"NN",record:"NN",God:"NN",window:"NN",character:"NN",horse:"NN",afternoon:"NN",commission:"NN",pattern:"NN",friend:"NN",plane:"NN",bill:"NN",method:"NN",wall:"NN",account:"NN",conference:"NN",money:"NN",freedom:"NN",book:"NN",officer:"NN",effort:"NN",son:"NN",edge:"NN",statement:"NN",mouth:"NN",morning:"NN",people:"NN",unit:"NN",enemy:"NN",heart:"NN",effect:"NN",influence:"NN",europe:"NN",army:"NN",hundred:"NN",space:"NN",way:"NN",fire:"NN",student:"NN",court:"NN",art:"NN",hotel:"NN",wonder:"NN",story:"NN",material:"NN",limit:"NN",community:"NN",item:"NN",project:"NN",total:"NN",trip:"NN",river:"NN",mother:"NN",discussion:"NN",stock:"NN",secretary:"NN",pool:"NN",operation:"NN",experiment:"NN",future:"NN",Congress:"NN",range:"NN",population:"NN",organization:"NN",performance:"NN",major:"NN",process:"NN",analysis:"NN",ball:"NN",police:"NN",writer:"NN",brother:"NN",section:"NN",half:"NN",difference:"NN",plant:"NN",city:"NN",respect:"NN",west:"NN",county:"NN",course:"NN",smile:"NN",woman:"NN",Brown:"NN",company:"NN",subject:"NN",order:"NN",cent:"NN",list:"NN",rest:"NN",president:"NN",datum:"NN",face:"NN",leg:"NN",fine:"NN",source:"NN",school:"NN",food:"NN",artist:"NN",agreement:"NN",law:"NN",nature:"NN",faith:"NN",committee:"NN",boat:"NN",England:"NN",foot:"NN",worker:"NN",meaning:"NN",event:"NN",dollar:"NN",district:"NN",hand:"NN",volume:"NN",thing:"NN",opportunity:"NN",result:"NN",station:"NN",period:"NN",theory:"NN",reason:"NN",equipment:"NN",job:"NN",institution:"NN",college:"NN",base:"NN",instance:"NN",chance:"NN",moment:"NN",meeting:"NN",oil:"NN",trial:"NN",interest:"NN",season:"NN",idea:"NN",lady:"NN",object:"NN",fear:"NN",person:"NN",research:"NN",manner:"NN",note:"NN",language:"NN",defense:"NN",condition:"NN",hospital:"NN",center:"NN",practice:"NN",director:"NN",truth:"NN",voice:"NN",size:"NN",air:"NN",feeling:"NN",tax:"NN",south:"NN",answer:"NN",couple:"NN",attitude:"NN",cause:"NN",direction:"NN",gun:"NN",table:"NN",association:"NN",death:"NN",evening:"NN",kid:"NN",measure:"NN",number:"NN",movement:"NN",tooth:"NN",term:"NN",gas:"NN",factor:"NN",facility:"NN",act:"NN",family:"NN",amount:"NN",element:"NN",place:"NN",body:"NN",sale:"NN",division:"NN",Christian:"NN",street:"NN",club:"NN",hour:"NN",science:"NN",administration:"NN",responsibility:"NN",history:"NN",leader:"NN",mind:"NN",million:"NN",literature:"NN",corner:"NN",policy:"NN",reaction:"NN",inch:"NN",scene:"NN",day:"NN",temperature:"NN",wife:"NN",production:"NN",square:"NN",decision:"NN",basis:"NN",drop:"NN",minute:"NN",fund:"NN",trouble:"NN",market:"NN",boy:"NN",sign:"NN",figure:"NN",loss:"NN",view:"NN",attention:"NN",agency:"NN",price:"NN",girl:"NN",quality:"NN",citizen:"NN",game:"NN",sense:"NN",sort:"NN",sound:"NN",radio:"NN",light:"NN",color:"NN",board:"NN",possibility:"NN",knowledge:"NN",principle:"NN",car:"NN",teacher:"NN",name:"NN",treatment:"NN",summer:"NN",building:"NN",town:"NN",pressure:"NN",party:"NN",line:"NN",detail:"NN",technique:"NN",red:"NN",husband:"NN",question:"NN",governor:"NN",society:"NN",experience:"NN",today:"NN",mine:"PP",something:"PP",none:"PP",anything:"PP",anyone:"PP",lot:"PP",i:"PP",theirs:"PP",himself:"PP",ours:"PP",his:"PP",their:"PP",yours:"PP",its:"PP",nothing:"PP",herself:"PP",hers:"PP",themselves:"PP",everything:"PP",myself:"PP",itself:"PP",who:"PP",it:"PRP",they:"PRP",i:"PRP",them:"PRP",you:"PRP",she:"PRP",me:"PRP",he:"PRP",him:"PRP",her:"PRP",us:"PRP",we:"PRP",thou:"PRP",now:"RB",again:"RB",already:"RB",soon:"RB",directly:"RB",suddenly:"RB",especially:"RB",instead:"RB",yes:"RB",alone:"RB",ago:"RB",indeed:"RB",probably:"RB",usually:"RB",ever:"RB",quite:"RB",perhaps:"RB",certain:"RB",slowly:"RB",apparently:"RB",where:"RB",then:"RB",here:"RB",thus:"RB",immediately:"RB",nearly:"RB",very:"RB",actually:"RB",often:"RB",not:"RB",once:"RB",together:"RB",never:"RB","finally":"RB",why:"RB",merely:"RB",war:"RB",simply:"RB",when:"RB",generally:"RB",away:"RB",always:"RB",certainly:"RB",recently:"RB",sometimes:"RB",also:"RB",maybe:"RB",uhh:"UH","uh-oh":"UH",ugh:"UH",sheesh:"UH",eww:"UH",pff:"UH",voila:"UH",oy:"UH",eep:"UH",hurrah:"UH",yuck:"UH",ow:"UH",duh:"UH",oh:"UH",hmm:"UH",yeah:"UH",whoa:"UH",ooh:"UH",whee:"UH",ah:"UH",bah:"UH",gah:"UH",yaa:"UH",phew:"UH",gee:"UH",ahem:"UH",eek:"UH",meh:"UH",yahoo:"UH",oops:"UH","d'oh":"UH",psst:"UH",argh:"UH",grr:"UH",nah:"UH",shhh:"UH",whew:"UH",mmm:"UH",yay:"UH","uh-huh":"UH",boo:"UH",wow:"UH",enter:"VB",stop:"VB",turn:"VB",give:"VB",win:"VB",control:"VB",relate:"VB",remember:"VB",join:"VB",listen:"VB",train:"VB","break":"VB",spring:"VB",enjoy:"VB",fail:"VB",understand:"VB",recognize:"VB",draw:"VB",obtain:"VB",learn:"VB",fill:"VB",announce:"VB",prevent:"VB",fall:"VB",achieve:"VB",find:"VB",realize:"VB",involve:"VB",remove:"VB",lose:"VB",lie:"VB",build:"VB",thought:"VB",aid:"VB",lay:"VB",visit:"VB",test:"VB",strike:"VB",prepare:"VB",wait:"VB",ask:"VB",carry:"VB",suppose:"VB",determine:"VB",raise:"VB",send:"VB",love:"VB",use:"VB",pull:"VB",improve:"VB",contain:"VB",think:"VB",offer:"VB",speak:"VB",rise:"VB",talk:"VB",pick:"VB",care:"VB",express:"VB",remain:"VB",operate:"VB",deal:"VB",close:"VB",add:"VB",mention:"VB",read:"VB",support:"VB",grow:"VB",decide:"VB",walk:"VB",vary:"VB",demand:"VB",describe:"VB",sell:"VB",agree:"VB",happen:"VB",allow:"VB",suffer:"VB",have:"VB",study:"VB",be:"VB",press:"VB",watch:"VB",seem:"VB",occur:"VB",contribute:"VB",claim:"VB",become:"VB",make:"VB",compare:"VB",bear:"VB",develop:"VB",apply:"VB",direct:"VB",discuss:"VB",consider:"VB",know:"VB",sit:"VB",see:"VB",lead:"VB",indicate:"VB",require:"VB",change:"VB",fix:"VB",come:"VB",reach:"VB",prove:"VB",expect:"VB",exist:"VB",play:"VB",permit:"VB",meet:"VB",kill:"VB",pay:"VB",charge:"VB",increase:"VB",fight:"VB",tell:"VB","catch":"VB",believe:"VB",create:"VB","continue":"VB",live:"VB",help:"VB",represent:"VB",serve:"VB",ride:"VB",appear:"VB",cover:"VB",set:"VB",maintain:"VB",mean:"VB",including:"VB",start:"VB",stay:"VB",move:"VB",extend:"VB",leave:"VB",wear:"VB",run:"VB",design:"VB",supply:"VB",suggest:"VB",want:"VB",say:"VB",hear:"VB",drive:"VB",approach:"VB",cut:"VB",call:"VB",include:"VB","try":"VB",receive:"VB",save:"VB",discover:"VB",marry:"VB","throw":"VB",show:"VB",choose:"VB",need:"VB",establish:"VB",keep:"VB",assume:"VB",attend:"VB",buy:"VB",unite:"VB",leach:"VB",feel:"VB",explain:"VB",publish:"VB",accept:"VB",settle:"VB",reduce:"VB",bring:"VB","do":"VB",let:"VB",shoot:"VB",look:"VB",take:"VB",interact:"VB",concern:"VB",put:"VB",labor:"VB",hold:"VB","return":"VB",select:"VB",die:"VB",provide:"VB",seek:"VB",stand:"VB",spend:"VB",begin:"VB",get:"VB",march:"VB",wish:"VB",hang:"VB",write:"VB",finish:"VB",follow:"VB",forget:"VB",feed:"VB",eat:"VB",disagree:"VB",produce:"VB",july:"NN",august:"NN",september:"NN",october:"NN",november:"NN",december:"NN",january:"NN",february:"NN",march:"NN",april:"NN",may:"NN",june:"NN",monday:"NN",tuesday:"NN",wednesday:"NN",thursday:"NN",friday:"NN",saturday:"NN",sunday:"NN",said:"VBD",says:"VBZ",has:"VB",million:"CD",billion:"CD",more:"RBR",had:"VBD",been:"VBD","new":"JJ",other:"JJ",no:"DT",there:"EX",after:"IN",last:"JJ",many:"JJ",most:"RBS",expected:"JJ",far:"JJ",higher:"JJR",added:"VB",major:"JJ",minor:"JJ",several:"JJ",little:"JJ",took:"VB",due:"JJ",being:"VBG",began:"VBD",came:"VBD",did:"VBD",go:"VBP",too:"RB","long":"JJ"};
if(typeof module!=="undefined"&&module.exports){module.exports=main}return main}()},{}],11:[function(require,module,exports){var parts_of_speech=function(){var main={VB:{description:"verb, base form",example:"eat",parent:"verb",tag:"VB"},VBD:{description:"verb, past tense",example:"ate",parent:"verb",tense:"past",tag:"VBD"},VBN:{description:"verb, past participle",example:"eaten",parent:"verb",tense:"past",tag:"VBN"},VBP:{description:"Verb, infinitive",example:"eat",parent:"verb",tense:"present",tag:"VBP"},VBZ:{description:"Verb, present",example:"eats, swims",tense:"present",parent:"verb",tag:"VBZ"},CP:{description:"copula",example:"is, was, were",parent:"verb",tag:"CP"},VBG:{description:"verb, gerund",example:"eating,winning",parent:"verb",tag:"VBG"},JJ:{description:"Adjective",example:"big, nice",parent:"adjective",tag:"JJ"},JJR:{description:"Adj., comparative",example:"bigger, cooler",parent:"adjective",tag:"JJR"},JJS:{description:"Adj., superlative",example:"biggest, fattest",parent:"adjective",tag:"JJS"},RB:{description:"Adverb",example:"quickly, softly",parent:"adverb",tag:"RB"},RBR:{description:"Adverb, comparative",example:"faster, cooler",parent:"adverb",tag:"RBR"},RBS:{description:"Adverb, superlative",example:"fastest (driving), coolest (looking)",parent:"adverb",tag:"RBS"},NN:{description:"Noun, sing. or mass",example:"dog, rain",parent:"noun",tag:"NN"},NNP:{description:"Proper noun, sing.",example:"Edinburgh, skateboard",parent:"noun",tag:"NNP"},NNPS:{description:"Proper noun, plural",example:"Smiths",parent:"noun",tag:"NNPS"},NNS:{description:"Noun, plural",example:"dogs, foxes",parent:"noun",tag:"NNS"},NNO:{description:"Noun, possessive",example:"spencer's, sam's",parent:"noun",tag:"NNO"},NG:{description:"noun, gerund",example:"eating,winning - but used grammatically as a noun",parent:"noun",tag:"VBG"},PP:{description:"Possessive pronoun",example:"my,one's",parent:"glue",tag:"PP"},FW:{description:"foreign word",example:"mon dieu, voila",parent:"glue",tag:"FW"},CD:{description:"Cardinal number",example:"one,two",parent:"glue",tag:"CD"},IN:{description:"Preposition",example:"of,in,by",parent:"glue",tag:"IN"},MD:{description:"Modal",example:"can,should",parent:"glue",tag:"MD"},CC:{description:"Coord Conjuncn",example:"and,but,or",parent:"glue",tag:"CC"},PRP:{description:"Personal pronoun",example:"I,you,she",parent:"glue",tag:"PRP"},DT:{description:"Determiner",example:"the,some",parent:"glue",tag:"DT"},UH:{description:"Interjection",example:"oh, oops",parent:"glue",tag:"UH"},EX:{description:"Existential 'there'",example:"there",parent:"glue",tag:"EX"}};if(typeof module!=="undefined"&&module.exports){module.exports=main}return main}()},{}],12:[function(require,module,exports){var sentence_rules=function(){var main={VB:{afters:{value:"NN",count:14,percent:"51.85"}},VBD:{afters:{value:"NN",count:91,percent:"34.73"},befores:{value:"NN",count:1428,percent:"62.80"}},VBN:{afters:{value:"NN",count:28,percent:"35.90"},befores:{value:"VB",count:904,percent:"56.57"}},VBP:{afters:{value:"NN",count:41,percent:"34.45"},befores:{value:"NN",count:545,percent:"51.42"}},VBZ:{befores:{value:"NN",count:868,percent:"51.73"}},MD:{afters:{value:"NN",count:14,percent:"36.84"},befores:{value:"NN",count:369,percent:"54.67"}},RB:{afters:{value:"NN",count:48,percent:"33.10"},befores:{value:"VB",count:761,percent:"37.03"}},JJ:{afters:{value:"NN",count:95,percent:"32.65"}},JJS:{afters:{value:"NN",count:6,percent:"42.86"},befores:{value:"DT",count:61,percent:"44.20"}},RBR:{befores:{value:"VB",count:45,percent:"42.06"}},RBS:{befores:{value:"DT",count:16,percent:"55.17"}},NN:{afters:{value:"NN",count:203,percent:"30.53"}},NNP:{afters:{value:"NN",count:320,percent:"36.78"},befores:{value:"NN",count:3399,percent:"51.04"}},NNPS:{befores:{value:"NN",count:114,percent:"69.51"}},NNS:{afters:{value:"NN",count:109,percent:"36.21"}},IN:{afters:{value:"NN",count:121,percent:"34.18"},befores:{value:"NN",count:4118,percent:"57.34"}},CC:{afters:{value:"NN",count:24,percent:"43.64"},befores:{value:"NN",count:1131,percent:"72.64"}},PRP:{afters:{value:"NN",count:48,percent:"34.29"}},DT:{afters:{value:"NN",count:174,percent:"33.72"},befores:{value:"IN",count:2385,percent:"42.82"}},POS:{afters:{value:"NN",count:22,percent:"36.07"},befores:{value:"NN",count:611,percent:"99.35"}},RP:{befores:{value:"VB",count:87,percent:"88.78"}},TO:{afters:{value:"NN",count:16,percent:"37.21"}},WDT:{befores:{value:"NN",count:266,percent:"82.35"}},WP:{befores:{value:"NN",count:128,percent:"64.97"}},WRB:{afters:{value:"NN",count:5,percent:"38.46"},befores:{value:"NN",count:55,percent:"41.98"}}};if(typeof module!=="undefined"&&module.exports){module.exports=main}return main}()},{}],13:[function(require,module,exports){exports.data={tion:"NN",ness:"NN",idae:"NN",ceae:"NN",ment:"NN",lity:"NN",ting:"JJ",tree:"NN",ring:"JJ",ator:"NN",logy:"NN",alis:"NN",stem:"NN",ales:"NN",osis:"NN",itis:"NN",aria:"NN",unit:"NN",atus:"NN",ency:"NN",wood:"NN",nism:"NN",weed:"NN",lism:"NN",nsis:"NN",fern:"NN",onia:"NN",ella:"NN",vein:"NN",olia:"NN",emia:"NN",urus:"NN",ides:"NN",esis:"NN",inus:"NN",rium:"NN",tive:"JJ",eria:"NN",aker:"NN",tate:"VB",able:"JJ",ound:"VB",dium:"NN",bird:"NN",city:"NN",aris:"NN",gist:"NN",rate:"VB",cher:"NN",icus:"NN",time:"RB",illa:"NN",anus:"NN",rity:"NN",uage:"NN",atum:"NN",over:"VB",nium:"NN",tomy:"NN",wort:"NN",vity:"NN",vice:"NN",cell:"NN",lata:"NN",rier:"NN",ulus:"NN",lium:"NN",late:"VB",tics:"NN",tory:"JJ",aphy:"NN",iana:"NN",tism:"NN",iser:"NN",thus:"NN",esia:"NN",bush:"NN",nake:"NN",root:"NN",llus:"NN",nity:"NN",rmes:"NN",icle:"NN",bean:"NN",nica:"NN",erer:"NN",orus:"NN",ancy:"NN",iner:"NN",sity:"NN",ysis:"NN",leaf:"NN",enia:"NN",worm:"NN",etry:"NN",bone:"NN",psis:"NN",tera:"NN",cope:"NN",sman:"NN",izer:"NN",ayer:"NN",irus:"NN",eris:"NN",rism:"NN",lily:"NN",rius:"NN",back:"VB",book:"NN",rial:"JJ",tica:"NN",tein:"NN",ctus:"NN",nner:"NN",asia:"NN",horn:"NN",moth:"NN",cism:"NN",cake:"NN",rker:"NN",etes:"NN",alia:"NN",ings:"NN",drug:"NN",area:"NN",nate:"VB",icum:"NN",llum:"NN",stry:"NN",scle:"NN",oner:"NN",ania:"NN",ader:"NN",erus:"NN",idea:"NN",inia:"NN",itor:"NN",ilis:"NN",alus:"NN",ille:"NN",game:"NN",hair:"NN",uria:"NN",rina:"NN",anum:"NN",trum:"NN",tude:"NN",ngus:"NN",opus:"NN",rica:"NN",chus:"NN",body:"NN",ncer:"NN",ates:"NN",auce:"NN",bill:"NN",tube:"NN",tina:"NN",osus:"NN",card:"NN",odon:"NN",cana:"NN",dity:"NN",ions:"NN",inum:"NN",ntia:"NN",eper:"NN",llet:"NN",xide:"NN",enus:"NN",inae:"NN",agon:"NN",chid:"NN",etle:"NN",zard:"NN",ener:"NN",boat:"NN",chia:"NN",ward:"RB",lora:"NN",poda:"NN",otus:"NN",tris:"NN",iron:"NN",acea:"NN",orum:"NN",hora:"NN",toma:"NN",icer:"NN",ilus:"NN",nson:"NN",rpus:"NN",bell:"NN",rata:"NN",lamp:"NN",palm:"NN",ourt:"NN",rrel:"NN",down:"VB",dron:"NN",mann:"NN",elia:"NN",obia:"NN",gery:"NN",iper:"NN",star:"NN",inea:"NN",eman:"NN",tium:"NN",tata:"NN",rgan:"NN",ical:"JJ",gate:"VB",stic:"JJ",hand:"RB",sive:"JJ",east:"RB",etic:"JJ",away:"VB",cent:"JJ",cate:"VB",onal:"JJ",ible:"JJ",iate:"VB",atic:"JJ",onic:"JJ",ards:"RB",otic:"JJ",ular:"JJ",rise:"VB",ious:"JJ",tric:"JJ",ully:"RB",erly:"RB",ally:"RB",shed:"JJ",sted:"JJ",less:"JJ",rous:"JJ",lize:"VB",lise:"VB",nize:"VB",rize:"VB",nise:"VB",tise:"VB",tize:"VB",mize:"VB",into:"VB",tify:"VB",rify:"VB",self:"VB",esce:"VB",duce:"VB",cize:"VB",dize:"VB",gize:"VB",gise:"VB",nify:"VB",ieve:"VB",lify:"VB",sify:"VB",pend:"VB",hise:"VB",lude:"VB",tend:"VB",olve:"VB",dify:"VB",sise:"VB",open:"VB",eive:"VB",cede:"VB",cify:"VB",hize:"VB",lyse:"VB",ruct:"VB",lyze:"VB",vize:"VB",hten:"VB",sess:"VB",from:"VB",sume:"VB",inst:"VB",join:"VB",sorb:"VB",gest:"VB","-dye":"VB",vene:"VB",voke:"VB",cuss:"VB",cend:"VB",make:"VB",bute:"VB",grow:"VB",hend:"VB",pute:"VB",roil:"VB",othe:"VB",laze:"VB",mote:"VB",cute:"VB",uise:"VB",jure:"VB",uire:"VB",cook:"VB",hind:"VB",fend:"VB",owse:"VB",ooch:"VB",mend:"VB",vest:"VB",dain:"VB",rble:"VB",tort:"VB",uild:"VB",quer:"VB",ooze:"VB",rude:"VB",ulge:"VB",weld:"VB",uiet:"VB",narl:"VB",look:"VB",efer:"VB",elop:"VB",pply:"VB",lore:"VB",draw:"VB",lump:"VB",lunk:"VB",lame:"VB",lign:"VB",hink:"VB","-fry":"VB",ivel:"VB",wrap:"VB",vail:"VB",till:"VB",hack:"VB",earn:"VB",sult:"VB",dime:"VB",rlay:"VB",mute:"VB",ourn:"VB",uess:"VB",bify:"VB",tink:"VB",raid:"VB",uize:"VB",huck:"VB",ccur:"VB",vide:"VB",anse:"VB",hify:"VB",xist:"VB",rgle:"VB",pare:"VB",bind:"VB",veil:"VB",uote:"VB",pond:"VB",like:"JJ",eels:"VB",hear:"VB",otle:"VB",tect:"VB",pret:"VB",eact:"VB",idle:"VB",rbid:"VB",xate:"VB",surf:"VB",ploy:"VB",erit:"VB",elay:"VB",adow:"VB",ceed:"VB",raze:"VB",vote:"VB",mmit:"VB",fest:"VB",fill:"VB",shen:"VB",resh:"VB",lict:"VB",mify:"VB",eset:"VB",rump:"VB",pugn:"VB",feit:"VB",vict:"VB",elch:"VB",oosh:"VB",rken:"VB",nect:"VB",vade:"VB",pick:"VB",hirr:"VB",ated:"JJ",ered:"JJ",ized:"JJ",ised:"JJ",aped:"JJ",nted:"JJ",nded:"JJ",eous:"JJ",nous:"JJ",ined:"JJ",ured:"JJ",lled:"JJ",lous:"JJ",phic:"JJ",ored:"JJ",ssed:"JJ",aded:"JJ",fied:"JJ",cted:"JJ",ched:"JJ",rted:"JJ",oned:"JJ",ired:"JJ",cked:"JJ",ened:"JJ",ited:"JJ",eyed:"JJ",mous:"JJ",pped:"JJ",opic:"JJ",tous:"JJ",uous:"JJ",osed:"JJ",iled:"JJ",ried:"JJ",tted:"JJ",aced:"JJ",ytic:"JJ",gged:"JJ",nged:"JJ",emic:"JJ",eled:"JJ",ared:"JJ",thed:"JJ",omic:"JJ",aged:"JJ",rmed:"JJ",rned:"JJ",aved:"JJ",ided:"JJ",oted:"JJ",died:"JJ",mmed:"JJ",nned:"JJ",oric:"JJ",hted:"JJ",rmal:"JJ",rred:"JJ",nced:"JJ",owed:"JJ",dled:"JJ",gous:"JJ",amic:"JJ",ased:"JJ",used:"JJ",rmic:"JJ",dged:"JJ",amed:"JJ",iced:"JJ",aled:"JJ","-red":"JJ",eted:"JJ",hful:"JJ",rved:"JJ",aked:"JJ",tled:"JJ",obic:"JJ",uted:"JJ",lted:"JJ",dial:"JJ",omed:"JJ",neal:"JJ","d-up":"JJ",gled:"JJ",hous:"JJ",eded:"JJ",bled:"JJ",kish:"JJ",oved:"JJ",oded:"JJ",ifth:"JJ",afed:"JJ",rnal:"JJ",pled:"JJ",ilic:"JJ",pted:"JJ",ived:"JJ",smal:"JJ",imed:"JJ",five:"JJ",wise:"RB",made:"JJ",oked:"JJ",cous:"JJ",pish:"JJ",rded:"JJ",pous:"JJ",lied:"JJ",kled:"JJ",acal:"JJ",lved:"JJ",rful:"JJ",atal:"JJ",odic:"JJ",bred:"JJ",bbed:"JJ",awed:"JJ",yish:"JJ",rked:"JJ",ylic:"JJ",obed:"JJ",rged:"JJ",chic:"JJ",sial:"JJ",smic:"JJ",tchy:"JJ",exed:"JJ",oped:"JJ",rgic:"JJ",dded:"JJ",geal:"JJ",oxic:"JJ",arly:"RB",ayed:"JJ","-one":"JJ",utic:"JJ",rbed:"JJ",gish:"JJ",worn:"JJ",enal:"JJ",rced:"JJ",kian:"JJ",gned:"JJ",abic:"JJ",lear:"JJ",sick:"JJ",usty:"JJ",llic:"JJ",azed:"JJ",rsed:"JJ",atty:"JJ",idic:"JJ",dous:"JJ","-for":"JJ",mbed:"JJ",ghty:"JJ",stly:"RB",abby:"JJ",vial:"JJ",ocal:"JJ",wned:"JJ",ilar:"JJ",nied:"JJ",iful:"JJ",wide:"JJ",clic:"JJ",appy:"JJ",agic:"JJ",cled:"JJ",hree:"JJ",oyed:"JJ",ypic:"JJ",ixed:"JJ",lful:"JJ",ushy:"JJ",eedy:"JJ",bial:"JJ",rtal:"JJ",mose:"JJ",uric:"JJ",near:"JJ",icky:"JJ",ibed:"JJ",odal:"JJ",umed:"JJ","-day":"JJ","-six":"JJ",gual:"JJ",uled:"JJ",sual:"JJ",nked:"JJ",rled:"JJ",aned:"JJ","-two":"JJ",dful:"JJ",eaky:"JJ",ofed:"JJ",ubby:"JJ",clad:"JJ",aten:"JJ",rdly:"RB",odox:"JJ",cose:"JJ",lded:"JJ",lial:"JJ",fled:"JJ",nown:"JJ",ffed:"JJ",uced:"JJ",uded:"JJ","-fed":"JJ",mped:"JJ",ingy:"JJ",chal:"JJ",vish:"JJ",otal:"JJ",uant:"JJ",oled:"JJ",zled:"JJ",ugal:"JJ",ctal:"JJ",umpy:"JJ",aggy:"JJ",fted:"JJ",ozen:"JJ",ngly:"RB","-old":"JJ",bbly:"JJ",knit:"JJ",hmic:"JJ",ewed:"JJ",ippy:"JJ",ssic:"JJ",toed:"JJ",nsed:"JJ",otty:"JJ",xial:"JJ",hnic:"JJ",ashy:"JJ",hial:"JJ",lown:"JJ",rung:"JJ",omal:"JJ",unar:"JJ",asal:"JJ",wish:"JJ",ylar:"JJ","00th":"JJ",oeic:"JJ",teal:"JJ",ifty:"JJ",ifid:"JJ",oggy:"JJ","-cut":"JJ",ymic:"JJ",lked:"JJ",lthy:"JJ",assy:"JJ",full:"JJ",yant:"JJ",ucky:"JJ",gued:"JJ",mely:"RB",bral:"JJ",sful:"JJ",shod:"JJ",neic:"JJ",sked:"JJ",nchy:"JJ",urth:"JJ",ccal:"JJ",lued:"JJ",mbic:"JJ",itty:"JJ",edth:"JJ",ggly:"JJ",mned:"JJ",pied:"JJ",axed:"JJ",ecal:"JJ",cile:"JJ",tred:"JJ",uffy:"JJ",edic:"JJ",anky:"JJ",inct:"JJ",asic:"JJ",wept:"JJ","-air":"JJ",impy:"JJ",eamy:"JJ","-set":"JJ",ltic:"JJ",ishy:"JJ",bous:"JJ",tied:"JJ","-ply":"JJ",eval:"JJ",cave:"JJ",adic:"JJ",ocky:"JJ",icit:"JJ",liar:"JJ",wful:"JJ",dern:"JJ",xvii:"JJ",hean:"JJ",ossy:"JJ",nvex:"JJ",unky:"JJ",roud:"JJ",hral:"JJ",angy:"JJ",pant:"JJ",eked:"JJ",nnic:"JJ",siac:"JJ",esic:"JJ",boid:"JJ",rual:"JJ",iffy:"JJ",adal:"JJ",dest:"JJ",irty:"JJ",kety:"JJ",inty:"JJ",lgic:"JJ",hird:"JJ",dric:"JJ",gone:"JJ",unct:"JJ","t-up":"JJ",raic:"JJ",isty:"JJ",paid:"JJ",ilty:"JJ",uing:"JJ",zian:"JJ",emal:"JJ",gean:"JJ",ixth:"JJ",gful:"JJ",eeny:"JJ",easy:"JJ",eged:"JJ","-way":"JJ",uddy:"JJ",liac:"JJ",lden:"JJ",bose:"JJ",iose:"JJ",cive:"JJ",tean:"JJ",dral:"JJ",eved:"JJ",igid:"JJ",llel:"JJ",orty:"JJ",ctyl:"JJ",nkly:"JJ",ghth:"JJ",yric:"JJ","-run":"JJ",eian:"JJ",eepy:"JJ",tood:"JJ",ltry:"JJ",ubic:"JJ",wery:"JJ",nken:"JJ",apen:"JJ",mful:"JJ",emed:"JJ",gile:"JJ",mart:"JJ",yzed:"JJ",alid:"JJ",toic:"JJ","-top":"JJ",rtan:"JJ",mant:"JJ",ngry:"JJ",eyan:"JJ",yoid:"JJ",urnt:"JJ",urvy:"JJ",tair:"JJ",hoid:"JJ",egic:"JJ",moid:"JJ",llan:"JJ",tech:"JJ",ulky:"JJ",osey:"JJ",orny:"JJ",ormy:"JJ",dual:"JJ",oury:"JJ",qual:"JJ",teed:"JJ",eezy:"JJ",rdic:"JJ",alky:"JJ",afty:"JJ",acky:"JJ",ymed:"JJ",yful:"JJ",epid:"JJ",unic:"JJ",endo:"JJ",ensy:"JJ",iked:"JJ",ghed:"JJ",tuck:"JJ",odly:"JJ",iric:"JJ",awny:"JJ",udal:"JJ",axic:"JJ",awky:"JJ",rbal:"JJ",owsy:"JJ","-key":"JJ","-end":"JJ",ammy:"JJ",mune:"JJ",ulic:"JJ",izan:"JJ",ndan:"JJ","true":"JJ",eery:"JJ",zzly:"JJ",eige:"JJ",xxiv:"JJ",odan:"JJ","-toe":"JJ",laid:"JJ",utty:"JJ",usky:"JJ",issy:"JJ",deaf:"JJ",maic:"JJ",vous:"JJ",rpal:"JJ",exic:"JJ",soid:"JJ",ucal:"JJ",oopy:"JJ",lmed:"JJ",roic:"JJ",cund:"JJ",arse:"JJ",vely:"RB",uchy:"JJ",ussy:"JJ","d-on":"JJ",izzy:"JJ",pean:"JJ",mane:"JJ",etty:"JJ",ebby:"JJ",phal:"JJ",odgy:"JJ",ober:"JJ",hoic:"JJ",taic:"JJ",oeal:"JJ",cral:"JJ",hewn:"JJ",heal:"JJ",xxii:"JJ",ainy:"JJ",apid:"JJ",lowy:"JJ",nlit:"JJ",held:"JJ",xxvi:"JJ",inky:"JJ",nsic:"JJ",olid:"JJ",eban:"JJ",kful:"JJ",siny:"JJ",usly:"RB",ably:"RB",ntly:"RB",edly:"RB",tely:"RB",ssly:"RB",shly:"RB",rily:"RB",ibly:"RB",idly:"RB",tily:"RB",sely:"RB",rely:"RB",dily:"RB",kily:"RB",hily:"RB",nely:"RB",ctly:"RB",sily:"RB",ways:"RB",rtly:"RB",pily:"RB",gily:"RB",itly:"RB",nily:"RB",zily:"RB",lely:"RB",etly:"RB",uely:"RB",adly:"RB",much:"RB",gely:"RB",imly:"RB",oubt:"RB",vily:"RB",ftly:"RB",ptly:"RB",chly:"RB",owly:"RB",cely:"RB",rnly:"RB",mply:"RB",cily:"RB",ghly:"RB",that:"RB",rmly:"RB",dely:"RB",high:"RB",orst:"RB",atly:"RB",exly:"RB",atim:"RB",diem:"RB",iori:"RB",utly:"RB",oors:"RB",ffly:"RB",udly:"RB",bily:"RB"}},{}],14:[function(require,module,exports){var rules=function(){var main=[{reg:/.[cts]hy$/i,pos:"JJ",strength:64,errors:1,accuracy:"0.98"},{reg:/.[st]ty$/i,pos:"JJ",strength:44,errors:1,accuracy:"0.98"},{reg:/.[lnr]ize$/i,pos:"VB",strength:91,errors:2,accuracy:"0.98"},{reg:/.[gk]y$/i,pos:"JJ",strength:113,errors:3,accuracy:"0.97"},{reg:/.fies$/i,pos:"VB",strength:30,errors:1,accuracy:"0.97"},{reg:/.some$/i,pos:"JJ",strength:34,errors:1,accuracy:"0.97"},{reg:/.[nrtumcd]al$/i,pos:"JJ",strength:513,errors:16,accuracy:"0.97"},{reg:/.que$/i,pos:"JJ",strength:26,errors:1,accuracy:"0.96"},{reg:/.[tnl]ary$/i,pos:"JJ",strength:87,errors:4,accuracy:"0.95"},{reg:/.[di]est$/i,pos:"JJS",strength:74,errors:4,accuracy:"0.95"},{reg:/^(un|de|re)\-[a-z]../i,pos:"VB",strength:44,errors:2,accuracy:"0.95"},{reg:/.lar$/i,pos:"JJ",strength:83,errors:5,accuracy:"0.94"},{reg:/[bszmp]{2}y/,pos:"JJ",strength:95,errors:6,accuracy:"0.94"},{reg:/.zes$/i,pos:"VB",strength:54,errors:4,accuracy:"0.93"},{reg:/.[icldtgrv]ent$/i,pos:"JJ",strength:214,errors:14,accuracy:"0.93"},{reg:/.[rln]ates$/i,pos:"VBZ",strength:74,errors:5,accuracy:"0.93"},{reg:/.[oe]ry$/i,pos:"JJ",strength:150,errors:10,accuracy:"0.93"},{reg:/.[rdntk]ly$/i,pos:"JJ",strength:108,errors:9,accuracy:"0.92"},{reg:/.[lsrnpb]ian$/i,pos:"JJ",strength:121,errors:10,accuracy:"0.92"},{reg:/.[vrl]id$/i,pos:"JJ",strength:23,errors:2,accuracy:"0.91"},{reg:/.[ilk]er$/i,pos:"JJR",strength:167,errors:17,accuracy:"0.90"},{reg:/.ike$/i,pos:"JJ",strength:71,errors:8,accuracy:"0.89"},{reg:/.ends$/i,pos:"VB",strength:24,errors:3,accuracy:"0.88"},{reg:/.wards$/i,pos:"RB",strength:31,errors:4,accuracy:"0.87"},{reg:/.rmy$/i,pos:"JJ",strength:7,errors:1,accuracy:"0.86"},{reg:/.rol$/i,pos:"NN",strength:7,errors:1,accuracy:"0.86"},{reg:/.tors$/i,pos:"NN",strength:7,errors:1,accuracy:"0.86"},{reg:/.azy$/i,pos:"JJ",strength:7,errors:1,accuracy:"0.86"},{reg:/.where$/i,pos:"RB",strength:7,errors:1,accuracy:"0.86"},{reg:/.ify$/i,pos:"VB",strength:49,errors:7,accuracy:"0.86"},{reg:/.bound$/i,pos:"JJ",strength:22,errors:3,accuracy:"0.86"},{reg:/.ens$/i,pos:"VB",strength:42,errors:6,accuracy:"0.86"},{reg:/.oid$/i,pos:"JJ",strength:20,errors:3,accuracy:"0.85"},{reg:/.vice$/i,pos:"NN",strength:6,errors:1,accuracy:"0.83"},{reg:/.rough$/i,pos:"JJ",strength:6,errors:1,accuracy:"0.83"},{reg:/.mum$/i,pos:"JJ",strength:6,errors:1,accuracy:"0.83"},{reg:/.teen(th)?$/i,pos:"CD",strength:17,errors:3,accuracy:"0.82"},{reg:/.oses$/i,pos:"VB",strength:22,errors:4,accuracy:"0.82"},{reg:/.ishes$/i,pos:"VB",strength:21,errors:4,accuracy:"0.81"},{reg:/.-ever$/i,pos:"RB",strength:10,errors:2,accuracy:"0.80"},{reg:/.ects$/i,pos:"VB",strength:30,errors:6,accuracy:"0.80"},{reg:/.ieth$/i,pos:"CD",strength:5,errors:1,accuracy:"0.80"},{reg:/.ices$/i,pos:"NN",strength:15,errors:3,accuracy:"0.80"},{reg:/.bles$/i,pos:"VB",strength:20,errors:4,accuracy:"0.80"},{reg:/.pose$/i,pos:"VB",strength:19,errors:4,accuracy:"0.79"},{reg:/.ions$/i,pos:"NN",strength:9,errors:2,accuracy:"0.78"},{reg:/.ean$/i,pos:"JJ",strength:32,errors:7,accuracy:"0.78"},{reg:/.[ia]sed$/i,pos:"JJ",strength:151,errors:35,accuracy:"0.77"},{reg:/.tized$/i,pos:"VB",strength:21,errors:5,accuracy:"0.76"},{reg:/.llen$/i,pos:"JJ",strength:8,errors:2,accuracy:"0.75"},{reg:/.fore$/i,pos:"RB",strength:8,errors:2,accuracy:"0.75"},{reg:/. of$/i,pos:"RB",strength:8,errors:2,accuracy:"0.75"},{reg:/.ances$/i,pos:"NN",strength:8,errors:2,accuracy:"0.75"},{reg:/.gate$/i,pos:"VB",strength:23,errors:6,accuracy:"0.74"},{reg:/.nes$/i,pos:"VB",strength:27,errors:7,accuracy:"0.74"},{reg:/.less$/i,pos:"RB",strength:11,errors:3,accuracy:"0.73"},{reg:/.ried$/i,pos:"JJ",strength:22,errors:6,accuracy:"0.73"},{reg:/.gone$/i,pos:"JJ",strength:7,errors:2,accuracy:"0.71"},{reg:/.made$/i,pos:"JJ",strength:7,errors:2,accuracy:"0.71"},{reg:/.[pdltrkvyns]ing$/i,pos:"JJ",strength:942,errors:280,accuracy:"0.70"},{reg:/.tions$/i,pos:"NN",strength:71,errors:21,accuracy:"0.70"},{reg:/.tures$/i,pos:"NN",strength:16,errors:5,accuracy:"0.69"},{reg:/.ous$/i,pos:"JJ",strength:6,errors:2,accuracy:"0.67"},{reg:/.ports$/i,pos:"NN",strength:9,errors:3,accuracy:"0.67"},{reg:/. so$/i,pos:"RB",strength:3,errors:1,accuracy:"0.67"},{reg:/.ints$/i,pos:"NN",strength:11,errors:4,accuracy:"0.64"},{reg:/.gled$/i,pos:"JJ",strength:16,errors:7,accuracy:"0.56"},{reg:/.lked$/i,pos:"VB",strength:16,errors:7,accuracy:"0.56"},{reg:/.fully$/i,pos:"RB",strength:13,errors:6,accuracy:"0.54"},{reg:/.*ould$/,pos:"MD",strength:3,errors:0,accuracy:"0.00"},{reg:/[a-z]'s$/i,pos:"NN",strength:1,errors:0,accuracy:"0.00"},{reg:/.'n$/i,pos:"VB",strength:1,errors:0,accuracy:"0.00"},{reg:/^-?[0-9]+(.[0-9]+)?$/,pos:"CD",strength:1,errors:1,accuracy:"0.00"}];if(typeof module!=="undefined"&&module.exports){exports.rules=main}return main}()},{}],15:[function(require,module,exports){var pos=function(){if(typeof module!=="undefined"&&module.exports){var tokenizer=require("../tokenization/tokenize").tokenize;var parts_of_speech=require("./data/parts_of_speech");var word_rules=require("./data/word_rules").rules;var lexicon=require("./data/lexicon");var sentence_rules=require("./data/sentence_rules");var wordnet_suffixes=require("./data/unambiguous_suffixes").data}var lexicon_pass=function(w){if(lexicon[w]){return parts_of_speech[lexicon[w]]}};var rules_pass=function(w){for(var i=0;i<word_rules.length;i++){if(w.match(word_rules[i].reg)){return parts_of_speech[word_rules[i].pos]}}};var main=function(text,options){var sentences=tokenizer(text);sentences.forEach(function(sentence){sentence.tokens=sentence.tokens.map(function(token){var lex=lexicon_pass(token.normalised);if(lex){token.pos=lex;token.pos_reason="lexicon";return token}var len=token.normalised.length;if(len>4){var suffix=token.normalised.substr(len-4,len-1);if(wordnet_suffixes[suffix]){token.pos=parts_of_speech[wordnet_suffixes[suffix]];token.pos_reason="wordnet suffix";return token}}var r=rules_pass(token.normalised);if(r){token.pos=r;token.pos_reason="regex suffix";return token}if(!token.start&&token.capitalised){token.pos=parts_of_speech["NN"];token.pos_reason="capitalised";return token}return token});sentence.tokens=sentence.tokens.map(function(token){if(!token.pos){token.pos=parts_of_speech["NN"];token.pos_reason="noun fallback"}return token})});return sentences};if(typeof module!=="undefined"&&module.exports){exports.pos=main;exports.parts_of_speech=parts_of_speech}return main}();function render(arr){arr.forEach(function(sentence){sentence.tokens.forEach(function(token){console.log(token.text+" "+(token.pos||{}).tag+" ("+token.pos_reason+")")})})}},{"../tokenization/tokenize":19,"./data/lexicon":10,"./data/parts_of_speech":11,"./data/sentence_rules":12,"./data/unambiguous_suffixes":13,"./data/word_rules":14}],16:[function(require,module,exports){var multiples=function(){var main=["of course","at least","for example","no longer","for instance","sort of","at first","at last","that is","at once","once again","at present","up to","once more","by now","so as","all but","even so","just about","as yet","for long","far from","for ever","on board","a lot","by far","over here","per annum","as usual","at best","for once","at large","any longer","for good","vice versa","for certain","anything but","en route","at length","at random","for sure","upside down","at most","per se","per capita","up front","in situ","inter alia","ex parte","in vitro","in vivo","at worst","prima facie","upwards of","something like","en masse","ultra vires","a priori","ad hoc","et cetera","de facto","off guard","spot on","ipso facto","ad infinitum","en bloc","point blank","a fortiori","ad nauseam","inside out","sotto voce","pro rata","in memoriam","in extremis","not withstanding","most part","for keeps","al fresco","ab initio","de jure","a la","sub judice","post hoc","so on","sine die","op cit","just in","ex gratia","au contraire","ad hominem","a posteriori","fed up","brand new","so called","old fashioned","grown up","bona fide","well off","far off","par excellence","straight forward","hard up","de luxe","post mortem","sui generis","ex officio","en suite","all right","avant garde","viva voce","sans serif","gung ho","super duper","such like","de trop"];main=main.map(function(m){return m.split(" ")});if(typeof module!=="undefined"&&module.exports){exports.multiples=main}return main}()},{}],17:[function(require,module,exports){var ngram=function(){var main=function(text,options){options=options||{};var min_count=options.min_count||1;var max_size=options.max_size||5;var REallowedChars=/[^a-zA-Z'\-]+/g;var i,j,k,textlen,len,s;var keys=[null];var results=[];max_size++;for(i=1;i<=max_size;i++){keys.push({})}text=text.replace(REallowedChars," ").replace(/^\s+/,"").replace(/\s+$/,"");text=text.toLowerCase();text=text.split(/\s+/);for(i=0,textlen=text.length;i<textlen;i++){s=text[i];keys[1][s]=(keys[1][s]||0)+1;for(j=2;j<=max_size;j++){if(i+j<=textlen){s+=" "+text[i+j-1];keys[j][s]=(keys[j][s]||0)+1}else break}}for(var k=1;k<=max_size;k++){results[k]=[];var key=keys[k];for(var i in key){if(key[i]>=min_count)results[k].push({word:i,count:key[i],size:k})}}results=results.filter(function(s){return s!=null});results=results.map(function(r){r=r.sort(function(a,b){return b.count-a.count});return r});return results};if(typeof module!=="undefined"&&module.exports){exports.ngram=main}return main}()},{}],18:[function(require,module,exports){var sentences=function(){var main=function(text){var abbrev,abbrevs,clean,i,sentences,tmp;tmp=text.split(/(\S.+?[.])(?=\s+|$)/g);sentences=[];abbrevs=["jr","mr","mrs","ms","dr","prof","sr","sen","rep","gov","atty","supt","det","rev","col","gen","lt","cmdr","adm","capt","sgt","cpl","maj","dept","univ","assn","bros","inc","ltd","co","corp","arc","al","ave","blvd","cl","ct","cres","exp","rd","st","dist","mt","ft","fy","hwy","la","pd","pl","plz","tce","Ala","Ariz","Ark","Cal","Calif","Col","Colo","Conn","Del","Fed","Fla","Ga","Ida","Id","Ill","Ind","Ia","Kan","Kans","Ken","Ky","La","Me","Md","Mass","Mich","Minn","Miss","Mo","Mont","Neb","Nebr","Nev","Mex","Okla","Ok","Ore","Penna","Penn","Pa","Dak","Tenn","Tex","Ut","Vt","Va","Wash","Wis","Wisc","Wy","Wyo","USAFA","Alta","Ont","QuÔøΩ","Sask","Yuk","jan","feb","mar","apr","jun","jul","aug","sep","oct","nov","dec","sept","vs","etc","esp","llb","md","bl","phd","ma","ba","miss","misses","mister","sir","esq","mstr","lit","fl","ex","eg","sep","sept"];abbrev=new RegExp("(^| )("+abbrevs.join("|")+")[.] ?$","i");for(i in tmp){if(tmp[i]){tmp[i]=tmp[i].replace(/^\s+|\s+$/g,"");if(tmp[i].match(abbrev)||tmp[i].match(/[ |\.][A-Z]\.?$/)){tmp[parseInt(i)+1]=tmp[i]+" "+tmp[parseInt(i)+1]}else{sentences.push(tmp[i]);tmp[i]=""}}}clean=[];for(i in sentences){sentences[i]=sentences[i].replace(/^\s+|\s+$/g,"");if(sentences[i]){clean.push(sentences[i])}}if(clean.length==0){return[text]}return clean};if(typeof module!=="undefined"&&module.exports){exports.sentences=main}return main}()},{}],19:[function(require,module,exports){var tokenize=function(){if(typeof module!=="undefined"&&module.exports){var sentence_parser=require("./sentence").sentences;var multiples=require("./data/multiples").multiples}var normalise=function(str){str=str.toLowerCase();str=str.replace(/[,\.!:;\?]/,"");return str};var sentence_type=function(sentence){if(sentence.match(/\?$/)){return"question"}else{return"statement"}};var combine_multiples=function(arr){var better=[];for(var i=0;i<arr.length;i++){for(var o=0;o<multiples.length;o++){if(arr[i+1]&&arr[i]==multiples[o][0]&&normalise(arr[i+1])==multiples[o][1]){arr[i]=arr[i]+" "+arr[i+1];arr[i+1]=null;break}}better.push(arr[i])}return better.filter(function(w){return w})};var main=function(str){var sentences=sentence_parser(str);return sentences.map(function(sentence){var arr=sentence.split(" ");arr=combine_multiples(arr);var tokens=arr.map(function(w,i){return{text:w,normalised:normalise(w),capitalised:i>0&&w.match(/^[A-Z][a-z]/)!=null||undefined,punctuated:w.match(/[,;:]$/)!=null||undefined,end:i==arr.length-1||undefined,start:i==0||undefined}});return{sentence:sentence,tokens:tokens,type:sentence_type(sentence)}})};if(typeof module!=="undefined"&&module.exports){exports.tokenize=main}return main}()},{"./data/multiples":16,"./sentence":18}],20:[function(require,module,exports){var normalize=function(){var data=[["²","2"],["ƻ","2"],["³","3"],["Ʒ","3"],["Ƹ","3"],["ƹ","3"],["ƺ","3"],["Ǯ","3"],["ǯ","3"],["З","3"],["Ҙ","3"],["ҙ","3"],["Ӟ","3"],["ӟ","3"],["Ӡ","3"],["ӡ","3"],["Ȝ","3"],["ȝ","3"],["Ƽ","5"],["ƽ","5"],["Ȣ","8"],["ȣ","8"],["¡","!"],["¿","?"],["Ɂ","?"],["ɂ","?"],["ª","a"],["À","a"],["Á","a"],["Â","a"],["Ã","a"],["Ä","a"],["Å","a"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","a"],["å","a"],["Ā","a"],["ā","a"],["Ă","a"],["ă","a"],["Ą","a"],["ą","a"],["Ǎ","a"],["ǎ","a"],["Ǟ","a"],["ǟ","a"],["Ǡ","a"],["ǡ","a"],["Ǻ","a"],["ǻ","a"],["Ȁ","a"],["ȁ","a"],["Ȃ","a"],["ȃ","a"],["Ȧ","a"],["ȧ","a"],["Ⱥ","a"],["Ά","a"],["Α","a"],["Δ","a"],["Λ","a"],["ά","a"],["α","a"],["λ","a"],["А","a"],["Д","a"],["а","a"],["д","a"],["Ѧ","a"],["ѧ","a"],["Ӑ","a"],["ӑ","a"],["Ӓ","a"],["ӓ","a"],["ƛ","a"],["Ʌ","a"],["ß","b"],["þ","b"],["ƀ","b"],["Ɓ","b"],["Ƃ","b"],["ƃ","b"],["Ƅ","b"],["ƅ","b"],["Ƀ","b"],["Β","b"],["β","b"],["ϐ","b"],["Ϧ","b"],["Б","b"],["В","b"],["Ъ","b"],["Ь","b"],["б","b"],["в","b"],["ъ","b"],["ь","b"],["Ѣ","b"],["ѣ","b"],["Ҍ","b"],["ҍ","b"],["Ҕ","b"],["ҕ","b"],["ƥ","b"],["ƾ","b"],["¢","c"],["©","c"],["Ç","c"],["ç","c"],["Ć","c"],["ć","c"],["Ĉ","c"],["ĉ","c"],["Ċ","c"],["ċ","c"],["Č","c"],["č","c"],["Ɔ","c"],["Ƈ","c"],["ƈ","c"],["Ȼ","c"],["ȼ","c"],["ͻ","c"],["ͼ","c"],["ͽ","c"],["ϲ","c"],["Ϲ","c"],["Ͻ","c"],["Ͼ","c"],["Ͽ","c"],["Є","c"],["С","c"],["с","c"],["є","c"],["Ҁ","c"],["ҁ","c"],["Ҫ","c"],["ҫ","c"],["Ð","d"],["Ď","d"],["ď","d"],["Đ","d"],["đ","d"],["Ɖ","d"],["Ɗ","d"],["ȡ","d"],["Ƌ","d"],["ƌ","d"],["Ƿ","d"],["È","e"],["É","e"],["Ê","e"],["Ë","e"],["è","e"],["é","e"],["ê","e"],["ë","e"],["Ē","e"],["ē","e"],["Ĕ","e"],["ĕ","e"],["Ė","e"],["ė","e"],["Ę","e"],["ę","e"],["Ě","e"],["ě","e"],["Ǝ","e"],["Ə","e"],["Ɛ","e"],["ǝ","e"],["Ȅ","e"],["ȅ","e"],["Ȇ","e"],["ȇ","e"],["Ȩ","e"],["ȩ","e"],["Ɇ","e"],["ɇ","e"],["Έ","e"],["Ε","e"],["Ξ","e"],["Σ","e"],["έ","e"],["ε","e"],["ξ","e"],["ϱ","e"],["ϵ","e"],["϶","e"],["Ѐ","e"],["Ё","e"],["Е","e"],["Э","e"],["е","e"],["ѐ","e"],["ё","e"],["Ҽ","e"],["ҽ","e"],["Ҿ","e"],["ҿ","e"],["Ӗ","e"],["ӗ","e"],["Ә","e"],["ә","e"],["Ӛ","e"],["ӛ","e"],["Ӭ","e"],["ӭ","e"],["Ƒ","f"],["ƒ","f"],["Ϝ","f"],["ϝ","f"],["Ӻ","f"],["ӻ","f"],["Ĝ","g"],["ĝ","g"],["Ğ","g"],["ğ","g"],["Ġ","g"],["ġ","g"],["Ģ","g"],["ģ","g"],["Ɠ","g"],["Ǥ","g"],["ǥ","g"],["Ǧ","g"],["ǧ","g"],["Ǵ","g"],["ǵ","g"],["Ĥ","h"],["ĥ","h"],["Ħ","h"],["ħ","h"],["ƕ","h"],["Ƕ","h"],["Ȟ","h"],["ȟ","h"],["Ή","h"],["Η","h"],["Ђ","h"],["Њ","h"],["Ћ","h"],["Н","h"],["н","h"],["ђ","h"],["ћ","h"],["Ң","h"],["ң","h"],["Ҥ","h"],["ҥ","h"],["Һ","h"],["һ","h"],["Ӊ","h"],["ӊ","h"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["ì","i"],["í","i"],["î","i"],["ï","i"],["Ĩ","i"],["ĩ","i"],["Ī","i"],["ī","i"],["Ĭ","i"],["ĭ","i"],["Į","i"],["į","i"],["İ","i"],["ı","i"],["Ɩ","i"],["Ɨ","i"],["Ȉ","i"],["ȉ","i"],["Ȋ","i"],["ȋ","i"],["Ί","i"],["ΐ","i"],["Ϊ","i"],["ί","i"],["ι","i"],["ϊ","i"],["І","i"],["Ї","i"],["і","i"],["ї","i"],["Ĵ","j"],["ĵ","j"],["ǰ","j"],["ȷ","j"],["Ɉ","j"],["ɉ","j"],["ϳ","j"],["Ј","j"],["ј","j"],["Ķ","k"],["ķ","k"],["ĸ","k"],["Ƙ","k"],["ƙ","k"],["Ǩ","k"],["ǩ","k"],["Κ","k"],["κ","k"],["Ќ","k"],["Ж","k"],["К","k"],["ж","k"],["к","k"],["ќ","k"],["Қ","k"],["қ","k"],["Ҝ","k"],["ҝ","k"],["Ҟ","k"],["ҟ","k"],["Ҡ","k"],["ҡ","k"],["Ĺ","l"],["ĺ","l"],["Ļ","l"],["ļ","l"],["Ľ","l"],["ľ","l"],["Ŀ","l"],["ŀ","l"],["Ł","l"],["ł","l"],["ƚ","l"],["ƪ","l"],["ǀ","l"],["Ǐ","l"],["ǐ","l"],["ȴ","l"],["Ƚ","l"],["Ι","l"],["Ӏ","l"],["ӏ","l"],["Μ","m"],["Ϻ","m"],["ϻ","m"],["М","m"],["м","m"],["Ӎ","m"],["ӎ","m"],["Ñ","n"],["ñ","n"],["Ń","n"],["ń","n"],["Ņ","n"],["ņ","n"],["Ň","n"],["ň","n"],["ʼn","n"],["Ŋ","n"],["ŋ","n"],["Ɲ","n"],["ƞ","n"],["Ǹ","n"],["ǹ","n"],["Ƞ","n"],["ȵ","n"],["Ν","n"],["Π","n"],["ή","n"],["η","n"],["Ϟ","n"],["Ѝ","n"],["И","n"],["Й","n"],["Л","n"],["П","n"],["и","n"],["й","n"],["л","n"],["п","n"],["ѝ","n"],["Ҋ","n"],["ҋ","n"],["Ӆ","n"],["ӆ","n"],["Ӣ","n"],["ӣ","n"],["Ӥ","n"],["ӥ","n"],["π","n"],["Ò","o"],["Ó","o"],["Ô","o"],["Õ","o"],["Ö","o"],["Ø","o"],["ð","o"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","o"],["ø","o"],["Ō","o"],["ō","o"],["Ŏ","o"],["ŏ","o"],["Ő","o"],["ő","o"],["Ɵ","o"],["Ơ","o"],["ơ","o"],["Ǒ","o"],["ǒ","o"],["Ǫ","o"],["ǫ","o"],["Ǭ","o"],["ǭ","o"],["Ǿ","o"],["ǿ","o"],["Ȍ","o"],["ȍ","o"],["Ȏ","o"],["ȏ","o"],["Ȫ","o"],["ȫ","o"],["Ȭ","o"],["ȭ","o"],["Ȯ","o"],["ȯ","o"],["Ȱ","o"],["ȱ","o"],["Ό","o"],["Θ","o"],["Ο","o"],["Φ","o"],["Ω","o"],["δ","o"],["θ","o"],["ο","o"],["σ","o"],["ό","o"],["ϕ","o"],["Ϙ","o"],["ϙ","o"],["Ϭ","o"],["ϭ","o"],["ϴ","o"],["О","o"],["Ф","o"],["о","o"],["Ѳ","o"],["ѳ","o"],["Ѻ","o"],["ѻ","o"],["Ѽ","o"],["ѽ","o"],["Ӧ","o"],["ӧ","o"],["Ө","o"],["ө","o"],["Ӫ","o"],["ӫ","o"],["¤","o"],["ƍ","o"],["Ώ","o"],["Ƥ","p"],["ƿ","p"],["Ρ","p"],["ρ","p"],["Ϸ","p"],["ϸ","p"],["ϼ","p"],["Р","p"],["р","p"],["Ҏ","p"],["ҏ","p"],["Þ","p"],["Ɋ","q"],["ɋ","q"],["­®","r"],["Ŕ","r"],["ŕ","r"],["Ŗ","r"],["ŗ","r"],["Ř","r"],["ř","r"],["Ʀ","r"],["Ȑ","r"],["ȑ","r"],["Ȓ","r"],["ȓ","r"],["Ɍ","r"],["ɍ","r"],["Ѓ","r"],["Г","r"],["Я","r"],["г","r"],["я","r"],["ѓ","r"],["Ґ","r"],["ґ","r"],["Ғ","r"],["ғ","r"],["Ӷ","r"],["ӷ","r"],["ſ","r"],["Ś","s"],["ś","s"],["Ŝ","s"],["ŝ","s"],["Ş","s"],["ş","s"],["Š","s"],["š","s"],["Ƨ","s"],["ƨ","s"],["Ș","s"],["ș","s"],["ȿ","s"],["ς","s"],["Ϛ","s"],["ϛ","s"],["ϟ","s"],["Ϩ","s"],["ϩ","s"],["Ѕ","s"],["ѕ","s"],["Ţ","t"],["ţ","t"],["Ť","t"],["ť","t"],["Ŧ","t"],["ŧ","t"],["ƫ","t"],["Ƭ","t"],["ƭ","t"],["Ʈ","t"],["Ț","t"],["ț","t"],["ȶ","t"],["Ⱦ","t"],["Γ","t"],["Τ","t"],["τ","t"],["Ϯ","t"],["ϯ","t"],["Т","t"],["т","t"],["҂","t"],["Ҭ","t"],["ҭ","t"],["µ","u"],["Ù","u"],["Ú","u"],["Û","u"],["Ü","u"],["ù","u"],["ú","u"],["û","u"],["ü","u"],["Ũ","u"],["ũ","u"],["Ū","u"],["ū","u"],["Ŭ","u"],["ŭ","u"],["Ů","u"],["ů","u"],["Ű","u"],["ű","u"],["Ų","u"],["ų","u"],["Ư","u"],["ư","u"],["Ʊ","u"],["Ʋ","u"],["Ǔ","u"],["ǔ","u"],["Ǖ","u"],["ǖ","u"],["Ǘ","u"],["ǘ","u"],["Ǚ","u"],["ǚ","u"],["Ǜ","u"],["ǜ","u"],["Ȕ","u"],["ȕ","u"],["Ȗ","u"],["ȗ","u"],["Ʉ","u"],["ΰ","u"],["μ","u"],["υ","u"],["ϋ","u"],["ύ","u"],["ϑ","u"],["Џ","u"],["Ц","u"],["Ч","u"],["ц","u"],["џ","u"],["Ҵ","u"],["ҵ","u"],["Ҷ","u"],["ҷ","u"],["Ҹ","u"],["ҹ","u"],["Ӌ","u"],["ӌ","u"],["Ӈ","u"],["ӈ","u"],["Ɣ","v"],["ν","v"],["Ѵ","v"],["ѵ","v"],["Ѷ","v"],["ѷ","v"],["Ŵ","w"],["ŵ","w"],["Ɯ","w"],["ω","w"],["ώ","w"],["ϖ","w"],["Ϣ","w"],["ϣ","w"],["Ш","w"],["Щ","w"],["ш","w"],["щ","w"],["ѡ","w"],["ѿ","w"],["×","x"],["Χ","x"],["χ","x"],["ϗ","x"],["ϰ","x"],["Х","x"],["х","x"],["Ҳ","x"],["ҳ","x"],["Ӽ","x"],["ӽ","x"],["Ӿ","x"],["ӿ","x"],["¥","y"],["Ý","y"],["ý","y"],["ÿ","y"],["Ŷ","y"],["ŷ","y"],["Ÿ","y"],["Ƴ","y"],["ƴ","y"],["Ȳ","y"],["ȳ","y"],["Ɏ","y"],["ɏ","y"],["Ύ","y"],["Υ","y"],["Ψ","y"],["Ϋ","y"],["γ","y"],["ψ","y"],["ϒ","y"],["ϓ","y"],["ϔ","y"],["Ў","y"],["У","y"],["у","y"],["ч","y"],["ў","y"],["Ѱ","y"],["ѱ","y"],["Ү","y"],["ү","y"],["Ұ","y"],["ұ","y"],["Ӯ","y"],["ӯ","y"],["Ӱ","y"],["ӱ","y"],["Ӳ","y"],["ӳ","y"],["Ź","z"],["ź","z"],["Ż","z"],["ż","z"],["Ž","z"],["ž","z"],["Ʃ","z"],["Ƶ","z"],["ƶ","z"],["Ȥ","z"],["ȥ","z"],["ɀ","z"],["Ζ","z"],["ζ","z"]];
var normaler={};var greek={};data.forEach(function(arr){normaler[arr[0]]=arr[1];greek[arr[1]]=arr[0]});var normalize=function(str,options){options=options||{};options.percentage=options.percentage||50;var arr=str.split("").map(function(s){var r=Math.random()*100;if(normaler[s]&&r<options.percentage){return normaler[s]||s}else{return s}});return arr.join("")};var denormalize=function(str,options){options=options||{};options.percentage=options.percentage||50;var arr=str.split("").map(function(s){var r=Math.random()*100;if(greek[s]&&r<options.percentage){return greek[s]||s}else{return s}});return arr.join("")};var obj={normalize:normalize,denormalize:denormalize};if(typeof module!=="undefined"&&module.exports){module.exports=obj}return obj}()},{}],21:[function(require,module,exports){var tests=function(){if(typeof module!=="undefined"&&module.exports){nlp=require("./index")}function test_others(){print_header("sentence");arr=nlp.sentences("Hi there Dr. Joe, the price is 4.59 for N.A.S.A. Ph.Ds. I hope that's fine, etc. and you can attend Feb. 8th. Bye");console.log(arr.length==3);print_header("singularize");console.log(nlp.noun.singularize("earthquakes")=="earthquake");print_header("ngram");s=nlp.ngram("i really think that we all really think it's all good");console.log(s[1][0].word=="really think"&&s[1][0].count==2);console.log(s[0][0].word=="really"&&s[0][0].count==2);s=nlp.ngram("She sells seashells by the seashore. The shells she sells are surely seashells.");console.log(s[0][0].word=="she"&&s[0][0].count==2);print_header("adj_to_noun");console.log(nlp.adjective.to_noun("ferocious")=="ferociousness");console.log(nlp.adjective.to_noun("fancy")=="fanciness");print_header("dates");dates=nlp.dates("I got divorced on June 4th 1993, in Miami");console.log(dates.from.year=="1993"&&dates.from.month=="06"&&dates.from.day=="04");print_header("americanization");console.log(nlp.americanize("favourite")=="favorite");console.log(nlp.americanize("synthesised")=="synthesized");print_header("britishization");console.log(nlp.britishize("synthesized")=="synthesised");print_header("unicode");console.log(nlp.normalize("The ɋӈїck brown fox juӎÞs over tӊe laζy dog",{percentage:100})=="The quick brown fox jumps over the lazy dog");console.log(nlp.normalize("Björk",{percentage:100})=="Bjork")}function test_pos(){print_header("part of speech");var fails=[];assert_pos("Tony Hawk walked quickly to the store.",["NN","NN","VBD","RB","TO","DT","NN"]);assert_pos("swim",["VB"]);assert_pos("the swim",["DT","NN"]);assert_pos("the obviously good swim",["DT","RB","JJ","NN"]);assert_pos("spencer kelly",["NN","NN"]);assert_pos("swing",["NN"]);assert_pos("would normally swing",["MD","RB","VB"]);assert_pos("quietly lkajsfijf",["RB","JJ"]);assert_pos("schlooking in toronto is scarey and lkasf",["VBG","IN","NN","CP","JJ","CC","JJ"]);assert_pos("lkjasdf always walks so very nicely",["NN","RB","VBZ","RB","RB","RB"]);assert_pos("lkjasdf always walks in every cafesefirehty",["NN","RB","VBZ","IN","DT","NN"]);assert_pos("he lkajsdf so hard",["PRP","VB","RB","JJ"]);assert_pos("scared",["JJ"]);assert_pos("scared him hard",["VB","PRP","JJ"]);assert_pos("he is real",["PRP","CP","JJ"]);assert_pos("he is real cool",["PRP","CP","RB","JJ"]);assert_pos("a pretty, good and nice swim",["DT","JJ","JJ","CC","JJ","NN"]);assert_pos("a pretty good and nice swim",["DT","RB","JJ","CC","JJ","NN"]);return fails}function test_spot(){print_header("spotter");var options={gerund:true,stick_adjectives:true,stick_prepositions:true,stick_the:false,subnouns:false,match_whole:false};assert_spot("the strobelight at plastic people",{},["strobelight"]);assert_spot("the strobelight at plastic people",{stick_adjectives:true},["strobelight","plastic people"]);assert_spot("natalie portman in black swan",{},["natalie portman","swan"]);assert_spot("natalie portman in black swan",{stick_adjectives:true},["natalie portman","swan","black swan"]);assert_spot("i enjoyed watching children of men",{},[]);assert_spot("i enjoyed watching children of men",{stick_prepositions:true},["children of men"]);assert_spot("really lame",{},[]);assert_spot("really lame",{match_whole:true},["really lame"]);assert_spot("toronto international film festival",{},["toronto international film festival"]);assert_spot("toronto film festival",{subnouns:true},["toronto film festival","toronto","festival","toronto film","film festival"]);assert_spot("nancy reagan when she spoke about hiv in denver",{},["nancy reagan","hiv","denver"]);assert_spot("nancy reagan when she spoke about hiv in denver",{subnouns:true},["nancy reagan","hiv","denver","nancy","reagan"]);assert_spot("Dr. Conrad Murray guilty verdict",{},["dr. conrad murray guilty verdict"]);assert_spot("Dr. Conrad Murray guilty verdict",{subnouns:true},["dr. conrad murray guilty verdict","conrad","murray","guilty","verdict","conrad murray","murray guilty","guilty verdict","conrad murray guilty","murray guilty verdict","conrad murray guilty verdict"]);assert_spot("tom cruise and nancy kerrigan",{},["tom cruise","nancy kerrigan"]);assert_spot("strolling in berlin",{},["berlin"]);assert_spot("strolling in berlin",{gerund:true},["strolling","berlin"]);assert_spot("smoking all morning in the bathtub",{gerund:false},["morning","bathtub"]);assert_spot("smoking all morning in the bathtub",{gerund:true},["smoking","morning","bathtub"]);assert_spot("waking up and being exhausted at bob marley's house",{gerund:true},["waking up","bob marley"]);assert_spot("the simpsons",{},["simpsons"]);assert_spot("the simpsons",{stick_the:true},["simpsons","the simpsons"]);assert_spot("singing in the phantom of the opera",{stick_prepositions:false},["phantom","opera"]);assert_spot("singing in the phantom of the opera",{stick_prepositions:false,gerund:true},["singing","phantom","opera"])}function print_header(str){console.log("");console.log(" === "+str+" ===")}function arraysEqual(a,b){if(a===b)return true;if(a==null||b==null)return false;if(a.length!=b.length)return false;for(var i=0;i<a.length;++i){if(a[i]!==b[i]){return false}}return true}function assert_pos(str,arr){var the=nlp.pos(str,{});the=the.map(function(a){return a.pos}).map(function(a){return a.pos});if(arraysEqual(the,arr)){console.log("true")}else{console.log("fail =>"+str+" "+JSON.stringify(the)+" vs. "+JSON.stringify(arr))}}function assert_spot(str,obj,arr){var the=nlp.spot(str,obj);the=the.map(function(a){return a.word.toLowerCase()});if(arraysEqual(the,arr)){console.log("true")}else{console.log("fail =>"+str+" ");console.log(the);console.log(arr)}}var main=function(){test_others()};if(typeof module!=="undefined"&&module.exports){module.exports=main}return main}()},{"./index":"eCrcRd"}]},{},[]);var nlp=require("nlp_compromise");var sentences=nlp.pos("Cats always follow the player");console.log(sentences);sentences[0].tokens.forEach(function(part){console.log(part.pos.tag,part.pos.description,part.normalised,part.pos_reason)});
{
"name": "requirebin-sketch",
"version": "1.0.0",
"dependencies": {
"nlp_compromise": "0.0.6"
}
}
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; }
body, html { height: 100%; width: 100%; }</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment