compromise
Version:
natural language processing in the browser
234 lines (231 loc) • 3.7 kB
JavaScript
;
const fns = require('../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
let 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',
};
let 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);