compromise
Version:
natural language processing in the browser
1,175 lines (1,000 loc) • 398 kB
JavaScript
/* nlp_compromise v7.0.1
github.com/nlp-compromise
MIT
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.nlp = f()}})(function(){var define,module,exports;return (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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.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})({1:[function(_dereq_,module,exports){
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
(function () {
try {
cachedSetTimeout = setTimeout;
} catch (e) {
cachedSetTimeout = function () {
throw new Error('setTimeout is not defined');
}
}
try {
cachedClearTimeout = clearTimeout;
} catch (e) {
cachedClearTimeout = function () {
throw new Error('clearTimeout is not defined');
}
}
} ())
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = cachedSetTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
cachedClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
cachedSetTimeout(drainQueue, 0);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
},{}],2:[function(_dereq_,module,exports){
(function (process){
'use strict';
var escapeStringRegexp = _dereq_('escape-string-regexp');
var ansiStyles = _dereq_('ansi-styles');
var stripAnsi = _dereq_('strip-ansi');
var hasAnsi = _dereq_('has-ansi');
var supportsColor = _dereq_('supports-color');
var defineProps = Object.defineProperties;
var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM);
function Chalk(options) {
// detect mode if not set manually
this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
}
// use bright blue on Windows as the normal blue color is illegible
if (isSimpleWindowsTerm) {
ansiStyles.blue.open = '\u001b[94m';
}
var styles = (function () {
var ret = {};
Object.keys(ansiStyles).forEach(function (key) {
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
ret[key] = {
get: function () {
return build.call(this, this._styles.concat(key));
}
};
});
return ret;
})();
var proto = defineProps(function chalk() {}, styles);
function build(_styles) {
var builder = function () {
return applyStyle.apply(builder, arguments);
};
builder._styles = _styles;
builder.enabled = this.enabled;
// __proto__ is used because we must return a function, but there is
// no way to create a function with a different prototype.
/* eslint-disable no-proto */
builder.__proto__ = proto;
return builder;
}
function applyStyle() {
// support varags, but simply cast to string in case there's only one arg
var args = arguments;
var argsLen = args.length;
var str = argsLen !== 0 && String(arguments[0]);
if (argsLen > 1) {
// don't slice `arguments`, it prevents v8 optimizations
for (var a = 1; a < argsLen; a++) {
str += ' ' + args[a];
}
}
if (!this.enabled || !str) {
return str;
}
var nestedStyles = this._styles;
var i = nestedStyles.length;
// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
// see https://github.com/chalk/chalk/issues/58
// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
var originalDim = ansiStyles.dim.open;
if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {
ansiStyles.dim.open = '';
}
while (i--) {
var code = ansiStyles[nestedStyles[i]];
// Replace any instances already present with a re-opening code
// otherwise only the part of the string until said closing code
// will be colored, and the rest will simply be 'plain'.
str = code.open + str.replace(code.closeRe, code.open) + code.close;
}
// Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
ansiStyles.dim.open = originalDim;
return str;
}
function init() {
var ret = {};
Object.keys(styles).forEach(function (name) {
ret[name] = {
get: function () {
return build.call(this, [name]);
}
};
});
return ret;
}
defineProps(Chalk.prototype, init());
module.exports = new Chalk();
module.exports.styles = ansiStyles;
module.exports.hasColor = hasAnsi;
module.exports.stripColor = stripAnsi;
module.exports.supportsColor = supportsColor;
}).call(this,_dereq_('_process'))
},{"_process":1,"ansi-styles":3,"escape-string-regexp":4,"has-ansi":5,"strip-ansi":7,"supports-color":9}],3:[function(_dereq_,module,exports){
'use strict';
function assembleStyles () {
var styles = {
modifiers: {
reset: [0, 0],
bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
colors: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
gray: [90, 39]
},
bgColors: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49]
}
};
// fix humans
styles.colors.grey = styles.colors.gray;
Object.keys(styles).forEach(function (groupName) {
var group = styles[groupName];
Object.keys(group).forEach(function (styleName) {
var style = group[styleName];
styles[styleName] = group[styleName] = {
open: '\u001b[' + style[0] + 'm',
close: '\u001b[' + style[1] + 'm'
};
});
Object.defineProperty(styles, groupName, {
value: group,
enumerable: false
});
});
return styles;
}
Object.defineProperty(module, 'exports', {
enumerable: true,
get: assembleStyles
});
},{}],4:[function(_dereq_,module,exports){
'use strict';
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
module.exports = function (str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
return str.replace(matchOperatorsRe, '\\$&');
};
},{}],5:[function(_dereq_,module,exports){
'use strict';
var ansiRegex = _dereq_('ansi-regex');
var re = new RegExp(ansiRegex().source); // remove the `g` flag
module.exports = re.test.bind(re);
},{"ansi-regex":6}],6:[function(_dereq_,module,exports){
'use strict';
module.exports = function () {
return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
};
},{}],7:[function(_dereq_,module,exports){
'use strict';
var ansiRegex = _dereq_('ansi-regex')();
module.exports = function (str) {
return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
};
},{"ansi-regex":8}],8:[function(_dereq_,module,exports){
arguments[4][6][0].apply(exports,arguments)
},{"dup":6}],9:[function(_dereq_,module,exports){
(function (process){
'use strict';
var argv = process.argv;
var terminator = argv.indexOf('--');
var hasFlag = function (flag) {
flag = '--' + flag;
var pos = argv.indexOf(flag);
return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
};
module.exports = (function () {
if ('FORCE_COLOR' in process.env) {
return true;
}
if (hasFlag('no-color') ||
hasFlag('no-colors') ||
hasFlag('color=false')) {
return false;
}
if (hasFlag('color') ||
hasFlag('colors') ||
hasFlag('color=true') ||
hasFlag('color=always')) {
return true;
}
if (process.stdout && !process.stdout.isTTY) {
return false;
}
if (process.platform === 'win32') {
return true;
}
if ('COLORTERM' in process.env) {
return true;
}
if (process.env.TERM === 'dumb') {
return false;
}
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
return true;
}
return false;
})();
}).call(this,_dereq_('_process'))
},{"_process":1}],10:[function(_dereq_,module,exports){
module.exports={
"author": "Spencer Kelly <spencermountain@gmail.com> (http://spencermounta.in)",
"name": "compromise",
"description": "natural language processing in the browser",
"version": "7.0.1",
"main": "./builds/nlp_compromise.js",
"repository": {
"type": "git",
"url": "git://github.com/nlp-compromise/nlp_compromise.git"
},
"scripts": {
"test": "node ./scripts/test.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/",
"src/"
],
"dependencies": {
"chalk": "^1.1.3"
},
"devDependencies": {
"babel-preset-es2015": "6.9.0",
"babel-preset-stage-2": "^6.11.0",
"babelify": "7.3.0",
"browserify": "13.0.1",
"derequire": "^2.0.3",
"eslint": "^3.1.1",
"gaze": "^1.1.1",
"http-server": "0.9.0",
"jsdoc-parse": "^1.2.7",
"leakage": "^0.2.0",
"nlp-corpus": "latest",
"nyc": "^8.4.0",
"shelljs": "^0.7.2",
"tap-spec": "4.1.1",
"tape": "4.6.0",
"uglify-js": "2.7.0",
"uglifyify": "^3.0.3"
},
"license": "MIT"
}
},{}],11:[function(_dereq_,module,exports){
//adjectives that either aren't covered by rules, or have superlative/comparative forms
//this list is the seed, from which various forms are conjugated
'use strict';
var fns = _dereq_('../fns');
//suffix-index adjectives
// {cial:'cru,spe'} -> 'crucial', 'special'
var compressed = {
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,deep,earth,gris,heaven,low,meas,melancho,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: 'midd,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'
};
var arr = ['ablaze', 'above', 'adult', 'ahead', 'aloof', 'arab', 'asleep', 'average', 'awake', 'backwards', 'bad', 'blank', 'bogus', 'bottom', 'brisk', 'cagey', 'chief', 'civil', 'common', 'complex', 'cozy', 'crisp', 'deaf', 'devout', 'difficult', 'downtown', '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', 'less', 'level', 'lewd', 'magenta', 'makeshift', 'mammoth', 'medium', 'modern', 'moot', 'naive', 'nearby', 'next', 'nonstop', 'north', 'notable', 'offbeat', 'ok', 'outside', 'overwrought', 'premium', 'pricey', 'pro', 'quaint', 'random', 'rear', 'rebel', 'ritzy', 'rough', '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'];
module.exports = fns.uncompress_suffixes(arr, compressed);
},{"../fns":15}],12:[function(_dereq_,module,exports){
'use strict';
var fns = _dereq_('../fns');
//these are adjectives that can become comparative + superlative with out "most/more"
//its a whitelist for conjugation
//this data is shared between comparative/superlative methods
var compressed = {
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'
};
var arr = ['absurd', 'aggressive', 'alert', 'alive', 'angry', 'attractive', 'awesome', 'beautiful', 'big', 'bitter', 'black', 'blue', 'bored', 'boring', 'brash', 'brave', 'brief', 'bright', 'broad', 'brown', 'calm', 'charming', 'cheap', 'check', 'clean', 'clear', 'close', 'cold', 'cool', 'cruel', 'curly', 'cute', 'damp', 'dangerous', 'dark', 'dead', 'dear', 'deep', 'dirty', 'drunk', 'dry', 'dull', 'eager', 'early', 'easy', 'efficient', 'empty', 'even', 'extreme', 'faint', 'fair', 'fanc', 'fast', 'fat', 'feeble', 'few', 'fierce', 'fine', 'firm', 'flat', 'forgetful', 'formal', 'frail', 'free', 'fresh', 'full', 'funny', 'gentle', 'glad', 'glib', 'grand', 'great', 'green', 'gruesome', 'handsome', 'happy', 'hard', 'harsh', 'heavy', 'high', 'hollow', 'hot', 'hungry', 'impolite', 'important', 'innocent', 'intellegent', 'interesting', 'keen', 'kind', 'lame', 'large', 'late', 'lean', 'light', 'little', 'long', 'loose', 'loud', 'low', 'lucky', 'lush', 'macho', 'mad', 'mature', 'mean', 'meek', 'mellow', 'mundane', 'narrow', 'near', 'neat', 'new', 'nice', 'noisy', 'normal', 'odd', 'old', 'orange', 'pale', 'pink', 'plain', 'poor', 'proud', 'pure', 'purple', 'quick', 'quiet', 'rapid', 'rare', 'raw', 'red', 'rich', 'ripe', 'rotten', 'round', 'rude', 'sad', 'safe', 'scarce', 'scared', 'shallow', 'sharp', 'short', 'shrill', 'simple', 'slim', 'slow', 'small', 'smart', 'smooth', 'soft', 'solid', 'soon', 'sore', 'sour', 'square', 'stale', 'steep', 'stiff', 'straight', 'strange', 'strict', 'strong', 'sweet', 'swift', 'tall', 'tame', 'tart', 'tender', 'tense', 'thick', 'thin', 'thirsty', 'tight', 'tired', 'tough', 'true', 'vague', 'vast', 'vulgar', 'warm', 'weak', 'weird', 'wet', 'white', 'wide', 'wild', 'windy', 'wise', 'yellow', 'young'];
module.exports = fns.uncompress_suffixes(arr, compressed);
},{"../fns":15}],13:[function(_dereq_,module,exports){
'use strict';
//terms that are 'Date' term
var months = ['january', 'february',
// "march", //ambig
'april',
// "may", //ambig
'june', 'july', 'august', 'september', 'october', 'november', 'december', 'jan', 'feb', 'mar', 'apr', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec', 'sept', 'sep'];
var days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday', 'mon', 'tues', 'wed', 'thurs', 'fri', 'sat', 'sun'];
//add plural eg.'mondays'
for (var i = 0; i <= 6; i++) {
days.push(days[i] + 's');
}
var durations = ['millisecond',
// 'second',
'minute', 'hour', 'day', 'week', 'month', 'year', 'decade'];
//add their plurals
var len = durations.length;
for (var _i = 0; _i < len; _i++) {
durations.push(durations[_i]);
durations.push(durations[_i] + 's');
}
durations.push('century');
durations.push('centuries');
durations.push('seconds');
var relative = ['yesterday', 'today', 'tomorrow',
// 'week',
'weekend', 'tonight'];
module.exports = {
days: days,
months: months,
durations: durations,
relative: relative
};
},{}],14:[function(_dereq_,module,exports){
'use strict';
module.exports = ['all hallows eve', 'all saints day', 'all sts day', 'april fools', 'armistice day', 'australia day', 'bastille day', 'boxing day', 'canada day', 'christmas', 'christmas eve', 'cinco de mayo', 'emancipation day', 'groundhog day', 'halloween', '16 de septiembre', 'dieciseis de septiembre', 'grito de dolores', 'all hallows eve', 'day of the dead', 'dia de muertos', 'harvey milk day', 'inauguration day', 'independence day', 'independents day', 'juneteenth', 'labour day', 'national freedom day', 'national nurses day', 'new years', 'new years eve', 'purple heart day', 'rememberance day', 'rosa parks day', 'saint andrews day', 'saint patricks day', 'saint stephens day', 'saint valentines day', 'st andrews day', 'st patricks day', 'st stephens day', 'st valentines day ', 'valentines day', 'veterans day', 'victoria day', 'womens equality day', 'xmas',
// Fixed religious and cultural holidays
// Catholic + Christian
'epiphany', 'orthodox christmas day', 'orthodox new year', 'assumption of mary', 'all saints day', 'all souls day', 'feast of the immaculate conception', 'feast of our lady of guadalupe',
// Kwanzaa
'kwanzaa',
// Pagan / metal 🤘
'imbolc', 'beltaine', 'lughnassadh', 'samhain', 'martin luther king day', 'mlk day', 'presidents day', 'mardi gras', 'tax day', 'commonwealth day', 'mothers day', 'memorial day', 'fathers day', 'columbus day', 'indigenous peoples day', 'canadian thanksgiving', 'election day', 'thanksgiving', 't-day', 'turkey day', 'black friday', 'cyber monday',
// Astronomical religious and cultural holidays
// Catholic + Christian
'ash wednesday', 'palm sunday', 'maundy thursday', 'good friday', 'holy saturday', 'easter', 'easter sunday', 'easter monday', 'orthodox good friday', 'orthodox holy saturday', 'orthodox easter', 'orthodox easter monday', 'ascension day', 'pentecost', 'whitsunday', 'whit sunday', 'whit monday', 'trinity sunday', 'corpus christi', 'advent',
// Jewish
'tu bishvat', 'tu bshevat', 'purim', 'passover', 'yom hashoah', 'lag baomer', 'shavuot', 'tisha bav', 'rosh hashana', 'yom kippur', 'sukkot', 'shmini atzeret', 'simchat torah', 'chanukah', 'hanukkah',
// Muslim
'isra and miraj', 'lailat al-qadr', 'eid al-fitr', 'id al-Fitr', 'eid ul-Fitr', 'ramadan', 'eid al-adha', 'muharram', 'the prophets birthday',
// Pagan / metal 🤘
'ostara', 'march equinox', 'vernal equinox', 'litha', 'june solistice', 'summer solistice', 'mabon', 'september equinox', 'autumnal equinox', 'yule', 'december solstice', 'winter solstice',
// Additional important holidays
'chinese new year', 'diwali'];
},{}],15:[function(_dereq_,module,exports){
'use strict';
//shallow-merge an object
exports.extendObj = function (o, o2) {
Object.keys(o2).forEach(function (k) {
o[k] = o2[k];
});
return o;
};
//uncompress data in the adhoc compressed form {'ly':'kind,quick'}
exports.uncompress_suffixes = function (list, obj) {
var keys = Object.keys(obj);
var l = keys.length;
for (var i = 0; i < l; i++) {
var arr = obj[keys[i]].split(',');
for (var i2 = 0; i2 < arr.length; i2++) {
list.push(arr[i2] + keys[i]);
}
}
return list;
};
//uncompress data in the adhoc compressed form {'over':'blown,kill'}
exports.uncompress_prefixes = function (list, obj) {
var keys = Object.keys(obj);
var l = keys.length;
for (var i = 0; i < l; i++) {
var arr = obj[keys[i]].split(',');
for (var i2 = 0; i2 < arr.length; i2++) {
list.push(keys[i] + arr[i2]);
}
}
return list;
};
},{}],16:[function(_dereq_,module,exports){
'use strict';
//the data is all variously compressed and sorted
//this is just a helper file for the main file paths..
module.exports = {
'firstnames': _dereq_('./people/firstnames'),
'lastnames': _dereq_('./people/lastnames'),
'currencies': _dereq_('./values/currencies'),
'numbers': _dereq_('./values/numbers'),
'ordinalMap': _dereq_('./values/ordinalMap'),
'units': _dereq_('./values/units'),
'dates': _dereq_('./dates/dates'),
'holidays': _dereq_('./dates/holidays'),
'professions': _dereq_('./nouns/professions'),
'abbreviations': _dereq_('./nouns/abbreviations'),
'demonyms': _dereq_('./nouns/demonyms'),
'irregular_plurals': _dereq_('./nouns/irregular_plurals'),
'places': _dereq_('./nouns/places'),
'uncountables': _dereq_('./nouns/uncountables'),
'nouns': _dereq_('./nouns/nouns'),
'organizations': _dereq_('./organizations/organizations'),
'sportsTeams': _dereq_('./organizations/sportsTeams'),
'bands': _dereq_('./organizations/bands'),
'orgWords': _dereq_('./organizations/orgWords'),
'adjectives': _dereq_('./adjectives/adjectives'),
'superlatives': _dereq_('./adjectives/convertable'),
'irregular_verbs': _dereq_('./verbs/irregular_verbs'),
'verbs': _dereq_('./verbs/verbs'),
'misc': _dereq_('./misc/misc')
};
},{"./adjectives/adjectives":11,"./adjectives/convertable":12,"./dates/dates":13,"./dates/holidays":14,"./misc/misc":21,"./nouns/abbreviations":23,"./nouns/demonyms":24,"./nouns/irregular_plurals":25,"./nouns/nouns":26,"./nouns/places":27,"./nouns/professions":28,"./nouns/uncountables":29,"./organizations/bands":30,"./organizations/orgWords":31,"./organizations/organizations":32,"./organizations/sportsTeams":33,"./people/firstnames":36,"./people/lastnames":37,"./values/currencies":39,"./values/numbers":40,"./values/ordinalMap":41,"./values/units":42,"./verbs/irregular_verbs":43,"./verbs/verbs":45}],17:[function(_dereq_,module,exports){
'use strict';
//a lexicon is a giant object of known words
var data = _dereq_('./index');
var fns = _dereq_('./fns');
var fastConjugate = _dereq_('../term/verb/conjugate/faster');
var toPlural = _dereq_('../term/noun/inflect/toPlural');
var adj = {
toNoun: _dereq_('../term/adjective/toNoun'),
toSuperlative: _dereq_('../term/adjective/toSuperlative'),
toComparative: _dereq_('../term/adjective/toComparative'),
toAdverb: _dereq_('../term/adjective/toAdverb')
};
// console.time('lexicon');
var lexicon = {};
var addObj = function addObj(o) {
fns.extendObj(lexicon, o);
};
var addArr = function addArr(arr, tag) {
var l = arr.length;
for (var i = 0; i < l; i++) {
lexicon[arr[i]] = tag;
}
};
//let a rip
var units = data.units.words.filter(function (s) {
return s.length > 1;
});
addArr(units, 'Unit');
addArr(data.dates.durations, 'Duration');
addObj(data.abbreviations);
//number-words are well-structured
var obj = data.numbers.ordinal;
addArr(Object.keys(obj.ones), 'Ordinal');
addArr(Object.keys(obj.teens), 'Ordinal');
addArr(Object.keys(obj.tens), 'Ordinal');
addArr(Object.keys(obj.multiples), 'Ordinal');
obj = data.numbers.cardinal;
addArr(Object.keys(obj.ones), 'Cardinal');
addArr(Object.keys(obj.teens), 'Cardinal');
addArr(Object.keys(obj.tens), 'Cardinal');
addArr(Object.keys(obj.multiples), 'Cardinal');
addArr(Object.keys(data.numbers.prefixes), 'Cardinal');
//singular/plural
addArr(Object.keys(data.irregular_plurals.toPlural), 'Singular');
addArr(Object.keys(data.irregular_plurals.toSingle), 'Plural');
//dates are well-structured
addArr(data.dates.days, 'WeekDay');
addArr(data.dates.months, 'Month');
addArr(data.dates.relative, 'RelativeDay');
addArr(data.holidays, 'Holiday');
addArr(data.professions, 'Actor'); //?
addArr(data.demonyms, 'Demonym');
addArr(data.sportsTeams, 'SportsTeam');
addArr(data.bands, 'Organization');
addArr(data.orgWords, 'Noun');
//irregular verbs
Object.keys(data.irregular_verbs).forEach(function (k) {
lexicon[k] = 'Infinitive';
var conj = data.irregular_verbs[k];
Object.keys(conj).forEach(function (k2) {
if (conj[k2]) {
lexicon[conj[k2]] = k2;
}
});
});
//conjugate verblist
var wantVerbs = ['PastTense', 'PresentTense', 'Infinitive', 'Gerund', 'Actor', 'Adjective'];
data.verbs.forEach(function (v) {
var o = fastConjugate(v);
wantVerbs.forEach(function (k) {
if (o[k] && !lexicon[o[k]]) {
lexicon[o[k]] = k;
}
});
});
//conjugate adjectives
data.superlatives.forEach(function (a) {
lexicon[adj.toNoun(a)] = 'Noun';
lexicon[adj.toAdverb(a)] = 'Adverb';
lexicon[adj.toSuperlative(a)] = 'Superlative';
lexicon[adj.toComparative(a)] = 'Comparative';
});
//inflect nouns
data.nouns.forEach(function (n) {
lexicon[n] = 'Singular';
var plural = toPlural(n);
lexicon[plural] = 'Plural';
});
//let a rip.
addArr(data.verbs, 'Verb');
addObj(data.firstnames);
addArr(data.lastnames, 'LastName');
addArr(data.places.airports, 'Place');
addArr(data.places.cities, 'City');
addArr(data.places.countries, 'Country');
addArr(data.uncountables, 'Noun');
addArr(data.organizations, 'Organization');
addArr(data.adjectives, 'Adjective');
addArr(data.superlatives, 'Adjective');
addArr(data.currencies, 'Currency');
//these ad-hoc manual ones have priority
addObj(data.misc);
//for safety (these are sneaky)
delete lexicon[''];
delete lexicon[' '];
delete lexicon[null];
module.exports = lexicon;
// console.log(lexicon['muller']);
// let t = new Term('shake');
// t.tag.Verb = true;
// console.log(t.verb.conjugate())
// console.timeEnd('lexicon');
},{"../term/adjective/toAdverb":130,"../term/adjective/toComparative":131,"../term/adjective/toNoun":132,"../term/adjective/toSuperlative":133,"../term/noun/inflect/toPlural":150,"../term/verb/conjugate/faster":163,"./fns":15,"./index":16}],18:[function(_dereq_,module,exports){
'use strict';
module.exports = [
// 'now',
'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'];
},{}],19:[function(_dereq_,module,exports){
'use strict';
module.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',
//some other languages (what could go wrong?)
'la', 'le', 'les', 'des', 'de', 'du', 'el'];
},{}],20:[function(_dereq_,module,exports){
'use strict';
module.exports = ['uh', 'uhh', 'uh huh', 'uh-oh', 'please', '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', 'ya', 'hee', 'ohh', 'eh', 'yup', 'et cetera', 'a la'];
},{}],21:[function(_dereq_,module,exports){
'use strict';
var misc = {
'here': 'Noun',
'better': 'Comparative',
'earlier': 'Superlative',
'make sure': 'Verb',
'keep tabs': 'Verb',
'has': 'Verb',
'sounds': 'PresentTense',
//special case for took/taken
'taken': 'PastTense',
'msg': 'Verb', //slang
'a few': 'Value', //different than 'few people'
'years old': 'Unit', //special case
'not': 'Negative',
'never': 'Negative',
'no': 'Negative',
'no doubt': 'Noun',
'not only': 'Adverb',
'how\'s': 'QuestionWord' //not conjunction
};
var compact = {
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'],
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'],
//conjunctions
'Conjunction': ['yet', 'therefore', 'or', 'while', 'nor', 'whether', 'though', 'because', 'cuz', 'but', 'for', 'and', 'however', 'before', 'although', 'how', 'plus', 'versus', 'otherwise'],
Time: [
//date
'noon', 'midnight', 'now', 'morning', 'evening', 'afternoon', 'night', 'breakfast time', 'lunchtime', 'dinnertime', 'ago', 'sometime', 'eod', 'oclock'],
Date: [
//end of day, end of month
'eom', 'standard time', 'daylight time'],
'Condition': ['if', 'unless', 'notwithstanding'],
'PastTense': ['said', 'had', 'been', 'began', 'came', 'did', 'meant', 'went'],
'Verb': ['given', 'known', 'shown', 'seen', 'born'],
'Gerund': ['going', 'being', 'according', 'resulting', 'developing', 'staining'],
'Copula': ['is', 'are', 'was', 'were', 'am'],
//determiners
'Determiner': _dereq_('./determiners'),
//prepositions
'Preposition': _dereq_('./prepositions'),
//modal verbs
'Modal': ['can', 'may', 'could', 'might', 'will', 'ought to', 'would', 'must', 'shall', 'should', 'ought', 'shant', 'lets'],
//Possessive pronouns
'Possessive': ['mine', 'something', 'none', 'anything', 'anyone', 'theirs', 'himself', 'ours', 'his', 'my', 'their', 'yours', 'your', 'our', 'its', 'herself', 'hers', 'themselves', 'myself', 'her'],
//personal pronouns (nouns)
'Pronoun': ['it', 'they', 'i', 'them', 'you', 'she', 'me', 'he', 'him', 'ourselves', 'us', 'we', 'thou', 'il', 'elle', 'yourself', '\'em', 'he\'s', 'she\'s'],
//questions are awkward pos. are clarified in question_pass
'QuestionWord': ['where', 'why', 'when', 'who', 'whom', 'whose', 'what', 'which'],
//some manual adverbs (the rest are generated)
'Adverb': _dereq_('./adverbs'),
//interjections, expressions
'Expression': _dereq_('./expressions'),
//family-terms are people
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']
};
//unpack the compact terms into the misc lexicon..
var keys = Object.keys(compact);
for (var i = 0; i < keys.length; i++) {
var arr = compact[keys[i]];
for (var i2 = 0; i2 < arr.length; i2++) {
misc[arr[i2]] = keys[i];
}
}
module.exports = misc;
},{"./adverbs":18,"./determiners":19,"./expressions":20,"./prepositions":22}],22:[function(_dereq_,module,exports){
'use strict';
module.exports = ['\'o', 'a\'', 'about', 'across', 'after', 'along', 'amid', 'amidst', 'among', 'amongst', 'apropos', 'around', 'as', 'as long as', 'at', 'atop', 'barring', 'below', 'besides', 'between', 'by', 'chez', 'circa', 'despite', 'down', 'during', 'except', 'from', 'in', 'into', 'just like', 'mid', 'midst', 'notwithstanding', 'o\'', 'of', 'off', 'on', 'onto', 'out', 'per', 'qua', 'sans', 'since', 'so that', 'than', 'through', 'throughout', 'thru', 'till', 'to', 'towards', 'unlike', 'until', 'up', 'upon', 'versus', 'via', 'vis-a-vis', 'w/o', 'whereas', 'with', 'within', 'without', '-' //june - july
];
},{}],23:[function(_dereq_,module,exports){
//these are common word shortenings used in the lexicon and sentence segmentation methods
//there are all nouns,or at the least, belong beside one.
'use strict';
//common abbreviations
var compact = {
Noun: ['arc', 'al', 'exp', 'fy', 'pd', 'pl', 'plz', 'tce', 'bl', 'ma', 'ba', 'lit', 'ex', 'eg', 'ie', 'ca', 'cca', 'vs', 'etc', 'esp', 'ft',
//these are too ambiguous
'bc', 'ad', 'md', 'corp', 'col'],
Organization: ['dept', 'univ', 'assn', 'bros', 'inc', 'ltd', 'co',
//proper nouns with exclamation marks
'yahoo', 'joomla', 'jeopardy'],
Place: ['rd', 'st', 'dist', 'mt', 'ave', 'blvd', 'cl', 'ct', 'cres', 'hwy',
//states
'ariz', 'cal', 'calif', 'colo', 'conn', 'fla', 'fl', 'ga', 'ida', 'ia', 'kan', 'kans', 'minn', 'neb', 'nebr', 'okla', 'penna', 'penn', 'pa', 'dak', 'tenn', 'tex', 'ut', 'vt', 'va', 'wis', 'wisc', 'wy', 'wyo', 'usafa', 'alta', 'ont', 'que', 'sask'],
Date: ['jan', 'feb', 'mar', 'apr', 'jun', 'jul', 'aug', 'sep', 'sept', 'oct', 'nov', 'dec', 'circa'],
//Honorifics
Honorific: ['adj', 'adm', 'adv', 'asst', 'atty', 'bldg', 'brig', 'capt', 'cmdr', 'comdr', 'cpl', 'det', 'dr', 'esq', 'gen', 'gov', 'hon', 'jr', 'llb', 'lt', 'maj', 'messrs', 'mister', 'mlle', 'mme', 'mr', 'mrs', 'ms', 'mstr', 'op', 'ord', 'phd', 'prof', 'pvt', 'rep', 'reps', 'res', 'rev', 'sen', 'sens', 'sfc', 'sgt', 'sir', 'sr', 'supt', 'surg'
//miss
//misses
]
};
//unpack the compact terms into the misc lexicon..
var abbreviations = {};
var keys = Object.keys(compact);
for (var i = 0; i < keys.length; i++) {
var arr = compact[keys[i]];
for (var i2 = 0; i2 < arr.length; i2++) {
abbreviations[arr[i2]] = keys[i];
}
}
module.exports = abbreviations;
},{}],24:[function(_dereq_,module,exports){
'use strict';
//adjectival forms of place names, as adjectives.
module.exports = ['afghan', 'albanian', 'algerian', 'angolan', 'argentine', 'armenian', 'australian', 'aussie', 'austrian', 'bangladeshi', 'basque', // of Basque Country
'belarusian', 'belgian', 'bolivian', 'bosnian', 'brazilian', 'bulgarian', 'cambodian', 'cameroonian', 'canadian', 'chadian', 'chilean', 'chinese', 'colombian', 'congolese', 'croatian', 'cuban', 'czech', 'dominican', 'danish', 'egyptian', 'british', 'estonian', 'ethiopian', 'ecuadorian', 'finnish', 'french', 'gambian', 'georgian', 'german', 'greek', 'ghanaian', 'guatemalan', 'haitian', 'hungarian', 'honduran', 'icelandic', 'indian', 'indonesian', 'iranian', 'iraqi', 'irish', 'israeli', 'italian', 'ivorian', // of Ivory Coast
'jamaican', 'japanese', 'jordanian', 'kazakh', 'kenyan', 'korean', 'kuwaiti', 'lao', // of Laos
'latvian', 'lebanese', 'liberian', 'libyan', 'lithuanian', 'namibian', 'malagasy', // of Madagascar
'macedonian', 'malaysian', 'mexican', 'mongolian', 'moroccan', 'dutch', 'nicaraguan', 'nigerian', // of Nigeria
'nigerien', // of Niger
'norwegian', 'omani', 'panamanian', 'paraguayan', 'pakistani', 'palestinian', 'peruvian', 'philippine', 'filipino', 'polish', 'portuguese', 'qatari', 'romanian', 'russian', 'rwandan', 'samoan', 'saudi', 'scottish', 'senegalese', 'serbian', 'singaporean', 'slovak', 'somalian', 'sudanese', 'swedish', 'swiss', 'syrian', 'taiwanese', 'trinidadian', 'thai', 'tunisian', 'turkmen', 'ugandan', 'ukrainian', 'american', 'hindi', 'spanish', 'venezuelan', 'vietnamese', 'welsh', 'zambian', 'zimbabwean', 'english', 'african', 'european', 'asian', 'californian'];
},{}],25:[function(_dereq_,module,exports){
//nouns with irregular plural/singular forms
//used in noun.inflect, and also in the lexicon.
//compressed with '_' to reduce some redundancy.
'use strict';
var main = [['child', '_ren'], ['person', 'people'], ['leaf', 'leaves'], ['database', '_s'], ['quiz', '_zes'], ['stomach', '_s'], ['sex', '_es'], ['move', '_s'], ['shoe', '_s'], ['goose', 'geese'], ['phenomenon', 'phenomena'], ['barracks', '_'], ['deer', '_'], ['syllabus', 'syllabi'], ['index', 'indices'], ['appendix', 'appendices'], ['criterion', 'criteria'], ['man', 'men'], ['rodeo', '_s'], ['epoch', '_s'], ['zero', '_s'], ['avocado', '_s'], ['halo', '_s'], ['tornado', '_s'], ['tuxedo', '_s'], ['sombrero', '_s'], ['addendum', 'addenda'], ['alga', '_e'], ['alumna', '_e'], ['alumnus', 'alumni'], ['bacillus', 'bacilli'], ['cactus', 'cacti'], ['beau', '_x'], ['château', '_x'], ['chateau', '_x'], ['tableau', '_x'], ['corpus', 'corpora'], ['curriculum', 'curricula'], ['echo', '_es'], ['embargo', '_es'], ['foot', 'feet'], ['genus', 'genera'], ['hippopotamus', 'hippopotami'], ['larva', '_e'], ['libretto', 'libretti'], ['loaf', 'loaves'], ['matrix', 'matrices'], ['memorandum', 'memoranda'], ['mosquito', '_es'], ['opus', 'opera'], ['ovum', 'ova'], ['ox', '_en'], ['radius', 'radii'], ['referendum', 'referenda'], ['thief', 'thieves'], ['tooth', 'teeth']];
//decompress it
main = main.map(function (a) {
a[1] = a[1].replace('_', a[0]);
return a;
});
//build-out two mappings
var toSingle = main.reduce(function (h, a) {
h[a[1]] = a[0];
return h;
}, {});
var toPlural = main.reduce(function (h, a) {
h[a[0]] = a[1];
return h;
}, {});
module.exports = {
toSingle: toSingle,
toPlural: toPlural
};
},{}],26:[function(_dereq_,module,exports){
'use strict';
//most nouns do not nead to be listed
//for whatever reasons, these look like not-nouns
//so make sure they become nouns
module.exports = [
//double-consonant rule
'egg', 'bottle', 'cottage', 'kitty', 'doggy', 'ad hominem', 'banking', 'body', 'breakfast', 'ceiling', 'city', 'credit card', 'death', 'dinner', 'door', 'economy', 'energy', 'event', 'everything', 'example', 'fl oz', 'friend', 'funding', 'god', 'grand slam', 'head start', 'home', 'house', 'lunch', 'nothing', 'number', 'others', 'part', 'patent', 'problem', 'purpose', 'room', 'student', 'stuff', 'super bowl', 'system', 'there', 'thing', 'things', 'tragedy', 'us dollar', 'world', 'world series'];
},{}],27:[function(_dereq_,module,exports){
'use strict';
var fns = _dereq_('../fns');
//uncompressed country names
var countries = ['bahamas', 'bangladesh', 'belgium', 'brazil', 'burkina faso', 'burundi', 'cape verde', 'chile', 'comoros', 'congo-brazzaville', 'cuba', 'cote d\'ivoire', 'denmark', 'djibouti', 'ecuador', 'egypt', 'el salvador', 'fiji', 'france', 'germany', 'greece', 'guinea-bissau', 'haiti', 'honduras', 'hungary', 'iraq', 'israel', 'italy', 'jamaica', 'kenya', 'kuwait', 'laos', 'lesotho', 'libya', 'luxembourg', 'malawi', 'mali', 'malta', 'mexico', 'moldova', 'morocco', 'mozambique', 'netherlands', 'nicaragua', 'niger', 'panama', 'peru', 'solomon islands', 'sri lanka', 'suriname', 'sweden', 'timor-leste', 'turkey', 'u.s.a.', 'united kingdom', 'usa', 'ussr', 'vietnam', 'yemen', 'zimbabwe'];
var compressed_countries = {
istan: 'pak,uzbek,afghan,tajik,turkmen',
ublic: 'czech rep,dominican rep,central african rep',
uinea: 'g,papua new g,equatorial g',
land: 'thai,po,switzer,fin,republic of ire,new zea,swazi,ice',
ania: 'tanz,rom,maurit,lithu,alb',
rica: 'ame,united states of ame,south af,costa ',
mbia: 'colo,za,ga',
eria: 'nig,alg,lib',
nia: 'arme,macedo,slove,esto',
sia: 'indone,rus,malay,tuni',
ina: 'ch,argent,bosnia and herzegov',
tan: 'kazakhs,kyrgyzs,bhu',
ana: 'gh,botsw,guy',
bia: 'saudi ara,ser,nami',
lia: 'austra,soma,mongo',
rea: 'south ko,north ko,erit',
dan: 'su,south su,jor',
ria: 'sy,aust,bulga',
ia: 'ind,ethiop,cambod,boliv,slovak,georg,croat,latv',
an: 'jap,ir,taiw,azerbaij,om',
da: 'ugan,cana,rwan',
us: 'belar,mauriti,cypr',
al: 'nep,seneg,portug',
in: 'spa,ben,bahra',
go: 'dr con,to,trinidad-toba',
la: 'venezue,ango,guatema',
es: 'united stat,philippin,united arab emirat',
on: 'camero,leban,gab',
ar: 'myanm,madagasc,qat',
ay: 'paragu,norw,urugu',
ne: 'ukrai,sierra leo,palesti'
};
countries = fns.uncompress_suffixes(countries, compressed_countries);
/////uncomressed cities
var cities = ['aalborg', 'abu dhabi', 'ahmedabad', 'almaty', 'antwerp', 'aqaba', 'ashdod', 'ashgabat', 'athens', 'auckland', 'bogota', 'brno', 'brussels', 'calgary', 'cape town', 'cebu', 'cluj-napoca', 'curitiba', 'doha', 'dushanbe', 'espoo', 'frankfurt', 'genoa', 'ghent', 'giza', 'graz', 'guangzhou', 'haifa', 'hanoi', 'helsinki', 'ho chi minh', 'homs', 'iasi', 'innsbruck', 'i̇zmir', 'jakarta', 'kiev', 'kingston', 'klaipėda', 'kobe', 'kosice', 'krakow', 'la plata', 'luxembourg', 'medellín', 'mexico', 'miskolc', 'montevideo', 'montreal', 'moscow', 'nagoya', 'nis', 'odessa', 'oslo', 'ottawa', 'palermo', 'paris', 'perth', 'phnom penh', 'phoenix', 'port elizabeth', 'poznan', 'prague', 'reykjavik', 'riga', 'rome', 'rosario', 'seville', 'skopje', 'stockholm', 'stuttgart', 'sydney', 'tbilisi', 'tegucigalpa', 'the hague', 'thessaloniki', 'tokyo', 'toulouse', 'trondheim', 'tunis', 'turku', 'utrecht', 'vantaa', 'vasteras', 'warsaw', 'winnipeg', 'wroclaw', 'zagreb', 'zaragoza'];
var suffix_compressed_cities = {
burg: 'saint peters,yekaterin,ham,til,gothen,salz',
ton: 'hous,edmon,welling,hamil',
ion: 'hauts-bassins reg,nord reg,herakl',
ana: 'hav,tir,ljublj',
ara: 'guadalaj,ank,timișo',
an: 'tehr,mil,durb,bus,tain,abidj,amm,yerev',
ia: 'philadelph,brasíl,alexandr,pretor,valenc,sof,nicos',
on: 'ly,lond,yang,inche,daeje,lisb',
en: 'shenzh,eindhov,pils,copenhag,berg',
ng: 'beiji,chittago,pyongya,kaohsiu,taichu',
in: 'tianj,berl,tur,dubl,duned',
es: 'los angel,nant,napl,buenos air,f',
la: 'pueb,mani,barranquil,kampa,guatema',
or: 'salvad,san salvad,ulan bat,marib',
us: 'damasc,pirae,aarh,vilni',
as: 'carac,patr,burg,kaun',
va: 'craio,petah tik,gene,bratisla',
ai: 'shangh,mumb,chenn,chiang m',
ne: 'colog,melbour,brisba,lausan',
er: 'manchest,vancouv,tangi',
ka: 'dha,osa,banja lu',
ro: 'rio de janei,sappo,cai',
am: 'birmingh,amsterd,rotterd',
ur: 'kuala lump,winterth,kopavog',
ch: 'muni,zuri,christchur',
na: 'barcelo,vien,var',
ma: 'yokoha,li',
ul: 'istanb,seo,kab',
to: 'toron,qui,por',
iv: 'khark,lv,tel av',
sk: 'dnipropetrov,gdan,min'
};
cities = fns.uncompress_suffixes(cities, suffix_compressed_cities);
var prefix_compressed_cities = {
'new ': 'delhi,york,taipei',
san: 'a\'a,tiago, josé',
ta: 'ipei,mpere,llinn,rtu',
ba: 'ngalore,ngkok,ku,sel',
li: 'verpool,ège,nz,massol',
ma: 'rseille,ndalay,drid,lmo',
be: 'rn,lgrade,irut',
ka: 'rachi,raj,ndy',
da: 'egu,kar,ugavpils',
ch: 'icago,arleroi,ișinau',
co: 'lombo,nstanta,rk',
bu: 'rsa,charest,dapest'
};
cities = fns.uncompress_prefixes(cities, prefix_compressed_cities);
//some of the busiest airports in the world from
//https://www.world-airport-codes.com/world-top-30-airports.html
var airports = ['atl', 'pek', 'lhr', 'hnd', 'ord', 'lax', 'cdg', 'dfw', 'cgk', 'dxb', 'fra', 'hkg', 'den', 'bkk', 'ams', 'jfk', 'ist', 'sfo', 'clt', 'las', 'phx', 'iax', 'kul', 'mia', 'icn', 'muc', 'syd', 'fco', 'mco', 'bcn', 'yyz', 'lgw', 'phl'];
module.exports = {
countries: countries,
cities: cities,
airports: airports
};
},{"../fns":15}],28:[function(_dereq_,module,exports){
'use strict';
//professions 'lawyer' that aren't covered by verb.to_actor()
module.exports = ['accountant', 'administrator', 'advisor', 'agent', 'architect', 'artist', 'assistant', 'attendant', 'bricklayer', 'butcher', 'carpenter', 'clerk', 'deputy', 'dietician', 'engineer', 'farmer', 'firefighter', 'fireman', 'gardener', 'getor', 'hairdresser', 'housekeeper', 'instructor', 'journalist', 'lawyer', 'mechanic', 'minister', 'musician', 'nurse', 'officer', 'operator', 'photographer', 'plumber', 'policeman', 'politician', 'practitioner', 'president', 'programmer', 'psychologist', 'receptionist', 'researcher', 'roofer', 'sailor', 'scientist', 'secretary', 'security guard', 'soldier', 'supervisor', 'surgeon', 'technician', 'therapist'];
},{}],29:[function(_dereq_,module,exports){
'use strict';
//common nouns that have no plural form. These are suprisingly rare
//used in noun.inflect(), and added as nouns in lexicon
module.exports = ['advice', 'aircraft', 'art', 'baggage', 'bass', 'beef', 'bison', 'blood', 'bread', 'butter', 'cake', 'cash', 'celcius', 'chaos', 'cheese', 'chewing', 'civics', 'clothing', 'coal', 'coffee', 'conduct', 'confusion', 'cotton', 'currency', 'economics', 'education', 'electricity', 'enjoyment', 'entertainment', 'equipment', 'ethics', 'everybody', 'everyone', 'fahrenheit', 'fiction', 'fish', 'flour', 'food', 'forgiveness', 'fowl', 'fruit', 'fun', 'furniture', 'gold', 'golf', 'gossip', 'grass', 'ground', 'gum', 'gymnastics', 'hair', 'halibut', 'happiness', 'hertz', 'history', 'hockey', 'homework', 'honey', 'hospitality', 'ice', 'impatience', 'importance', 'information', 'itself', 'jewelry', 'justice', 'kelvin', 'knowledge', 'laughter', 'leather', 'leisure', 'lightning', 'liquid', 'literature', 'luck', 'luggage', 'machinery', 'mail', 'mathematics', 'measles', 'meat', 'milk', 'mist', 'money', 'moose', 'mumps', 'music', 'news', 'noise', 'oil', 'oxygen', 'paper', 'patience', 'peace', 'peanut', 'pepper', 'petrol', 'physics', 'plastic', 'pork', 'power', 'pressure', 'progress', 'rain', 'recognition', 'recreation', 'relaxation', 'research', 'rice', 'sadness', 'safety', 'salmon', 'salt', 'sand', 'scenery', 'series', 'sheep', 'shopping', 'silk', 'silver', 'snow', 'soap', 'soccer', 'softness', 'space', 'spacecraft', 'species', 'speed', 'steam', 'steel', 'sugar', 'sunshine', 'tea', 'tennis', 'thunder', 'time', 'toothpaste', 'traffic', 'trouble', 'trousers', 'trout', 'tuna', 'vinegar', 'violence', 'warmth', 'water', 'weather', 'wildlife', 'wine', 'wood', 'wool'];
},{}],30:[function(_dereq_,module,exports){
'use strict';
module.exports = ['abba', 'ac/dc', 'aerosmith', 'bee gees', 'coldplay', 'creedence clearwater revival', 'def leppard', 'depeche mode', 'destiny\'s child', 'duran duran', 'fleetwood mac', 'green day', 'guns n roses', 'joy division', 'metallica', 'moody blues', 'motley crue', 'new kids on the block', 'pink floyd', 'r.e.m.', 'radiohead', 'red hot chili peppers', 'sex pistols', 'soundgarden', 'spice girls', 'the beach boys', 'the beatles', 'the black eyed peas', 'the byrds', 'the carpenters', 'the guess who', 'the hollies', 'the rolling stones', 'the smashing pumpkins', 'the supremes', 'the who', 'thin lizzy', 'u2', 'van halen'];
},{}],31:[function(_dereq_,module,exports){
'use strict';
//nouns