compromise
Version:
natural language processing in the browser
188 lines (184 loc) • 4.2 kB
JavaScript
//adjectives that either aren't covered by rules, or have superlative/comparative forms
//this list is the seed, from which various forms are conjugated
;
const fns = require('../fns');
//suffix-index adjectives
// {cial:'cru,spe'} -> 'crucial', 'special'
let 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'
};
let 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);