Check typo
From Director Online Wiki
This code can be used in a text or field member to replace a mistyped word with the correct spelling. This was used in the client side of a chat program using MUS and worked rather well. The original list was found on wikipedia.org, but I do not currently have the link and have not been able to find it since.
function checkTypo(str) { c = str.charAt(0).toLowerCase(); switch(c) { case "a": str = str.replace(/(A|a)(?:dba|bo)ndon?(ns?|ning|ne[de]|nment)/g,"$1bando$2"); str = str.replace(/(A|a)breviat(e[sd]?|ions?|ing|ors?)/g,"$1bbreviat$2"); str = str.replace(/(A|a)b(?:ber|e)ra(tions?|nt|ntly|anc[ey]|ated)/g,"$1berra$2"); str = str.replace(/(A|a)b(?:il|li)t(y|ies)/g,"$1bilit$2"); str = str.replace(/(A|a)bortifican(ts?)/g,"$1bortifacien$2"); str = str.replace(/(A|a)bsens(es?)/g,"$1bsenc$2"); str = str.replace(/(A|a)bsolutly/g,"$1bsolutely"); str = str.replace(/(A|a)sorbe(d|s|nt|ncy)/g,"$1bsorbe$2"); str = str.replace(/(A|a)bsorb[st]i(on|ve)/g,"$1bsorpti$2"); str = str.replace(/(A|a)c(?:edd?e|cadd?e|c?ada|ad)mm?(i[ce]s?|ically|y)/g,"$1cadem$2"); str = str.replace(/(A|a)cc?ellerat(e|es|ed|ing|ion|or|ory)/g,"$1ccelerat$2"); str = str.replace(/(A|a)cc?ept[^a](ble|bility|nces?)/g,"$1ccepta$2"); str = str.replace(/(A|a)cc?essab(le|ility|ilities)/g,"$1ccessib$2"); str = str.replace(/(A|a)ccen?sion/g,"$1ccession"); str = str.replace(/(A|a)c+ident(?:a?|ial)ly/g,"$1ccidentally"); str = str.replace(/(A|a)cc?limiti(z|s)(e[sd]?|ing|ation)/g,"$1cclimati$2$3"); str = str.replace(/(A|a)c(?:com[aeo]?|omm?[aeo]?|comm[ae]?)dat(e[ds]?|ing|ions?)/g,"$1ccommodat$2"); str = str.replace(/(A|a)cc?ompann?(?:y|ye|i|ie|e)(d|s)/g,"$1ccompanie$2"); str = str.replace(/(A|a)complis(h|he[sd]|hing|hments?)/g,"$1ccomplis$2"); str = str.replace(/(A|a)c(?:ord|cor)in(g|gly)/g,"$1ccordin$2"); str = str.replace(/(A|a)cc?ord(?:eo|ia)(ns?)/g,"$1ccordio$2"); str = str.replace(/(A|a)cur+a(cy|cies|te|tely)/g,"$1ccura$2"); str = str.replace(/(A|a)(?:c+uss|cus)(e[sdr]?|ing|al|able|ations?|atives?)/g,"$1ccus$2"); str = str.replace(/(A|a)custo(m|med)/g,"$1ccusto$2"); str = str.replace(/(A|a)che?iv(e[sdr]?|ing|ements?)/g,"$1chiev$2"); str = str.replace(/(A|a)ch(?:ie|ei)vmen(ts?)/g,"$1chievemen$2"); str = str.replace(/(A|a)c?knowl(?:deg|ed|egd?)(e[sd]?|ing|e?ments?)/g,"$1cknowledg$2"); str = str.replace(/(A|a)c?knowl(?:edg?|deg|egd?)eing/g,"$1cknowledging"); str = str.replace(/(A|a)ccousti(cs?|cal|cally)/g,"$1cousti$2"); str = str.replace(/(A|a)cocunt/g,"$1ccount"); str = str.replace(/(A|a)(?:cc|)qu(?:ai|ia)nt(|s|ed|edly|ing|ances?|anceships?)/g,"$1cquaint$2"); str = str.replace(/(A|a)c?qu(?:ai|ia)ntenc(es?|eships?)/g,"$1cquaintanc$2"); str = str.replace(/(A|a)d?qui(re[sd]?|ring|sitions?|sitive|sitively)/g,"$1cqui$2"); str = str.replace(/(A|a)(?:c?qui|quit)t(ed|ing|als?|ances?)/g,"$1cquitt$2"); str = str.replace(/(A|a)ccros[st]/g,"$1cross"); str = str.replace(/(A|a)ctivly/g,"$1ctively"); str = str.replace(/(A|a)ctivites/g,"$1ctivities"); str = str.replace(/(A|a)ctualy/g,"$1ctually"); str = str.replace(/(A|a)dapatio(ns?|nal|nally)/g,"$1daptatio$2"); str = str.replace(/(A|a)dd(?:it[io]|tio)(ns?|nal|nally)/g,"$1dditio$2"); str = str.replace(/(A|a)(?:ddres|dres|dress)(|e[sd]|ing|able|e[er]s?|able|ability)/g,"$1ddress$2"); str = str.replace(/(A|a)dhear(|s)/g,"$1dhere$2"); str = str.replace(/(A|a)dhea?ran(ce|ts?)/g,"$1dheren$2"); str = str.replace(/(A|a)dminster(s?|ed|ing)/g,"$1dminister$2"); str = str.replace(/(A|a)dmi(?:n|nini)strat(e[sd]?|ing|ors?|ions?|ive|ively)/g,"$1dministrat$2"); str = str.replace(/(A|a)d+missa(ble|bility)/g,"$1dmissi$2"); str = str.replace(/(A|a)ddmiss?i(ons?|ble|bility)/g,"$1dmissi$2"); str = str.replace(/(A|a)d+mite(d|dly)/g,"$1dmitte$2"); str = str.replace(/(A|a)dolecs?en(ts?)/g,"$1dolescen$2"); str = str.replace(/(A|a)ddop(ts?|ted|ting|tive|tions?)/g,"$1dop$2"); str = str.replace(/(A|a)dultr(y|ate[sd]?|ating|ation|er|ous)/g,"$1dulter$2"); str = str.replace(/(A|a)davanc(e[sd]?|ing|ements?)/g,"$1dvanc$2"); str = str.replace(/(A|a)dventrous/g,"$1dventurous"); str = str.replace(/(A|a)dvr?esar(y|ies|ial)/g,"$1dversar$2"); str = str.replace(/(A|a)dvertsing/g,"$1dvertising"); str = str.replace(/(A|a)dvert(?:ie?s|ize)men(ts?)/g,"$1dvertisemen$2"); str = str.replace(/(A|a)erie(l|ls)/g,"$1eria$2"); str = str.replace(/(A|a)reodynami(cs?|cal)/g,"$1erodynami$2"); str = str.replace(/(A|a)stheti(cs?|cal|cally)/g,"$1estheti$2"); str = str.replace(/(A|a)esthecially/g,"$1esthetically"); str = str.replace(/(A|a)ff?i(?:la|llia)t(e[sd]?|ing|ion)/g,"$1ffiliat$2"); str = str.replace(/(A|a)ffici[oa]nad(os?)/g,"$1ficionad$2"); str = str.replace(/(A|a)fore?memtioned/g,"$1forementioned"); str = str.replace(/(A|a)fri[ck]aane(rs?)/g,"$1frikane$2"); str = str.replace(/(A|a)g(?:aisn|ainns|ia?ns)t/g,"$1gainst"); str = str.replace(/(A|a)g(?:g?[ae]?re|r[aei])vat(e[sd]?|ing|ions?)/g,"$1ggravat$2"); str = str.replace(/(A|a)greg+at(e[sd]?|ing|ions?)/g,"$1ggregat$2"); str = str.replace(/(A|a)(?:g+res|gress)(ions?|ive|iveness|ively|ors?)/g,"$1ggress$2"); str = str.replace(/(A|a)g(?:rie|rei|grei)v(e[sd]?|ing)/g,"$1ggriev$2"); str = str.replace(/(A|a)g(?:gre+|re|reee)(|s|d|ing|ments?|abl[ey])/g,"$1gree$2"); str = str.replace(/(A|a)greemn(ts?)/g,"$1greemen$2"); str = str.replace(/(A|a)(?:gricu|rgicul)tur(es?|al)/g,"$1gricultur$2"); str = str.replace(/(A|a)irbourne/g,"$1irborne"); str = str.replace(/(A|a)i(?:rc|cr|rrcr)ar?f(ts?)/g,"$1ircraf$2"); str = str.replace(/(A|a)ipor(ts?)/g,"$1irpor$2"); str = str.replace(/(A|a)l(?:l?bie|lbei)t/g,"$1lbeit"); str = str.replace(/(A|a)lc(?:ho|hoho|h?oha|h?aho)(ls?|lics?|lism)/g,"$1lcoho$2"); str = str.replace(/(A|a)lochol/g,"$1lcohol"); str = str.replace(/(A|a)lgebraical/g,"$1lgebraic"); str = str.replace(/(A|a)lgorh?it(ms?|mic)/g,"$1lgorith$2"); str = str.replace(/(A|a)lientat(e[ds]?|ing)/g,"$1lienat$2"); str = str.replace(/(A|a)llig(n|ned)/g,"$1lig$2"); str = str.replace(/(A|a)ll intensive purposes/g,"$1ll intents and purposes"); str = str.replace(/(A|a)l(?:led|l?ed|e)g(e[sd]?|ing|edly)/g,"$1lleg$2"); str = str.replace(/(A|a)ll?ed?ge(?:ly|dy)/g,"$1llegedly"); str = str.replace(/(A|a)ll?egi?enc(es?)/g,"$1llegianc$2"); str = str.replace(/(A|a)l(?:l?i|e)viat(e[sd]?|ing|ion|or)/g,"$1lleviat$2"); str = str.replace(/(A|a)l(?:lop|oph)on(e|es)/g,"$1llophon$2"); str = str.replace(/(A|a)lot/g,"$1 lot"); str = str.replace(/(A|a)lott(ed|ing)/g,"$1llott$2"); str = str.replace(/(A|a)low(s|ed|ing|able|ance)/g,"$1llow$2"); str = str.replace(/(A|a)lusio(ns?)/g,"$1llusio$2"); str = str.replace(/(A|a)l(?:mso|oms)t/g,"$1lmost"); str = str.replace(/(A|a)(?:llready|l+reayd|ready)/g,"$1lready"); str = str.replace(/(A|a)lternitiv(es?|ely)/g,"$1lternativ$2"); str = str.replace(/(A|a)l(?:lth|t)ough/g,"$1lthough"); str = str.replace(/(A|a)ll?w(?:asy|yas)/g,"$1lways"); str = str.replace(/(A|a)mbi?dextero?us/g,"$1mbidextrous"); str = str.replace(/(A|a)malg[ou]m(|ate[sd]?|ating|ation)/g,"$1malgam$2"); str = str.replace(/(A|a)matue(rs?|ris[hm]|rishly)/g,"$1mateu$2"); str = str.replace(/(A|a)merliorat(e[sd]?|ing|ion)/g,"$1meliorat$2"); str = str.replace(/(A|a)(?:m|d)mend(|s|ed|ments?|ing|able|atory)/g,"$1mend$2"); str = str.replace(/(A|a)mendman(ts?)/g,"$1mendmen$2"); str = str.replace(/(A|a)mmuntio(ns?)/g,"$1mmunitio$2"); str = str.replace(/(A|a)mock/g,"$1mok"); str = str.replace(/(A|a)mo?un(g|gst)/g,"$1mon$2"); str = str.replace(/(A|a)mourous/g,"$1morous"); str = str.replace(/(A|a)mmount(|s|ed|ing)/g,"$1mount$2"); str = str.replace(/(A|a)mmus(e[sd]?|ing|ments?)/g,"$1mus$2"); str = str.replace(/(A|a)dn/g,"$1nd"); str = str.replace(/(A|a)nn?all?(?:oge|ag)(y|ies|ous)/g,"$1nalog$2"); str = str.replace(/(A|a)naliti(cs?|cal)/g,"$1nalyti$2"); str = str.replace(/(A|a)narchi(?:m|stm)/g,"$1narchism"); str = str.replace(/(A|a)nsest[oe](rs?)/g,"$1ncesto$2"); str = str.replace(/(A|a)ncest[oe]ry/g,"$1ncestry"); str = str.replace(/(A|a)ncill?iary/g,"$1ncillary"); str = str.replace(/(A|a)nenom(es?)/g,"$1nemon$2"); str = str.replace(/(A|a)n(?:n?i?hili|ihil|[ni]hil+)at(e[sd]?|ing|ions?|ors?|ive)/g,"$1nnihilat$2"); str = str.replace(/(A|a)nivers[ae]r(y|ies)/g,"$1nniversar$2"); str = str.replace(/(A|a)n(?:nou|oun)c(e[sd]?|ing|ers?|ements?)/g,"$1nnounc$2"); str = str.replace(/(A|a)nn?oun?cmen(ts?)/g,"$1nnouncemen$2"); str = str.replace(/(A|a)n(?:nua|ual)ly/g,"$1nnually"); str = str.replace(/(A|a)n(?:ul|nul)l(|s|ment)/g,"$1nnul$2"); str = str.replace(/(A|a)n(?:nu|ul)l(ed|ing)/g,"$1nnull$2"); str = str.replace(/(A|a)nnoin(ts?|ted|ting|ments?)/g,"$1noin$2"); str = str.replace(/(A|a)nomol(y|ies|ous|istic|istically)/g,"$1nomal$2"); str = str.replace(/(A|a)nonim(ity|ous)/g,"$1nonym$2"); str = str.replace(/(A|a)ntarti(ca?)/g,"$1ntarcti$2"); str = str.replace(/(A|a)nthromorphi(zation|c|cally|s[mt]s?|ze[sd]?)/g,"$1nthropomorphi$2"); str = str.replace(/(A|a)nytying/g,"$1nything"); str = str.replace(/(A|a)nyhwere/g,"$1nywhere"); str = str.replace(/(A|a)p(?:ar|part)men(t|ts)/g,"$1partmen$2"); str = str.replace(/[Aa]p(?:e|pen?)nines/g,"Apennines"); str = str.replace(/(A|a)pocolyp(ses?|tic|tical|tically|ticism)/g,"$1pocalyp$2"); str = str.replace(/(A|a)ppolog(y|ies|ize[sd]?|etics?|ists?|ias?|ues?)/g,"$1polog$2"); str = str.replace(/(A|a)pp?ol[ae]geti(cs?|cal|cally)/g,"$1pologeti$2"); str = str.replace(/(A|a)pp?arr?[ae](l|ls|ling|lling|led|lled)/g,"$1ppare$2"); str = str.replace(/(A|a)p(?:p?e|[ea])a?r+[ae]n(t|tly)/g,"$1pparen$2"); str = str.replace(/(A|a)pp?ealling/g,"$1ppealing"); str = str.replace(/(A|a)pp?(?:earea?|era|reara)nc(es?)/g,"$1ppearanc$2"); str = str.replace(/(A|a)p(?:licati|plicait)o(ns?)/g,"$1pplicatio$2"); str = str.replace(/(A|a)plie(d|s)/g,"$1pplie$2"); str = str.replace(/(A|a)ppr(?:icai|ie?cia|ecai?)(te[sd]?|ting|tion|bl[ey]|tive|tory?)/g,"$1pprecia$2"); str = str.replace(/(A|a)prehensi(ve|ons?)/g,"$1pprehensi$2"); str = str.replace(/(A|a)proach(|e[ds]|ing|abl[ey]|ability)/g,"$1pproach$2"); str = str.replace(/(A|a)p+roachs/g,"$1pproaches"); str = str.replace(/([Aa]p)(?:propropia|ropri?a|proprai?)t(e[ds]?|ely|ing|eness|ions?|ors?)/g,"$1propriat$2"); str = str.replace(/(A|a)pproproximat(e[ds]?|ely|ions?)/g,"$1pproximat$2"); str = str.replace(/(A|a)p+rox(?:am[ai]|imi|ia)t(e[sd]?|ely|ions?)/g,"$1pproximat$2"); str = str.replace(/(A|a)pp?rox[aei]mm?[ai]tly/g,"$1pproximately"); str = str.replace(/april/g,"April"); str = str.replace(/(A|a)r?b(?:ritr?|r?it)ar(y|ily)/g,"$1rbitrar$2"); str = str.replace(/(A|a)rc(ha?)(?:e|eao|oe?)log(y|ists?|ic|ical|ically)/g,"$1rc$2eolog$3"); str = str.replace(/(A|a)rchia(c|cal|cally)/g,"$1rchai$2"); str = str.replace(/(A|a)rchi?typ(es?|al|ic|ical|ically)/g,"$1rchetyp$2"); str = str.replace(/(A|a)rch(?:ec?|ic)te(?:c?t|cht?)(|s|ures?|ural|urally)/g,"$1rchitect$2"); str = str.replace(/(A|a)rch[ie](?:ctect|c?techt?|tet)ur(es?|al|ally)/g,"$1rchitectur$2"); str = str.replace(/(A|a)rgue?bl(y|e)/g,"$1rguabl$2"); str = str.replace(/(A|a)rguemen(t[as]?|tive|tative|tatively|tation|tum)/g,"$1rgumen$2"); str = str.replace(/(A|a)rmaman(ts?)/g,"$1rmamen$2"); str = str.replace(/(A|a)rm[ia]sta[cs](es?)/g,"$1rmistic$2"); str = str.replace(/(A|a)rised/g,"$1rose"); str = str.replace(/(A|a)rround/g,"$1round"); str = str.replace(/(A|a)rang(e[sdr]?|ing|ements?)/g,"$1rrang$2"); str = str.replace(/(A|a)rrangmen(ts?)/g,"$1rrangemen$2"); str = str.replace(/(A|a)rtill?ary/g,"$1rtillery"); str = str.replace(/(A|a)swell/g,"$1s well"); str = str.replace(/(A|a)setic/g,"$1scetic"); str = str.replace(/(A|a)isia(ns?)/g,"Asia$2"); str = str.replace(/(A|a)sside/g,"$1side"); str = str.replace(/(A|a)sphyxai?t(e[sd]?|ing|ion)/g,"$1sphyxiat$2"); str = str.replace(/(A|a)ssas[ia]n(|s|ations?)/g,"$1ssassin$2"); str = str.replace(/(A|a)ss(?:asi|is)nat(e[ds]?|ions?)/g,"$1ssassinat$2"); str = str.replace(/(A|a)ssasined/g,"$1ssassinated"); str = str.replace(/(A|a)ssosicatio(ns?)/g,"$1ssassinatio$2"); str = str.replace(/(A|a)ssassintation/g,"$1ssassination"); str = str.replace(/(A|a)s+assa(ns?)/g,"$1ssassi$2"); str = str.replace(/(A|a)s(?:s[us]a|au)l(ts?|ted|ting)/g,"$1ssaul$2"); str = str.replace(/(A|a)s(?:semp|embl)l(e[drs]?|ing|y|ies|ages?)/g,"$1ssembl$2"); str = str.replace(/(A|a)ssertatio(ns?)/g,"$1ssertio$2"); str = str.replace(/(A|a)sign(|s|ed|ing|ments?)/g,"$1ssign$2"); str = str.replace(/(A|a)s(?:si|is+|siss)t(|s|ed|ing|ants?|ance)/g,"$1ssist$2"); str = str.replace(/(A|a)ssit[ae]n(ce|ts?|tships?)/g,"$1ssistan$2"); str = str.replace(/(A|a)s(?:oci|soi?c)ai?t(e[sd]?|ing|ions?)/g,"$1ssociat$2"); str = str.replace(/(A|a)sum(e[sd]?|ing|ingly|ption)/g,"$1ssum$2"); str = str.replace(/(A|a)sterio(ds?|dal)/g,"$1steroi$2"); str = str.replace(/(A|a)stonom(ers?|y|ic|ical|ically)/g,"$1stronom$2"); str = str.replace(/(A|a)s(?:sy|ym|y)metr(y|ic|ical|ically)/g,"$1symmetr$2"); str = str.replace(/(A|a)thies(ts?|m|tic)/g,"$1theis$2"); str = str.replace(/(A|a)theistical/g,"$1theistic"); str = str.replace(/(A|a)thenea(ns?)/g,"$1thenia$2"); str = str.replace(/(A|a)ttroci(ty|ties|ous|ously|ousness)/g,"$1troci$2"); str = str.replace(/(A|a)tt?atch(|e[ds]|ing|able|ments?)/g,"$1ttach$2"); str = str.replace(/(A|a)tain(|s|ed|ing|ments?|able)/g,"$1ttain$2"); str = str.replace(/(A|a)ttaindre/g,"$1ttainder"); str = str.replace(/(A|a)t(?:emp|tem)t(|s|ed|ing|able)/g,"$1ttempt$2"); str = str.replace(/(A|a)t(?:tende|ende|enda)n(ts?|ces?)/g,"$1ttendan$2"); str = str.replace(/(A|a)t(?:tens|ent)i(ons?|ve|veness)/g,"$1ttenti$2"); str = str.replace(/(A|a)t(?:titi|itu|ittu|tittu)d(e?s|inal|inally)/g,"$1ttitud$2"); str = str.replace(/(A|a)torne(ys?)/g,"$1ttorne$2"); str = str.replace(/(A|a)tract(|s|ed|ing|ions?|ive|ively|iveness|or)/g,"$1ttract$2"); str = str.replace(/(A|a)t(?:ribut|tributr)(e[ds]?|ing|ions?|ives?)/g,"$1ttribut$2"); str = str.replace(/(A|a)ude?ia?nc(es?)/g,"$1udienc$2"); str = str.replace(/(A|a)n unique/g,"$1 unique"); str = str.replace(/[Aa]ustraili?(a|ans?)/g,"Australi$1"); str = str.replace(/(A|a)uthe(rs?)/g,"$1utho$2"); str = str.replace(/(A|a)(?:uth|uthr|ut|th)or(?:a|i|[ai]t[ai])tiv(e|ely|eness)/g,"$1uthoritativ$2"); str = str.replace(/(A|a)(?:uth|uthr|ut|th)orit(?:i?es|iers|hies)/g,"$1uthorities"); str = str.replace(/(A|a)(?:uth|uthr|ut|th)orith?(y|ies|tative|tatively)/g,"$1uthorit$2"); str = str.replace(/(A|a)uthobiograph(y|ies|ic|ical)/g,"$1utobiograph$2"); str = str.replace(/(A|a)uto(?:ch?t|cth)on(ous|ously|[sy]?|es|ism)/g,"$1utochthon$2"); str = str.replace(/(A|a)utomatica?ly/g,"$1utomatically"); str = str.replace(/(A|a)utomibil(es?|ing)/g,"$1utomobil$2"); str = str.replace(/(A|a)uto(?:monom|[mn]on|mom)ou(s|sly)/g,"$1utonomou$2"); str = str.replace(/(A|a)uxill?i?ar(y|ies)/g,"$1uxiliar$2"); str = str.replace(/(A|a)vailablity/g,"$1vailability"); str = str.replace(/(A|a)v(?:ai|a|i)l(?:ai|ia|i|a|)b(le|ility)/g,"$1vailab$2"); str = str.replace(/(A|a)valanc(es?)/g,"$1valanch$2"); str = str.replace(/(A|a)verageed/g,"$1veraged"); str = str.replace(/(A|a)vation/g,"$1viation"); str = str.replace(/(A|a)(?:ckw|wk|kw)ard(|ly|ness)/g,"$1wkward$2"); break; case "b": str = str.replace(/(B|b)ack(?:gor|ro)un(ds?)/g,"$1ackgroun$2"); str = str.replace(/(B|b)alisti(cs?|cally|cians?)/g,"$1allisti$2"); str = str.replace(/(B|b)an(?:an|na)n(as?)/g,"$1anan$2"); str = str.replace(/(B|b)andwith/g,"$1andwidth"); str = str.replace(/(B|b)an(?:krup|rupt)c(y|ies)/g,"$1ankruptc$2"); str = str.replace(/(B|b)asica?ly/g,"$1asically"); str = str.replace(/(B|b)at+allio(ns?)/g,"$1attalio$2"); str = str.replace(/(B|b)eachea(ds?)/g,"$1eachhea$2"); str = str.replace(/(B|b)e(?:au?|ua?)t[iy]full?(|ly)/g,"$1eautiful$2"); str = str.replace(/(B|b)e(?:ua|u)ty/g,"$1eauty"); str = str.replace(/(B|b)ecamae/g,"$1ecame"); str = str.replace(/(B|b)[ae]c[ce]ause/g,"$1ecause"); str = str.replace(/(B|b)e(?:acu|cua|cou)se/g,"$1ecause"); str = str.replace(/(B|b)ecasue/g,"$1ecause"); str = str.replace(/(B|b)ecomm(es?|ing)/g,"$1ecom$2"); str = str.replace(/(B|b)egg?ine(rs?)/g,"$1eginne$2"); str = str.replace(/(B|b)egg?in(?:innin|ni|in)(gs?)/g,"$1eginnin$2"); str = str.replace(/(B|b)eleagur(ed?)/g,"$1eleaguer$2"); str = str.replace(/(B|b)eligum/g,"Belgium"); str = str.replace(/(B|b)elei(fs?)/g,"$1elie$2"); str = str.replace(/(B|b)ele?iv(e[sdr]?|ing)/g,"$1eliev$2"); str = str.replace(/(B|b)elligeran(ts?|tly)/g,"$1elligeren$2"); str = str.replace(/(B|b)emusemnt/g,"$1emusement"); str = str.replace(/(B|b)en[ia]fi(ts?|tted|tting|cial|ciary|ciaries|cent)/g,"$1enefi$2"); str = str.replace(/(B|b)en[ei]ficar(y|ies)/g,"$1eneficiar$2"); str = str.replace(/(B|b)ernouilli/g,"$1ernoulli"); str = str.replace(/(B|b)eseig(e[sd]?|ing)/g,"$1esieg$2"); str = str.replace(/(B|b)eastiali?ty/g,"$1estiality"); str = str.replace(/(B|b)e(?:t[ew]|wte)en/g,"$1etween"); str = str.replace(/(B|b)eyong/g,"$1eyond"); str = str.replace(/(B|b)illingua(l|lism)/g,"$1ilingua$2"); str = str.replace(/(B|b)inomina(ls?)/g,"$1inomia$2"); str = str.replace(/(B|b)laten(t|tly)/g,"$1latan$2"); str = str.replace(/(B|b)litzkreig/g,"$1litzkrieg"); str = str.replace(/(B|b)odydbuild(ers?|ing)/g,"$1odybuild$2"); str = str.replace(/(B|b)onnano/g,"$1onanno"); str = str.replace(/(B|b)bot/g,"$1oot"); str = str.replace(/(B|b)ou?ndr(y|ies)/g,"$1oundar$2"); str = str.replace(/(B|b)rasillia(ns?)/g,"Brazilia$2"); str = str.replace(/(B|b)reakthoug(hs?)/g,"$1reakthroug$2"); str = str.replace(/(B|b)reakthrought(s?)/g,"$1reakthrough$2"); str = str.replace(/(B|b)rethe(?:n|ren)/g,"$1rethren"); str = str.replace(/(B|b)rei(f|fly|fing|fed)/g,"$1rie$2"); str = str.replace(/(B|b)rimeston(es?)/g,"$1rimston$2"); str = str.replace(/[Bb]ritian/g,"Britain"); str = str.replace(/(?:B|b)r(?:i|it|ri|)tish/g,"British"); str = str.replace(/(B|b)rittish/g,"British"); str = str.replace(/(B|b)r(?:a?od|oa|oada)cas(ts?|ted|ters?|ting)/g,"$1roadcas$2"); str = str.replace(/(B|b)roadyl?/g,"$1roadly"); str = str.replace(/(B|b)uildt/g,"$1uilt"); str = str.replace(/(B|b)(?:ou?y|uo)an(t|cy)/g,"$1uoyan$2"); str = str.replace(/(B|b)eaur[ao]cra(ts?|tic|cy|cies)/g,"$1ureaucra$2"); str = str.replace(/(B|b)urried/g,"$1uried"); str = str.replace(/(B|b)ui?snes?(s|ses|sm[ae]n|swom[ae]n|sperson|speople|slike)/g,"$1usines$2"); break; case "c": str = str.replace(/(C|c)afateri(as?)/g,"$1afeteri$2"); str = str.replace(/(C|c)an;t/g,"$1an\'t"); str = str.replace(/(C|c)atalgo/g,"$1atalog"); str = str.replace(/(C|c)asio(ns?)/g,"$1aisso$2"); str = str.replace(/(C|c)alucu?lat(e[sd]?|ions?)/g,"$1alculat$2"); str = str.replace(/(C|c)alculs/g,"$1alculus"); str = str.replace(/(C|c)alabe(rs?)/g,"$1alibe$2"); str = str.replace(/(C|c)aligraph(y|ers|ists?|ic)/g,"$1alligraph$2"); str = str.replace(/[Cc]alvanis(m|ts?)/g,"Calvinis$1"); str = str.replace(/[Cc]ambrige/g,"Cambridge"); str = str.replace(/(C|c)amoflag(e[sd]?)/g,"$1amouflag$2"); str = str.replace(/(C|c)ampag?i(ns?|ne[dr]|ning)/g,"$1ampaig$2"); str = str.replace(/(C|c)ancel(ations?|ous)/g,"$1ancell$2"); str = str.replace(/(C|c)and(?:ad|i|idi)at(es?)/g,"$1andidat$2"); str = str.replace(/(C|c)anniste(rs?)/g,"$1aniste$2"); str = str.replace(/(C|c)annnot/g,"$1annot"); str = str.replace(/(C|c)annonica(ls?|lly)/g,"$1anonica$2"); str = str.replace(/(C|c)ap(?:er|i)b(l[ey]|ility|ilities)/g,"$1apab$2"); str = str.replace(/(C|c)aptia(ls?)/g,"$1apita$2"); str = str.replace(/(C|c)arree?(rs?)/g,"$1aree$2"); str = str.replace(/(C|c)arefull/g,"$1areful"); str = str.replace(/(C|c)arribb?ean/g,"Caribbean"); str = str.replace(/(C|c)areing/g,"$1aring"); str = str.replace(/[Cc]armalit(es?)/g,"Carmelit$2"); str = str.replace(/(C|c)arniverous/g,"$1arnivorous"); str = str.replace(/(C|c)arthagian/g,"Carthaginian"); str = str.replace(/(C|c)artil[ie]d?ge/g,"$1artilage"); str = str.replace(/(C|c)arthograph(y|ers?|ic)/g,"$1artograph$2"); str = str.replace(/(C|c)art(?:drid|ri)g(es?)/g,"$1artridg$2"); str = str.replace(/(C|c)asett(es?)/g,"$1assett$2"); str = str.replace(/(C|c)ass(?:aw[ao]|owar)r(y|ies)/g,"$1assowar$2"); str = str.replace(/(C|c)asualit(y|ies)/g,"$1asualt$2"); str = str.replace(/(C|c)atagor(y|ies|i[sz]ed|ical|ically)/g,"$1ategor$2"); str = str.replace(/(C|c)atterpill?a(rs?)/g,"$1aterpilla$2"); str = str.replace(/(C|c)athli(cs?)/g,"$1atholi$2"); str = str.replace(/(C|c)atholocism/g,"$1atholicism"); str = str.replace(/(C|c)aucasio(ns?)/g,"$1aucasia$2"); str = str.replace(/(C|c)acuse([sd])/g,"$1aucuse$2"); str = str.replace(/(C|c)ellpading/g,"$1ellpadding"); str = str.replace(/(C|c)elcius/g,"$1elsius"); str = str.replace(/(C|c)emen?tare?(y|ies)/g,"$1emeter$2"); str = str.replace(/(C|c)ensu(rs?)/g,"$1enso$2"); str = str.replace(/(C|c)ententenial/g,"$1entennial"); str = str.replace(/(C|c)entru(y|ies)/g,"$1entur$2"); str = str.replace(/(C|c)er[io]mon(ial|y|ies|ious)/g,"$1eremon$2"); str = str.replace(/(C|c)ertia(n|nty|ties)/g,"$1ertai$2"); str = str.replace(/(C|c)ertainit(y|ies)/g,"$1ertaint$2"); str = str.replace(/(C|c)erta?fi(ed|abl[ey])/g,"$1ertifi$2"); str = str.replace(/(C|c)hariman/g,"$1hairman"); str = str.replace(/(C|c)ha(?:le|lla)ng(e[ds]?|ers?|ing)/g,"$1halleng$2"); str = str.replace(/(C|c)hampange/g,"$1hampagne"); str = str.replace(/(C|c)hance(?:lo|l+e)(rs?|rship|rsville)/g,"$1hancello$2"); str = str.replace(/(C|c)hnage/g,"$1hange"); str = str.replace(/(C|c)hang[aei]ble/g,"$1hangeable"); str = str.replace(/(C|c)a(?:hrac|rach?)t[eo](rs?|ri[sz]e[sd]?|ri[sz]ing|ri[sz]ations?|ristics?)/g,"$1haracte$2"); str = str.replace(/(C|c)ha?rac(?:hte|to)(rs?|ri[sz]e[sd]?|ri[sz]ing|ri[sz]ations?|ristics?)/g,"$1haracte$2"); str = str.replace(/(C|c)h(?:rac|ara)t[eo](rs?|ri[sz]e[sd]?|ri[sz]ing|ri[sz]ations?|ristics?)/g,"$1haracte$2"); str = str.replace(/(C|c)har(?:actersi|i)sti(cs?)/g,"$1haracteristi$2"); str = str.replace(/(C|c)(?:ari|hara)smatic/g,"$1harismatic"); str = str.replace(/(C|c)has(rs?)/g,"$1hase$2"); str = str.replace(/(C|c)hemcia(ls?|lly)/g,"$1hemica$2"); str = str.replace(/(C|c)hemicaly/g,"$1hemically"); str = str.replace(/(C|c)hemestry/g,"$1hemistry"); str = str.replace(/(C|c)hei(fs?|fly|fdom|fship|ftain)/g,"$1hie$2"); str = str.replace(/(C|c)hildbird/g,"$1hildbirth"); str = str.replace(/(C|c)hilder?e?n/g,"$1hildren"); str = str.replace(/(C|c)hoosen/g,"$1hosen"); str = str.replace(/[Cc]hristanity/g,"Christianity"); str = str.replace(/(C|c)hurchs/g,"$1hurches"); str = str.replace(/(C|c)incinn?atti/g,"Cincinnati"); str = str.replace(/(C|c)(?:ircu|iricui?|urcui)(ts?|ted|ting|try|tries|tous|tously)/g,"$1ircui$2"); str = str.replace(/(C|c)irculato(ns?)/g,"$1irculatio$2"); str = str.replace(/(C|c)ircumsicio(ns?)/g,"$1ircumcisio$2"); str = str.replace(/(C|c)ivillia(n|ns)/g,"$1ivilia$2"); str = str.replace(/(C|c)laimes/g,"$1laims"); str = str.replace(/(C|c)lasic(s?|al|ally|is[tm]s?)/g,"$1lassic$2"); str = str.replace(/(C|c)lera/g,"$1lear"); str = str.replace(/(C|c)leareanc(es?)/g,"$1learanc$2"); str = str.replace(/(C|c)laer(e[rd]|est|ly)/g,"$1lear$2"); str = str.replace(/(C|c)liche(|s)/g,"$1liché$2"); str = str.replace(/(C|c)lincial/g,"$1linical"); str = str.replace(/(C|c)linicaly/g,"$1linically"); str = str.replace(/(C|c)octail/g,"$1ocktail"); str = str.replace(/(C|c)ognizent/g,"$1ognizant"); str = str.replace(/(C|c)o-incid(e[sd]?)/g,"$1oincid$2"); str = str.replace(/(C|c)oincedentally/g,"$1oincidentally"); str = str.replace(/(C|c)ol(?:abo|l?abe)r+at(e[sd]?|ors?|ions?|ive|ively)/g,"$1ollaborat$2"); str = str.replace(/(C|c)olateral/g,"$1ollateral"); str = str.replace(/(C|c)ollegu(es?)/g,"$1olleagu$2"); str = str.replace(/(C|c)ollecto(ns?)/g,"$1ollectio$2"); str = str.replace(/(C|c)olelcti(ves?|ons?)/g,"$1ollecti$2"); str = str.replace(/(C|c)ollon(y|ies)/g,"$1olon$2"); str = str.replace(/(C|c)olonizators/g,"$1olonizers"); str = str.replace(/(C|c)ol+onad(es?)/g,"$1olonnad$2"); str = str.replace(/(C|c)ollosa(l|lly)/g,"$1olossa$2"); str = str.replace(/(C|c)ombanatio(ns?)/g,"$1ombinatio$2"); str = str.replace(/(C|c)ombusion/g,"$1ombustion"); str = str.replace(/(C|c)omback/g,"$1omeback"); str = str.replace(/(C|c)ommedi(c|ans?)/g,"$1omedi$2"); str = str.replace(/(C|c)onfortabl([ey])/g,"$1omfortabl$2"); str = str.replace(/(C|c)omming/g,"$1oming"); str = str.replace(/(C|c)omande(rs?)/g,"$1ommande$2"); str = str.replace(/(C|c)omm?andoes/g,"$1ommandos"); str = str.replace(/(C|c)om+emm[oe]r[ai]t(e[sd]?|ing|ions?)/g,"$1ommemorat$2"); str = str.replace(/(C|c)omem+or[ae]ti(ons?|ves?|ng)/g,"$1ommemorati$2"); str = str.replace(/(C|c)omme(?:m+er|r+or)ati(ons?|ves?|ng)/g,"$1ommemorati$2"); str = str.replace(/(C|c)omm?erici?a(ls?|lly|li[sz]e[sd]?|li[sz]ing|li[sz]ation|lis[mt]s?)/g,"$1ommercia$2"); str = str.replace(/(C|c)omm?iss?ion(|'s|s|ing|ed|ers?)/g,"$1ommission$2"); str = str.replace(/(C|c)omm?ittmen(ts?)/g,"$1ommitmen$2"); str = str.replace(/(C|c)om(?:m?i|it)t(ees?|ed|ing)/g,"$1ommitt$2"); str = str.replace(/(C|c)omod+it(y|ies)/g,"$1ommodit$2"); str = str.replace(/(C|c)ommongly/g,"$1ommonly"); str = str.replace(/(C|c)omm?onweath/g,"$1ommonwealth"); str = str.replace(/(C|c)om(?:unic|minic|muin?c|mui?ni|munc?i)at(e[sd]?|ors?|ions?|ive|ively)/g,"$1ommunicat$2"); str = str.replace(/(C|c)omun(al|ally|ity|ities|ion|is[mt]s?)/g,"$1ommun$2"); str = str.replace(/(C|c)omapan(y|ies)/g,"$1ompan$2"); str = str.replace(/(C|c)omparitiv(e|ely)/g,"$1omparativ$2"); str = str.replace(/(C|c)omparisio(n|ns)/g,"$1ompariso$2"); str = str.replace(/(C|c)ompa(?:ti?[ai]b|ti?abi|bi)lit(y|ies)/g,"$1ompatibilit$2"); str = str.replace(/(C|c)ompati?abl([ey])/g,"$1ompatibl$2"); str = str.replace(/(C|c)ompensantio(ns?|nal)/g,"$1ompensatio$2"); str = str.replace(/(C|c)omp(?:et[ai]|[ai]t[ea])n(ce|t|tly)/g,"$1ompeten$2"); str = str.replace(/(C|c)ompe(?:titi|it|t[ae]t|t)i(ons?|ve|vely|veness)/g,"$1ompetiti$2"); str = str.replace(/(C|c)opmetito(rs?)/g,"$1ompetito$2"); str = str.replace(/(C|c)omplie(rs?)/g,"$1ompile$2"); str = str.replace(/(C|c)omplet(?:elyl|le?y)/g,"$1ompletely"); str = str.replace(/(C|c)ompletet?i(ng|on?)/g,"$1ompleti$2"); str = str.replace(/(C|c)omponan(ts?)/g,"$1omponen$2"); str = str.replace(/(C|c)omphrehensi(ve|on|ble)/g,"$1omprehensi$2"); str = str.replace(/(C|c)omprimis(e[ds]?|ing)/g,"$1ompromis$2"); str = str.replace(/(C|c)ompuls[ae]ry/g,"$1ompulsory"); str = str.replace(/(C|c)m?opute(rs?|ri[zs]ed)/g,"$1ompute$2"); str = str.replace(/(C|c)omputarized/g,"$1omputerized"); str = str.replace(/(C|c)oncie(ts?|ted|ve[srd]?|ving|vabl[ey]|vability)/g,"$1oncei$2"); str = str.replace(/(C|c)onsentrat(e[ds]?)/g,"$1oncentrat$2"); str = str.replace(/(C|c)onsept(s?|ual|ually|ions?|ualize[ds]?|ualizing|ualizations?|ualis[mt]s?)/g,"$1oncep$2"); str = str.replace(/(C|c)onser(ns?|ning|ned)/g,"$1oncer$2"); str = str.replace(/(C|c)onsumber/g,"$1onsumer"); str = str.replace(/(C|c)oncuren(t|tly|ces?)/g,"$1oncurren$2"); str = str.replace(/(C|c)omdemnatio(ns?)/g,"$1ondemnatio$2"); str = str.replace(/(C|c)ondemmed/g,"$1ondemned"); str = str.replace(/(C|c)ondidtio(ns?)/g,"$1onditio$2"); str = str.replace(/(C|c)onfidenta(l|lly)/g,"$1onfidentia$2"); str = str.replace(/(C|c)onfids/g,"$1onfides"); str = str.replace(/(C|c)onfigureable/g,"$1onfigurable"); str = str.replace(/(C|c)oform/g,"$1onform"); str = str.replace(/(C|c)ongradulations/g,"$1ongratulations"); str = str.replace(/(C|c)ongresional/g,"$1ongressional"); str = str.replace(/(C|c)onjecutr(e[ds]?)/g,"$1onjectur$2"); str = str.replace(/(C|c)onju[cn]ti(ons?|ves?|vitis)/g,"$1onjuncti$2"); str = str.replace(/(C|c)onect(s?|ions?|ed|ives?|ors?)/g,"$1onnect$2"); str = str.replace(/[Cc]onnetc?icut/g,"Connecticut"); str = str.replace(/(C|c)onive[ds]?/g,"$1onniv$2"); str = str.replace(/(C|c)(?:o|an)notati(ons?|ve|vely)/g,"$1onnotati$2"); str = str.replace(/(C|c)onqu(?:er|re)d/g,"$1onquered"); str = str.replace(/(C|c)onquere(rs?)/g,"$1onquero$2"); str = str.replace(/(C|c)on[cs]i(ous|ously|ousness|ence|entious|entiously|onabl[ey])/g,"$1onsci$2"); str = str.replace(/(C|c)onsciouness/g,"$1onsciousness"); str = str.replace(/(C|c)onsici?ous?ness/g,"$1onsciousness"); str = str.replace(/(C|c)onsectutiv(e|ely)/g,"$1onsecutiv$2"); str = str.replace(/(C|c)on(?:cens|e?senc)us/g,"$1onsensus"); str = str.replace(/(C|c)onscent/g,"$1onsent"); str = str.replace(/(C|c)onsquenc(es?)/g,"$1onsequenc$2"); str = str.replace(/(C|c)onsequeseces/g,"$1onsequences"); str = str.replace(/(C|c)onsen?quent(ual)?ly/g,"$1onsequently"); str = str.replace(/(C|c)onservitive/g,"$1onservative"); str = str.replace(/(C|c)on(?:cid|sdid?)e(rs?|red|ring|rabl[ey])/g,"$1onside$2"); str = str.replace(/(C|c)onsiderd/g,"$1onsidered"); str = str.replace(/(C|c)onsideres/g,"$1onsidered"); str = str.replace(/(C|c)onsistan(t|tly|cy)/g,"$1onsisten$2"); str = str.replace(/(C|c)onsolodat(e[ds]?|ing|ions?)/g,"$1onsolidat$2"); str = str.replace(/(C|c)onsonen(ts?)/g,"$1onsonan$2"); str = str.replace(/(C|c)onsorcium/g,"$1onsortium"); str = str.replace(/(C|c)onspiracys/g,"$1onspiracies"); str = str.replace(/(C|c)onspiriato(rs?|rial)/g,"$1onspirato$2"); str = str.replace(/(C|c)onstatn/g,"$1onstant"); str = str.replace(/(C|c)onstanly/g,"$1onstantly"); str = str.replace(/(C|c)onstarnatio(n|ns)/g,"$1onsternatio$2"); str = str.replace(/(C|c)onstituan(ts?)/g,"$1onstituen$2"); str = str.replace(/(C|c)on[st]ituenc(y|ies)/g,"$1onstituenc$2"); str = str.replace(/(C|c)onsitut(ed|ing|ions?|ional|ionality)/g,"$1onstitut$2"); str = str.replace(/(C|c)o(?:nstitu|stitut)io(ns?|al|ality)/g,"$1onstitutio$2"); str = str.replace(/(C|c)onstain(ts?)/g,"$1onstrain$2"); str = str.replace(/(C|c)on(?:st|tr|sttr|tstr)ucti(ons?|ve|vely)/g,"$1onstructi$2"); str = str.replace(/(C|c)onsulan(ts?)/g,"$1onsultan$2"); str = str.replace(/(C|c)onsumat(e[ds]?|ing|ions?)/g,"$1onsummat$2"); str = str.replace(/(C|c)ontaines/g,"$1ontains"); str = str.replace(/(C|c)ontaiminat(e[ds]?)/g,"$1ontaminat$2"); str = str.replace(/(C|c)ontemporaneus/g,"$1ontemporaneous"); str = str.replace(/(C|c)ontampor?ar(y|ies)/g,"$1ontemporar$2"); str = str.replace(/(C|c)ontempor(y|ies)/g,"$1ontemporar$2"); str = str.replace(/(C|c)ontendo(rs?)/g,"$1ontende$2"); str = str.replace(/(C|c)onstinua(l|lly)/g,"$1ontinua$2"); str = str.replace(/(C|c)ountinu(e[ds?]|ations?|ity)/g,"$1ontinu$2"); str = str.replace(/(C|c)ontinueing/g,"$1ontinuing"); str = str.replace(/(C|c)ontinous(|ly)/g,"$1ontinuous$2"); str = str.replace(/(C|c)ontritutio(ns?)/g,"$1ontributio$2"); str = str.replace(/(C|c)ontribute(rs?)/g,"$1ontributo$2"); str = str.replace(/(C|c)ontrol(ls?)/g,"$1ontro$2"); str = str.replace(/(C|c)ontrol(e[dr]|ing)/g,"$1ontroll$2"); str = str.replace(/(C|c)ontr(?:[oa]ver[ct]?|aver[st])(y|ies|ial|ially)/g,"$1ontrovers$2"); str = str.replace(/(C|c)onv(?:ein|vieni)en(t|tly|ces?)/g,"$1onvenien$2"); str = str.replace(/(C|c)onvential/g,"$1onventional"); str = str.replace(/(C|c)onvertio(ns?)/g,"$1onversio$2"); str = str.replace(/(C|c)onverto(rs?)/g,"$1onverte$2"); str = str.replace(/(C|c)onvertabl(es?)/g,"$1onvertibl$2"); str = str.replace(/(C|c)onviced/g,"$1onvinced"); str = str.replace(/(C|c)oordiantio(ns?)/g,"$1oordinatio$2"); str = str.replace(/(C|c)oppied/g,"$1opied"); str = str.replace(/(C|c)oridal/g,"$1ordial"); str = str.replace(/(C|c)orp[ae]rat(e|ions?)/g,"$1orporat$2"); str = str.replace(/(C|c)orrecte(rs?)/g,"$1orrector$2"); str = str.replace(/(C|c)orrispon(ds?|ded|ding|dingly|dents?|dences?|dency)/g,"$1orrespon$2"); str = str.replace(/(C|c)orr[ei]spondan(ts?|ces?|cy)/g,"$1orresponden$2"); str = str.replace(/(C|c)orrepo[ns]ding/g,"$1orresponding"); str = str.replace(/(C|c)orridoo(rs?)/g,"$1orrido$2"); str = str.replace(/(C|c)orosio(ns?)/g,"$1orrosio$2"); str = str.replace(/(C|c)ould'?nt/g,"$1ouldn't"); str = str.replace(/(C|c)ouci(ls?)/g,"$1ounci$2"); str = str.replace(/(C|c)ounries/g,"$1ountries"); str = str.replace(/(C|c)oururie(rs?)/g,"$1ourie$2"); str = str.replace(/(C|c)onvenan(ts?|ted|ting|tal|tally|t[oe]rs?|tees?)/g,"$1ovenan$2"); str = str.replace(/(C|c)reaeted/g,"$1reated"); str = str.replace(/(C|c)riterias/g,"$1riteria"); str = str.replace(/(C|c)ritereon/g,"$1riterion"); str = str.replace(/(C|c)rtic(al|ize[ds]?|izing|isms?)/g,"$1ritic$2"); str = str.replace(/(C|c)ritisi[sz]?(ms?|e[ds]?|ing)/g,"$1riticis$2"); str = str.replace(/(C|c)riti[zs](e[ds]?|ing)/g,"$1riticiz$2"); str = str.replace(/(C|c)rockodil(es?)/g,"$1rocodil$2"); str = str.replace(/(C|c)rystali(s|z)atio(ns?)/g,"$1rystalli$2atio$3"); str = str.replace(/(C|c)uliminat(e[ds]?|ing|ions?)/g,"$1ulminat$2"); str = str.replace(/(C|c)umulatative/g,"$1umulative"); str = str.replace(/(C|c)urrenly/g,"$1urrently"); str = str.replace(/(C|c)iriculum/g,"$1urriculum"); str = str.replace(/(C|c)urriculem/g,"$1urriculum"); str = str.replace(/(C|c)(?:yc|i)lind(ers?|rical|rically)/g,"$1ylind$2"); break; case "d": str = str.replace(/(D|d)almatio(ns?)/g,"$1almatia$2"); str = str.replace(/(D|d)ebateabl(e|y)/g,"$1ebatabl$2"); str = str.replace(/(D|d)ecaffinat(e[ds]?)/g,"$1ecaffeinat$2"); str = str.replace(/(D|d)ecathalo(ns?)/g,"$1ecathlo$2"); str = str.replace(/(D|d)eciev(e[ds]?|ing)/g,"$1eceiv$2"); str = str.replace(/(D|d)ecellerat(e[sd]?|ion|ive)/g,"$1ecelerat$2"); str = str.replace(/december/g,"December"); str = str.replace(/(D|d)esi(de[ds]|sions?)/g,"$1eci$2"); str = str.replace(/(D|d)ecideable/g,"$1ecidable"); str = str.replace(/(D|d)ecidely/g,"$1ecidedly"); str = str.replace(/(D|d)e(?:cis|scisi|sici)o(ns?)/g,"$1ecisio$2"); str = str.replace(/(D|d)ecomissio(ns?|ning|ned)/g,"$1ecommissio$2"); str = str.replace(/(D|d)eaful(ts?|ted|ting)/g,"$1efaul$2"); str = str.replace(/(D|d)efenden(ts?)/g,"$1efendan$2"); str = str.replace(/(D|d)effen([cs])(es?|ive|ively|ible|eless)/g,"$1efen$2$3"); str = str.replace(/(D|d)effn?in(e[ds]?|ing|itions?)/g,"$1efin$2"); str = str.replace(/(D|d)ef+in[ae]te?(|s|ly|ness)/g,"$1efinite$2"); str = str.replace(/(D|d)ef+i(?:nit|nti)(ons?|ives?|ively)/g,"$1efinit$2"); str = str.replace(/(D|d)elagat(e[ds]?|ing|ions?)/g,"$1elegat$2"); str = str.replace(/(D|d)eliberae?tly/g,"$1eliberately"); str = str.replace(/(D|d)eleriou(s|sly)/g,"$1eliriou$2"); str = str.replace(/(D|d)emeno(rs?)/g,"$1emeano$2"); str = str.replace(/(D|d)e(?:om|mor)cra(cy|cies|ts?|tic)/g,"$1emocra$2"); str = str.replace(/(D|d)emolisio(ns?)/g,"$1emolitio$2"); str = str.replace(/(D|d)emostrat(e[sd]?|ing|ions?|ive|ively|ors?)/g,"$1emonstrat$2"); str = str.replace(/(D|d)emonstar?t(e[sd]?|ing|ive|ions?|ors?)/g,"$1emonstrat$2"); str = str.replace(/(D|d)enegrat(e[ds]?|ing|ions?)/g,"$1enigrat$2"); str = str.replace(/(D|d)epend?anc(es?|y|ies)/g,"$1ependenc$2"); str = str.replace(/(D|d)iriv(e[ds]?|ing)/g,"$1eriv$2"); str = str.replace(/(D|d)erivia?ti(ves?|ons?)/g,"$1erivati$2"); str = str.replace(/(D|d)eriviated/g,"$1erived"); str = str.replace(/(D|d)erog[io]tory/g,"$1erogatory"); str = str.replace(/(D|d)ec?cend(a|e)n[td](s?)/g,"$1escend$2nt$3"); str = str.replace(/(D|d)e(?:sc|scri|cr)ib(e[ds]?|ing)/g,"$1escrib$2"); str = str.replace(/(D|d)e(?:sc|s?cri?)ipte(rs?)/g,"$1escripto$2"); str = str.replace(/(D|d)es+[aei]cat(e[ds]?|ions?)/g,"$1esiccat$2"); str = str.replace(/(D|d)es(?:sig|gi)(ns?|ne[dr]|ning)/g,"$1esig$2"); str = str.replace(/(D|d)esireab(les?|ility)/g,"$1esirab$2"); str = str.replace(/(D|d)esp[ai]rat(e|ely|ion)/g,"$1esperat$2"); str = str.replace(/(D|d)ispicabl(e|y)/g,"$1espicabl$2"); str = str.replace(/(D|d)establiz(e[drs]?|ing)/g,"$1estabiliz$2"); str = str.replace(/(D|d)esinatio(ns?)/g,"$1estinatio$2"); str = str.replace(/(D|d)estor(ys?|yed|ying)/g,"$1estro$2"); str = str.replace(/(D|d)(?:is|esc)truct(ive|ively|iveness|ions?)/g,"$1estruct$2"); str = str.replace(/(D|d)etatc(h|he[ds]|hing|hments?|hable)/g,"$1etac$2"); str = str.replace(/(D|d)etaill(ed|ing)/g,"$1etail$2"); str = str.replace(/(D|d)ectec(ts?|ted|ting|tors?|tions?|tives?)/g,"$1etec$2"); str = str.replace(/(D|d)ete(?:o?r|rior)iat(e[ds]?|ing|ion)/g,"$1eteriorat$2"); str = str.replace(/(D|d)eterminin(e[ds]?|ing|ations?)/g,"$1etermin$2"); str = str.replace(/(D|d)etr[ea]men(t|tal)/g,"$1etrimen$2"); str = str.replace(/(D|d)ev(?:[ei]sta|asa?)t(e[ds]?|ing|ion)/g,"$1evastat$2"); str = str.replace(/(D|d)evelopp(e[dr]|ers|ing|ments?)/g,"$1evelop$2"); str = str.replace(/(D|d)e(?:vol[oe]|levo|vel)p[oe]?men(ts?|tal)/g,"$1evelopmen$2"); str = str.replace(/(D|d)iablical/g,"$1iabolical"); str = str.replace(/(D|d)iamate(rs?)/g,"$1iamete$2"); str = str.replace(/(D|d)ichtom(y|ies)/g,"$1ichotom$2"); str = str.replace(/(D|d)id'?nt/g,"$1idn't"); str = str.replace(/(D|d)if(?:er|f[ai]?)ren(t|tly|ce[sd]?|cing|tials?|tiate[ds]?|tiating|tiations?|tiable|tiability|tiae?)/g,"$1ifferen$2"); str = str.replace(/(D|d)ifferentiatiatio(ns?)/g,"$1ifferentiatio$2"); str = str.replace(/(D|d)iff?iculit(y|ies)/g,"$1ifficult$2"); str = str.replace(/(D|d)ificult(y|ies)/g,"$1ifficult$2"); str = str.replace(/(D|d)(?:e|il)lapidat(e[ds]?|ion)/g,"$1ilapidat$2"); str = str.replace(/(D|d)ime(?:nt?|sn)io(ns?|nal|nally|nality)/g,"$1imensio$2"); str = str.replace(/(D|d)iminuiti(ves?|vely|ons?)/g,"$1iminuti$2"); str = str.replace(/(D|d)ioses(es?|an)/g,"$1ioces$2"); str = str.replace(/(D|d)iplomancy/g,"$1iplomacy"); str = str.replace(/(D|d)riectly/g,"$1irectly"); str = str.replace(/(D|d)irecty/g,"$1irectly"); str = str.replace(/(D|d)isagreee(d|s)/g,"$1isagree$2"); str = str.replace(/(D|d)issagreemen(ts?)/g,"$1isagreemen$2"); str = str.replace(/(D|d)is(?:ap+ear|sap+ear?)(rs?|red|ring|rances?)/g,"$1isappea$2"); str = str.replace(/(D|d)iss?app?earenc(es?)/g,"$1isappearanc$2"); str = str.replace(/(D|d)iss?app?oin(ts?|ted|ting|tments?)/g,"$1isappoin$2"); str = str.replace(/(D|d)isaprov(es?|al)/g,"$1isapprov$2"); str = str.replace(/(D|d)issarr?ay/g,"$1isarray"); str = str.replace(/(D|d)iaste(rs?)/g,"$1isaste$2"); str = str.replace(/(D|d)isa(?:ste|t)rou(s|sly)/g,"$1isastrou$2"); str = str.replace(/(D|d)i[sc]iplin(e[ds]?|ing)/g,"$1isciplin$2"); str = str.replace(/(D|d)iconnec(ts?)/g,"$1isconnec$2"); str = str.replace(/(D|d)icove(r[ys]?|red|ring|ries)/g,"$1iscove$2"); str = str.replace(/(D|d)iscrepen[cs](y|ies)/g,"$1iscrepanc$2"); str = str.replace(/(D|d)icus(s|sed|sing|sions?)/g,"$1iscus$2"); str = str.replace(/(D|d)esintegrat(e[ds]?|ion)/g,"$1isintegrat$2"); str = str.replace(/(D|d)isobedian(t|ce|tly)/g,"$1isobedien$2"); str = str.replace(/(D|d)issobedi[ea]n(t|ce|tly)/g,"$1isobedien$2"); str = str.replace(/(D|d)esorde(rs?|rly)/g,"$1isorde$2"); str = str.replace(/(D|d)esorien(ts?|ted)/g,"$1isorien$2"); str = str.replace(/(D|d)isparingly/g,"$1isparagingly"); str = str.replace(/(D|d)ispell/g,"$1ispel"); str = str.replace(/(D|d)ispenc(e[ds]?|ing)/g,"$1ispens$2"); str = str.replace(/(D|d)ispostio(ns?)/g,"$1ispositio$2"); str = str.replace(/(D|d)isproportiate/g,"$1isproportionate"); str = str.replace(/(D|d)isput(?:e?i|ea)b(l[ey]|ility)/g,"$1isputab$2"); str = str.replace(/(D|d)isatisf(y|ied|action)/g,"$1issatisf$2"); str = str.replace(/(D|d)isem+inat(e[ds]?|ing|ions?)/g,"$1isseminat$2"); str = str.replace(/(D|d)isolv(ed?|ing)/g,"$1issolv$2"); str = str.replace(/(D|d)is(?:ctinc|ti[cn])ti(ons?|ve|vely)/g,"$1istincti$2"); str = str.replace(/(D|d)isting(?:[iu]|qui)s(h|he[ds]|hing)/g,"$1istinguis$2"); str = str.replace(/(D|d)i(?:tri|stru)but(e[ds]?|ing|ors?|ions?)/g,"$1istribut$2"); str = str.replace(/(D|d)isric(ts?)/g,"$1istric$2"); str = str.replace(/(D|d)iviso(ns?)/g,"$1ivisio$2"); str = str.replace(/(D|d)occumen(ts?|ted|tation|tary|taries)/g,"$1ocumen$2"); str = str.replace(/(D|d)ocumenatr(y|ies)/g,"$1ocumentar$2"); str = str.replace(/(D|d)oes'?nt/g,"$1oesn't"); str = str.replace(/(D|d)omin(?:e|ia)(nt|ntly|nce|te[sd]?|ting|tions?)/g,"$1omina$2"); str = str.replace(/(D|d)ominaton/g,"$1omination"); str = str.replace(/(D|d)don;t/g, "$1on\'t"); str = str.replace(/(D|d)ra(f|ugh)t(m[ae]n|wom[ae]n|manship)/g,"$1ra$2ts$3"); str = str.replace(/(D|d)ravadian/g,"$1ravidian"); str = str.replace(/(D|d)ruming/g,"$1rumming"); break; case "e": str = str.replace(/(E|e)alier/g,"$1arlier"); str = str.replace(/(E|e)early/g,"$1arly"); str = str.replace(/(E|e)(cc|g)lecti(c|cally|cism)/g,"$1clecti$2"); str = str.replace(/(E|e)clisps?(e[sd]?|ing)/g,"$1clips$2"); str = str.replace(/(E|e)c[ce]onom(y|ic|i[ce]s|ic|ical|ically)/g,"$1conom$2"); str = str.replace(/(E|e)conomicaly/g,"$1conomically"); str = str.replace(/(E|e)conomics(ts?)/g,"$1conomis$2"); str = str.replace(/(E|e)ff?ectivly/g,"$1ffectively"); str = str.replace(/(E|e)ff[ei]ci?en(t|tly|cy|cies)/g,"$1fficien$2"); str = str.replace(/(E|e)ffulenc(es?)/g,"$1ffluenc$2"); str = str.replace(/(E|e)llect(ed|ions?|ing|ives?|ively|ors?|oral|orally|able|ability|ioneers?|ioneered|ioneering|orates?)/g,"$1lect$2"); str = str.replace(/(E|e)lectrial/g,"$1lectrical"); str = str.replace(/(E|e)lectricly/g,"$1lectrically"); str = str.replace(/(E|e)le(?:ctric|trici)ty/g,"$1lectricity"); str = str.replace(/(E|e)lement[ar]y/g,"$1lementary"); str = str.replace(/(E|e)limentary/g,"$1lementary"); str = str.replace(/(E|e)lphant/g,"$1lephant"); str = str.replace(/(E|e)licided/g,"$1licited"); str = str.replace(/(E|e)ligab(le|ility)/g,"$1ligib$2"); str = str.replace(/(E|e)leminat(e[ds]?|ing)/g,"$1liminat$2"); str = str.replace(/(E|e)mbar(?:as|ra)(s|se[ds]|sing|singly|sments?)/g,"$1mbarras$2"); str = str.replace(/(E|e)mbarrase?men(ts?)/g,"$1mbarrassmen$2"); str = str.replace(/(E|e)mbezell(e|e[drs]|ing)/g,"$1mbezzl$2"); str = str.replace(/(E|e)mblamatic/g,"$1mblematic"); str = str.replace(/(E|e)mmigrat(e[sd]?|tion|tions)/g,"$1migrat$2"); str = str.replace(/(E|e)m(?:miss?ar?|m?isar?|m?iss?ar)r(y|ies)/g,"$1missar$2"); str = str.replace(/(E|e)m+i[st]io(n|ns)/g,"$1missio$2"); str = str.replace(/(E|e)(?:m+it|mmit+)(e[dr]|ing)/g,"$1mitt$2"); str = str.replace(/(E|e)mph[as]is(e?d?)/g,"$1mphasis$2"); str = str.replace(/(E|e)mphai([sz]ed?)/g,"$1mphasi$2"); str = str.replace(/(E|e)mphys[iy]ma/g,"$1mphysema"); str = str.replace(/(E|e)mperic(al|is[mt])/g,"$1mpiric$2"); str = str.replace(/(E|e)ncyph(ers?)/g,"$1nciph$2"); str = str.replace(/(E|e)ncryptiio(ns?)/g,"$1ncryptio$2"); str = str.replace(/(E|e)ncylc?opedi(as?|c)/g,"$1ncyclopedi$2"); str = str.replace(/(E|e)ndevo(u?rs?|u?red|u?ring)/g,"$1ndeavo$2"); str = str.replace(/(E|e)ndolithes/g,"$1ndoliths"); str = str.replace(/(E|e)nforceing/g,"$1nforcing"); str = str.replace(/(E|e)ngagmen(ts?)/g,"$1ngagemen$2"); str = str.replace(/england/g,"England"); str = str.replace(/(E|e)ngi?enee(rs?|red|ring)/g,"$1nginee$2"); str = str.replace(/(E|e)nchancemen(ts?)/g,"$1nhancemen$2"); str = str.replace(/(E|e)nlargmen(ts?)/g,"$1nlargemen$2"); str = str.replace(/(E|e)nglightenmen(ts?)/g,"$1nlightenmen$2"); str = str.replace(/(E|e)mnity/g,"$1nmity"); str = str.replace(/(E|e)nourmou(s|sly)/g,"$1normou$2"); str = str.replace(/(E|e)ntaglemen(ts?)/g,"$1ntanglemen$2"); str = str.replace(/(E|e)nteratin(ment|ing)/g,"$1ntertain$2"); str = str.replace(/(E|e)nthusais(ts?|tic)/g,"$1nthusias$2"); str = str.replace(/(E|e)ntie?r(ly|ty|ties)/g,"$1ntire$2"); str = str.replace(/(E|e)ntitit(y|ies)/g,"$1ntit$2"); str = str.replace(/(E|e)ntitlied/g,"$1ntitled"); str = str.replace(/(E|e)nt(?:era|re)nc(es?|ing|ement)/g,"$1ntranc$2"); str = str.replace(/(E|e)ntrepeneu(rs?|red|ring|rships?|rial)/g,"$1ntrepreneu$2"); str = str.replace(/(E|e)nvi?(?:rion?|ro|orn?)men(ts?|tal|tally|talists?)/g,"$1nvironmen$2"); str = str.replace(/(E|e)p(?:ids|si)od(es?|ic|ical|ically)/g,"$1pisod$2"); str = str.replace(/(E|e)quill?ibiu(ms?)/g,"$1quilibriu$2"); str = str.replace(/(E|e)quippment/g,"$1quipment"); str = str.replace(/(E|e)quip(ed|ing)/g,"$1quipp$2"); str = str.replace(/(E|e)qui(?:ale|v[aie]la|vlal[ea])n(ts?|tly|ces?)/g,"$1quivalen$2"); str = str.replace(/(E|e)rradica(bl[ey]|te[sd]?|tors?|ting|tions?)/g,"$1radica$2"); str = str.replace(/(E|e)rrect(ed|ions?|ly)/g,"$1rect$2"); str = str.replace(/(E|e)rati(c|cally)/g,"$1rrati$2"); str = str.replace(/(E|e)raticly/g,"$1rratically"); str = str.replace(/(E|e)rrupted/g,"$1rupted"); str = str.replace(/(E|e)[sx]peciall?y/g,"$1specially"); str = str.replace(/(E|e)ssense/g,"$1ssence"); str = str.replace(/(E|e)s(?:sentai|sentua|sesita|sencia|entia)(ls?|lly|lity|lities|lness)/g,"$1ssentia$2"); str = str.replace(/(E|e)ssentialy/g,"$1ssentially"); str = str.replace(/(E|e)stab(?:ish|lis)(e[ds]?|ing|ments?)/g,"$1stablish$2"); str = str.replace(/(E|e)sitmat(e|es|ed)/g,"$1stimat$2"); str = str.replace(/(E|e)thnocentricm/g,"$1thnocentrism"); str = str.replace(/(E|e)ur(?:opi|po?e)a(ns?|ni[sz]e[sd]?|ni[sz]ation)/g,"$1uropea$2"); str = str.replace(/(E|e)ven(?:htu|ti?)a(l|lly)/g,"$1ventua$2"); str = str.replace(/(E|e)ventualy/g,"$1ventually"); str = str.replace(/(E|e)verthing/g,"$1verything"); str = str.replace(/(E|e)xerbat(e[sd]?|ing|ions?)/g,"$1xacerbat$2"); str = str.replace(/(E|e)xcact/g,"$1xact"); str = str.replace(/(E|e)xagerr?at(e[sd]?|ing|ions?)/g,"$1xaggerat$2"); str = str.replace(/(E|e)xampler/g, "$1xample"); str = str.replace(/(E|e)xhalted/g,"$1xalted"); str = str.replace(/(E|e)xaminated/g,"$1xamined"); str = str.replace(/(E|e)x(?:em|ma)pl(es?)/g,"$1xampl$2"); str = str.replace(/(E|e)xcedded/g,"$1xceeded"); str = str.replace(/(E|e)xeedingly/g,"$1xceedingly"); str = str.replace(/(E|e)xcel(ls?)/g,"$1xce$2"); str = str.replace(/(E|e)xc?ell?[ae]n(t|ce)/g,"$1xcellen$2"); str = str.replace(/(E|e)xep(t|ting|tional|tionally)/g,"$1xcep$2"); str = str.replace(/(E|e)xerp(ts?|ted|ting)/g,"$1xcerp$2"); str = str.replace(/(E|e)xcang(e[sd]?|ing)/g,"$1xchang$2"); str = str.replace(/(E|e)xchanching/g,"$1xchanging"); str = str.replace(/(E|e)xlud(es?|ing)/g,"$1xclud$2"); str = str.replace(/(E|e)xculsivly/g,"$1xclusively"); str = str.replace(/(E|e)xcecut(e[sd]?|ing|ions?|ives?)/g,"$1xecut$2"); str = str.replace(/(E|e)xer(?:cies|si[sz])(e[sdr]?|ing)/g,"$1xercis$2"); str = str.replace(/(E|e)xcercise/g,"$1xercise"); str = str.replace(/(E|e)xecising/g,"$1xercising"); str = str.replace(/(E|e)x(?:hib|ibi)tio(ns?|nis[mt]s?)/g,"$1xhibitio$2"); str = str.replace(/(E|e)xliled/g,"$1xiled"); str = str.replace(/(E|e)xist[ai]n(ce|t)/g,"$1xisten$2"); str = str.replace(/(E|e)xonorate/g,"$1xonerate"); str = str.replace(/(E|e)xoskelato(ns?)/g,"$1xoskeleto$2"); str = str.replace(/(E|e)xapansio(ns?)/g,"$1xpansio$2"); str = str.replace(/(E|e)xpeced/g,"$1xpected"); str = str.replace(/(E|e)xp(?:edit|iditi)o(ns?|nary)/g,"$1xpeditio$2"); str = str.replace(/(E|e)xpell(|s)/g,"$1xpel$2"); str = str.replace(/(E|e)xp(?:eria|iere)nc(e[ds]?|ing)/g,"$1xperienc$2"); str = str.replace(/(E|e)xpe(?:ime|rima)n(ts?|tal|tally)/g,"$1xperimen$2"); str = str.replace(/(E|e)xp(?:ali|la)(ns?|ning)/g,"$1xplai$2"); str = str.replace(/(E|e)xplainat(ions?|ory)/g,"$1xplanat$2"); str = str.replace(/(E|e)xplic(t|tly)/g,"$1xplici$2"); str = str.replace(/(E|e)xplic(?:il?t|tl)y/g,"$1xplicitly"); str = str.replace(/(E|e)xplotatio(ns?)/g,"$1xploitatio$2"); str = str.replace(/(E|e)xploititive/g,"$1xploitative"); str = str.replace(/(E|e)xressed/g,"$1xpressed"); str = str.replace(/(E|e)xpropiat(e[ds]?|ing|ions?)/g,"$1xpropriat$2"); str = str.replace(/(E|e)xtentio(ns?)/g,"$1xtensio$2"); str = str.replace(/(E|e)xtensivly/g,"$1xtensively"); str = str.replace(/(E|e)xerternal/g,"$1xternal"); str = str.replace(/(E|e)xtint/g,"$1xtinct"); str = str.replace(/(E|e)xtradictio(ns?)/g,"$1xtraditio$2"); str = str.replace(/(E|e)xtrordinar(y|ily)/g,"$1xtraordinar$2"); str = str.replace(/(E|e)xtraterrestia(ls?)/g,"$1xtraterrestria$2"); str = str.replace(/(E|e)xtrav[ae]n?g[ae]n(t|tly|ces?)/g,"$1xtravagan$2"); str = str.replace(/(E|e)xt(?:eme|remem|rem)ly/g,"$1xtremely"); break; case "f": str = str.replace(/(F|f)amillia(r|rly|l)/g,"$1amilia$2"); str = str.replace(/(F|f)acis(t|ts|tic)/g,"$1ascis$2"); str = str.replace(/[Ff]ebur?[ae]ry/g,"February"); str = str.replace(/febru[ae]ry/g,"February"); str = str.replace(/(F|f)rs(t|ts|ly)/g,"$1irs$2"); str = str.replace(/(F|f)irst[ -]hand/g,"$1irsthand"); str = str.replace(/(F|f)lambouyan(t|ce|tly)/g,"$1lamboyan$2"); str = str.replace(/(F|f)l(?:uoro|oure)sc(e[ds]?|ent|ence|ing)/g,"$1luoresc$2"); str = str.replace(/(F|f|[Hh]ydrof|[Dd]if|[Tt]rif|[Tt]etraf|[Pp]entaf|[Hh]exaf)lour(o|esc(e[sd]?|ing|en(t|ce))|i(c|dat(e[sd]?|ing|ion)|[dn]es?))/g,"$1luor$2"); str = str.replace(/(F|f)olowing/g,"$1ollowing"); str = str.replace(/(F|f)ourty/g,"$1orty"); str = str.replace(/friday/g,"Friday"); str = str.replace(/(F|f)rein(ds|dly|dships?)/g,"$1rien$2"); str = str.replace(/furthur(|ed|ing|s|ance|more|most)/g,"further$1"); str = str.replace(/Furthur(ed|ing|s|ance|more|most)/g,"Further$1"); break; case "g": str = str.replace(/(G|g)alatic/g,"$1alactic"); str = str.replace(/(G|g)allax(y|ies)/g,"$1alax$2"); str = str.replace(/(G|g)alviniz(e[drs]?|ing)/g,"$1alvaniz$2"); str = str.replace(/(G|g)handi/g,"$1andhi"); str = str.replace(/(G|g)arniso(ns?|ned|ning)/g,"$1arriso$2"); str = str.replace(/(G|g)uag(e[ds]?|ing)/g,"$1aug$2"); str = str.replace(/(G|g)eneolog(y|ies|ical)/g,"$1enealog$2"); str = str.replace(/(G|g)eneraly/g,"$1enerally"); str = str.replace(/(G|g)eneratt(e[ds]?|ors?|ing)/g,"$1enerat$2"); str = str.replace(/(G|g)enociad(es?|al|ally)/g,"$1enocid$2"); str = str.replace(/(G|g)eographicial/g,"$1eographical"); str = str.replace(/(G|g)naww(ed|ing|s)/g,"$1nawed"); str = str.replace(/(G|g)oobl(e[ds]?|ing)/g,"$1obbl$2"); str = str.replace(/(G|g)odounov/g,"$1odunov"); str = str.replace(/(G|g)oign/g,"$1oing"); str = str.replace(/(G|g)othenberg/g,"$1othenburg"); str = str.replace(/(G|g)ottten/g,"$1otten"); str = str.replace(/(G|g)ottleib/g,"$1ottlieb"); str = str.replace(/(G|g)overance/g,"$1overnance"); str = str.replace(/(G|g)ov(?:orn?m|en?r?m|ermn?|ernmn|ernem)en?(ts?|tal|tally)/g,"$1overnmen$2"); str = str.replace(/(G|g)ouver?n[eo](rs?|rships?)/g,"$1overnor$2"); str = str.replace(/(G|g)overner/g,"$1overnor"); str = str.replace(/(G|g)raceful(l|lly|lness)/g,"$1racefu$2"); str = str.replace(/(G|g)rafitt(i|o|ists?)/g,"$1raffit$2"); str = str.replace(/(G|g)ramatica(l|lly|lity)/g,"$1rammatica$2"); str = str.replace(/(G|g)rammaticaly/g,"$1rammatically"); str = str.replace(/(G|g)reatfu(l|lness|lly)/g,"$1ratefu$2"); str = str.replace(/(G|g)ratuitiou(s|sly|sness)/g,"$1ratuitou$2"); str = str.replace(/(G|g)r(?:ievi|eiv)ou(s|sly|sness)/g,"$1rievou$2"); str = str.replace(/(G|g)unanine/g,"$1uanine"); str = str.replace(/(G|g)auarana/g,"$1uarana"); str = str.replace(/(G|g)uarente(e[sd]?|eing)/g,"$1uarante$2"); str = str.replace(/(G|g)(?:[au]|au)r[ae]nte+([sd]?|ing)/g,"$1uarantee$2"); str = str.replace(/(G|g)aurd(ed|ing|edly|ians?)/g,"$1uard$2"); str = str.replace(/(G|g)uatamal(a|ans?)/g,"Guatemal$2"); str = str.replace(/(G|g)uerril(as?)/g,"$1uerill$2"); str = str.replace(/(G|g)uidence/g,"$1uidance"); str = str.replace(/(G|g)uiness/g,"Guinness"); str = str.replace(/(G|g)utt[ae]ra(l|lism|lness|lly)/g,"$1uttura$2"); break; case "h": str = str.replace(/(H|h)aba?eus/g,"$1abeas"); str = str.replace(/(H|h)absbourg/g,"$1absburg"); str = str.replace(/(H|h)allowean/g,"$1alloween"); str = str.replace(/(H|h)appended/g,"$1appened"); str = str.replace(/(H|h)ar(?:ras|r?a)s(e[sd]|ings?|ingly|ments?)/g,"$1arass$2"); str = str.replace(/(H|h)arr?ass?emen(ts?)/g,"$1arassmen$2"); str = str.replace(/([Hh]a[sd])'?nt/g,"$1n't"); str = str.replace(/(H|h)ave'?nt/g,"$1aven't"); str = str.replace(/(H|h)eadquate(r|rs|red|ring)/g,"$1eadquarte$2"); str = str.replace(/(H|h)aviest/g,"$1eaviest"); str = str.replace(/(H|h)ea?villy/g,"$1eavily"); str = str.replace(/(H|h)eidelburg/g,"$1eidelberg"); str = str.replace(/(H|h)elpped/g,"$1elped"); str = str.replace(/(H|h)elpfull/g,"$1elpful"); str = str.replace(/(H|h)emmorhag(e[sd]?|ing)/g,"$1emorrhag$2"); str = str.replace(/(H|h)eridit(y|ary)/g,"$1eredit$2"); str = str.replace(/(H|h)erritage/g,"$1eritage"); str = str.replace(/(H|h)eros/g,"$1eroes"); str = str.replace(/(H|h)ertzs/g,"$1ertz"); str = str.replace(/(H|h)esist[ae]n(t|tly)/g,"$1esitan$2"); str = str.replace(/(H|h)eterogen(ous|ity)/g,"$1eterogene$2"); str = str.replace(/(H|h)eirarch(y|ies|ical)/g,"$1ierarch$2"); str = str.replace(/(H|h)(?:ierogl|eirogly)ph(s?|ics?|ical|ically)/g,"$1ieroglyp$2"); str = str.replace(/(H|h)eigh(er|est|ness)/g,"$1igh$2"); str = str.replace(/(H|h)illariou(s|sly|sness)/g,"$1ilariou$2"); str = str.replace(/(H|h)inder[ea]nc(es?)/g,"$1indranc$2"); str = str.replace(/(H|h)indrenc(es?)/g,"$1indranc$2"); str = str.replace(/(H|h)ipopotamu(s|ses)/g,"$1ippopotamu$2"); str = str.replace(/(H|h)istocompatabil(ities|ity)/g,"$1istocompatibil$2"); str = str.replace(/(H|h)istoricia(ns?)/g,"$1istoria$2"); str = str.replace(/(H|h)sitoria(ns?)/g,"$1istoria$2"); str = str.replace(/(H|h)omogeneiz(e[sd]?|ing|ation)/g,"$1omogeniz$2"); str = str.replace(/(H|h)onory/g,"$1onorary"); str = str.replace(/(H|h)ounou(rs?|ring)/g,"$1onou$2"); str = str.replace(/(H|h)orrifing/g,"$1orrifying"); str = str.replace(/(H|h)ospitible/g,"$1ospitable"); str = str.replace(/(H|h)umanites/g,"$1umanities"); str = str.replace(/(H|h)uminoi(ds?)/g,"$1umanoi$2"); str = str.replace(/(H|h)umoural/g,"$1umoral"); str = str.replace(/(H|h)umerou(s|sly|sness)/g,"$1umorou$2"); str = str.replace(/(H|h)undere(ds?)/g,"$1undre$2"); str = str.replace(/(H|h)ydr[oa]p(il|ob)(es?|i[ac]|icity)/g,"$1ydroph$2$3"); str = str.replace(/(H|h)ygein(e|ics?)/g,"$1ygien$2"); str = str.replace(/(H|h)ypocra[cs](y|ies)/g,"$1ypocris$2"); str = str.replace(/(H|h)ypocrit(|s)/g,"$1ypocrite$2"); break; case "i": str = str.replace(/(I|i)dentitiy/g,"$1dentity"); str = str.replace(/(I|i)d[ie]osyncrac(y|ies)/g,"$1diosyncras$2"); str = str.replace(/([Ii]ll|L|l)(?:igit[ai]?m[ai]|[ei]gita?m[ai]|[ei]git[ai]?mi)(te[sd]?|ting|tely|teness|cy|cies|tions?|tize[sd]?|tizing|tors?)/g,"$1egitima$2"); str = str.replace(/(I|i)mm[ei]diate?(|ly)/g,"$1mmediate$2"); str = str.replace(/emmediat(e|ely)/g,"immediat$1"); str = str.replace(/emprison(s?|ed|ing|ment)/g,"imprison$1"); str = str.replace(/(I|i)mprisonement/g,"$1mprisonment"); str = str.replace(/(I|i)mprovmen(t|ts)/g,"$1mprovemen$2"); str = str.replace(/(I|I)nnaccura(cy|cies|te|tely)/g,"$1naccura$2"); str = str.replace(/(I|i)nthe/g,"$1n the"); str = str.replace(/(I|i)ncread[ia]bl(e|y)/g,"$1ncredibl$2"); str = str.replace(/(I|i)ndefin[ai]t(e|ely)/g,"$1ndefinit$2"); str = str.replace(/(I|i)ndependan(t|tly|ce)/g,"$1ndependen$2"); str = str.replace(/(I|i)n?[cs]in[ea]rat(e|es|ed|ing|ion|or)/g,"$1ncinerat$2"); str = str.replace(/[Uu]niversity of Indiana/g,"Indiana University"); str = str.replace(/(I|i)ndiginou(s|sly)/g,"$1ndigenou$2"); str = str.replace(/([Ii]n|D|d)isput(?:e?i|ea)b(l[ey]|ility)/g,"$1isputab$2"); str = str.replace(/(I|i)nfanty/g,"$1nfantry"); str = str.replace(/(I|i)nfectuou(s|sly|sness)/g,"$1nfectiou$2"); str = str.replace(/(I|i)nfina?t(e|ely)/g,"$1nfinit$2"); str = str.replace(/enflam(e[ds]?|ing)/g,"inflam$1"); str = str.replace(/(I|i)nflama(tions?|tory|bl[ey]|bility)/g,"$1nflamma$2"); str = str.replace(/(I|i)nfom+ati(on|ve)/g,"$1nformati$2"); str = str.replace(/(I|i)nfrastuctur(es?|al)/g,"$1nfrastructur$2"); str = str.replace(/(I|i)nheritenc(es?)/g,"$1nheritanc$2"); str = str.replace(/(I|i)nititiv(e|es)/g,"$1nitiativ$2"); str = str.replace(/(I|i)nseperabl(e|y)/g,"$1nseparabl$2"); str = str.replace(/(I|i)nsuf(?:icie|ficei?)n(t|tly|cy|cies)/g,"$1nsufficien$2"); str = str.replace(/(I|i)ntel[eil]gen(ces?|t|tly)/g,"$1ntelligen$2"); str = str.replace(/(I|i)nten[ts]ionaly/g,"$1ntentionally"); str = str.replace(/(I|i)nterchangab(l[ye])/g,"$1nterchangeab$2"); str = str.replace(/(I|i)ntres(ts?|ting|ted)/g,"$1nteres$2"); str = str.replace(/(I|i)nterfereing/g,"$1nterfering"); str = str.replace(/(I|i)nternatina(l|ls|lly)/g,"$1nternationa$2"); str = str.replace(/(I|i)nte(?:pre|rpere?)t(ations?|ive)/g,"$1nterpret$2"); str = str.replace(/(I|i)ntractible/g,"$1ntractable"); str = str.replace(/(I|i)nt[aeo]rduc(e[ds]?|ing|tions?|tory)/g,"$1ntroduc$2"); str = str.replace(/(I|i)nvente(rs?)/g,"$1nvento$2"); str = str.replace(/(I|i)nvinc(?:e[ia]|a)b(l[ey]|ility|leness)/g,"$1nvincib$2"); str = str.replace(/(I|i)nvolvment/g,"$1nvolvement"); break; case "j": str = str.replace(/(?:Janur|janu)ary/g,"January"); str = str.replace(/(J|j)ewl(|l)ery/g,"$1ewel$2ery"); str = str.replace(/july/g,"July"); str = str.replace(/(J|j)sut/g,"$1ust"); break; case "k": str = str.replace(/(K|k)idnape([dr]|rs)/g,"$1idnappe$2"); str = str.replace(/(K|k)in[dt]erga(?:t|rd)(ens?)/g,"$1indergart$2"); str = str.replace(/(K|k)nowlege(able)?/g,"$1nowledge$2"); break; case "l": str = str.replace(/(L|l)laque(rs?|red)/g,"$1acque$2"); str = str.replace(/(L|l)angau(ges?)/g,"$1angua$2"); str = str.replace(/(L|l)(?:igit[ai]?m[ai]|[ei]gita?m[ai]|[ei]git[ai]?mi)(te[sd]?|ting|tely|teness|cy|cies|tions?|tize[sd]?|tizing|tors?)/g,"$1egitima$2"); str = str.replace(/(L|l)en(?:ght|th)(|s)/g,"$1ength$2"); str = str.replace(/(L|l)enian(t|tly|c[ey])/g,"$1enien$2"); str = str.replace(/(L|l)eete(r[ed]?|s?|ing)/g, "$1ette$2"); str = str.replace(/(L|l)iaso(ns?)/g,"$1iaiso$2"); str = str.replace(/(L|l)isen(c|s)(e[sd]?|ing|ees?|ures?|ors?)/g,"$1icen$2$3"); str = str.replace(/(L|l)onely(ness|est|er)/g,"$1oneli$2"); str = str.replace(/(L|l)uckilly/g,"$1uckily"); break; case "m": str = str.replace(/(M|m)agnifican(t|tly|ce)/g,"$1agnificen$2"); str = str.replace(/(M|m)ai?nt(?:ia|ai)n(|ing)/g,"$1aintain$2"); str = str.replace(/(M|m)anag(ments?|abl[ey]|ableness|ability)/g,"$1anage$2"); str = str.replace(/(M|m)anueve(rs?|re[dr]|ring|rable|rability)/g,"$1aneuve$2"); str = str.replace(/(M|m)ane(?:ou|uo)ve(rs?|ring|red|rabl[ey]|rability)/g,"$1anoeuve$2"); str = str.replace(/(M|m)akr(e[rd]?|ing|s?)/g,"$1ark$2"); str = str.replace(/(M|m)asculinlity/g,"$1asculinity"); str = str.replace(/(M|m)asquarad(e[sdr]?|ing)/g,"$1asquerad$2"); str = str.replace(/(M|m)ayon(?:n?aiss|aiss?)(es?)/g,"$1ayonnais$2"); str = str.replace(/(M|m)esseg(e[rds]?|ing)/g,"$1essag$2"); str = str.replace(/(M|m)ede?i(|a)e?v[aei]l(|ism|ist)/g,"$1edi$2eval$3"); str = str.replace(/(M|m)editerrean[ei]an/g,"$1editerranean"); str = str.replace(/(M|m)emio(rs?|rists?)/g,"$1emoi$2"); str = str.replace(/(M|m)illitar(y|ies|ily|is[tm]s?|istic|i[sz]e[ds]?|i[sz]ing|i[sz]ation)/g,"$1ilitar$2"); str = str.replace(/(M|m)ilenni(um|a)/g,"$1illenni$2"); str = str.replace(/(M|m)illenia/g,"$1illennia"); str = str.replace(/(M|m)inatur(es?|ize[ds]?|ization|izing)/g,"$1iniatur$2"); str = str.replace(/(M|m)ischei(f|vous|vously|vousness)/g,"$1ischie$2"); str = str.replace(/(M|m)isch(?:ei?vi?|ievi)ou(s|sly|sness)/g,"$1ischievou$2"); str = str.replace(/(M|m)ispel(ls?|lings?|led)/g,"$1isspel$2"); str = str.replace(/(M|m)onest[ae]r(y|ies)/g,"$1onaster$2"); str = str.replace(/monday/g,"Monday"); str = str.replace(/(M|m)ulipl(e|es|y|ies|ied|ying|ication)/g,"$1ultipl$2"); str = str.replace(/(M|m)unipalit(y|ies)/g,"$1unicipalit$2"); str = str.replace(/(M|m)uscia(ls?|lly|lity)/g,"$1usica$2"); break; case "n": str = str.replace(/nad/g,"and"); str = str.replace(/Nad/g,"And"); str = str.replace(/(N|n)atur(?:el?|a|uru?al?)ly/g,"$1aturally"); str = str.replace(/(N|n)e(?:ss?|cc?)e(?:ss?|cc?)ar(y|ily)/g,"$1ecessar$2"); str = str.replace(/(N|n)ecc?ess?it(y|ies|ate[sd]?)/g,"$1ecessit$2"); str = str.replace(/(N|n)egociat(e[sd]?|ing|ions?|ors?)/g,"$1egotiat$2"); str = str.replace(/(N|n)eih?gbo(u?rs?|u?red|u?ring|u?rhoods?)/g,"$1eighbo$2"); str = str.replace(/(N|n)ickle(ic|ous|iferous|odeons?)/g,"$1ickel$2"); str = str.replace(/(N|n)inty/g,"$1inety"); str = str.replace(/(N|n)ineth/g,"$1inth"); str = str.replace(/(N|n)onsenc(e|ical)/g,"$1onsens$2"); str = str.replace(/(N|n)ormaly/g,"$1ormally"); str = str.replace(/norwegia(n|ns)/g,"Norwegia$1"); str = str.replace(/(N|n)oteab(les?|ility)/g,"$1otab$2"); str = str.replace(/(N|n)otic[ai]ble/g,"$1oticeable"); str = str.replace(/november/g,"November"); str = str.replace(/(N|n)owdays/g,"$1owadays"); str = str.replace(/(N|n)umberical/g,"$1umerical"); break; case "o": str = str.replace(/(O|o)bedian(t|tly|ce)/g,"$1bedien$2"); str = str.replace(/(O|o)bselet(ed?)/g,"$1bsolet$2"); str = str.replace(/(O|o)bviousuly/g,"$1bviously"); str = str.replace(/(O|o)cc?a(?:s[st]|t)io?(ns?|nal|ally|ned|ning)/g,"$1ccasio$2"); str = str.replace(/(O|o)ccasionaly/g,"$1ccasionally"); str = str.replace(/(O|o)ccupp(y|ie[sd]|ying)/g,"$1ccup$2"); str = str.replace(/(O|o)ccur(ed|ing|ences?|ent)/g,"$1ccurr$2"); str = str.replace(/(O|o)c(?:c?urr?a|cure)nc(es?|t)/g,"$1ccurrenc$2"); str = str.replace(/(O|o)ctohedr(ons?|al?|ally)/g,"$1ctahedr$2"); str = str.replace(/october/g,"October"); str = str.replace(/(O|o)uevr(e|es)/g,"$1euvr$2"); str = str.replace(/(O|o)f of/g,"$1f"); str = str.replace(/(O|o)v of/g,"$1f"); str = str.replace(/(O|o)ffica(l|lly)/g,"$1fficia$2"); str = str.replace(/(O|o)ffici?aly/g,"$1fficially"); str = str.replace(/(O|o)ft(|en)[- ]times/g,"$1ft$2times"); str = str.replace(/(O|o)mniou(s|sly)/g,"$1minou$2"); str = str.replace(/(O|o)mmitt?(ed|ing)/g,"$1mitt$2"); str = str.replace(/(O|o)nomatopeo?i(a|c|cally)/g,"$1nomatopoei$2"); str = str.replace(/(O|o)pp(?:r?o|ur)tuni(ty|ties|s[tm]s?|stic|stically)/g,"$1pportuni$2"); str = str.replace(/(O|o)pos(e[ds]?|ing|ites?|ition)/g,"$1ppos$2"); str = str.replace(/(O|o)rg(?:an|ini)zatio(ns?|nal)/g,"$1rganizatio$2"); str = str.replace(/(O|o)rginiz(e[ds]?|ing)/g,"$1rganiz$2"); str = str.replace(/(O|o)r(?:gi|ig)na(l|lly|te[sd]?|ting|tions?|tors?)/g,"$1rigina$2"); str = str.replace(/(O|o)rig[ie]naly/g,"$1riginally"); str = str.replace(/(O|o)ur's/g,"$1urs"); str = str.replace(/(O|o)utter(|most)/g,"$1uter$2"); str = str.replace(/(O|o)verriden/g,"$1verridden"); str = str.replace(/(O|o)verveiw(|s|ed|ing)/g,"$1verview$2"); str = str.replace(/(O|o|[Aa]ntio)xiden(ts?)/g,"$1xidan$2"); break; case "p": str = str.replace(/(P|p)arr?al(?:l?e|el|lel)l(s?|i[sz]e[ds]?|isms?|epipeds?|ograms?)/g,"$1arallel$2"); str = str.replace(/(P|p)arl[ai]i?men(ts?|tary|tarians?)/g,"$1arliamen$2"); str = str.replace(/(P|p)a(?:rticlu?|ticul)a(rs?|rly|rity|rities|ris[mt]||rize[sdr]?|te[sdr]?|ting|tion)/g,"$1articula$2"); str = str.replace(/(P|p)as[st]tim(es?)/g,"$1astim$2"); str = str.replace(/(P|p)atrol(ing|e[dr])/g,"$1atroll$2"); str = str.replace(/(P|p)eacefull/g,"$1eaceful"); str = str.replace(/(P|p)erjor[ai]tiv(es?|ly)/g,"$1ejorativ$2"); str = str.replace(/(P|p)eopel(s?)/g,"$1eople$2"); str = str.replace(/(P|p)erciev(e[ds]?|ing)/g,"$1erceiv$2"); str = str.replace(/(P|p)erform(?:en|n?a)(ces?)/g,"$1erforman$2"); str = str.replace(/(P|p)erimite(rs?)/g,"$1erimete$2"); str = str.replace(/(P|p)er[nm][ae][mn]an(ts?|ce|tly)/g,"$1ermanen$2"); str = str.replace(/(P|p)erserver[ae]n(ce|t|tly)/g,"$1erseveran$2"); str = str.replace(/(P|p)erserver(e[ds]?|ing)/g,"$1ersever$2"); str = str.replace(/(P|p)ersonaly/g,"$1ersonally"); str = str.replace(/(P|p)ursua(de[sd]?|ding|sion|sive|sively)/g,"$1ersua$2"); str = str.replace(/[Pp]hi(?:llipp|ll?ip)i(nes?|ans?)/g,"Philippi$1"); str = str.replace(/(P|p)hil(?:osa?|a?so)ph(ers?|ic|ical|ically|y|ies|i[sz]e[drs]?)/g,"$1hilosoph$2"); str = str.replace(/(P|p)eic(e[ds]?|ing|emeal|ework)/g,"$1iec$2"); str = str.replace(/(P|p)lay(?:right|write)(s?)/g,"$1laywright$2"); str = str.replace(/(P|p)lummet(ts?|ting|ted)/g,"$1lumme$2"); str = str.replace(/(P|p)opulati(ns?)/g,"$1opulatio$2"); str = str.replace(/(P|p)ortugee?u?se/g,"$1ortuguese"); str = str.replace(/(P|p)osititi?(ons?|oned|oning|ves?|vely)/g,"$1ositi$2"); str = str.replace(/(P|p)os+ese([ds])/g,"$1ossesse$2"); str = str.replace(/(P|p)os(?:es?|se)s(e[sd]|ing|ions?|ives?|ively|iveness|ors?)/g,"$1ossess$2"); str = str.replace(/(P|p)oss?iblit(y|ies)/g,"$1ossibilit$2"); str = str.replace(/(P|p)owerfull/g,"$1owerful"); str = str.replace(/(P|a)racticle/g,"$1ractical"); str = str.replace(/(P|p)referanc(e[ds]?|ing)/g,"$1referenc$2"); str = str.replace(/(P|p)reperat(ions?|or[ys]?|orily|ives?|ively)/g,"$1reparat$2"); str = str.replace(/(P|p)erogativ(e[sd]?)/g,"$1rerogativ$2"); str = str.replace(/(P|p)res(?:iti|te)g[ie]ou(s|sly)/g,"$1restigiou$2"); str = str.replace(/(P|p)reist(|s|ly|hood)/g,"$1riest$2"); str = str.replace(/(P|p)rimarly/g,"$1rimarily"); str = str.replace(/(P|p)riveleg(e[ds]?)/g,"$1rivileg$2"); str = str.replace(/(P|p)rocces?(s|se[ds]|sors?|sions?)/g,"$1roces$2"); str = str.replace(/(P|p)roclam(e[dsr]?|ing)/g,"$1roclaim$2"); str = str.replace(/(P|p)roff?i[stc]i[ea]n(t|cy)/g,"$1roficien$2"); str = str.replace(/(P|p)rominan(ces?|cy|t|tly)/g,"$1rominen$2"); str = str.replace(/(P|p)ronounciatio(ns?)/g,"$1ronunciatio$2"); str = str.replace(/(P|p)ropogand(a|is[tm]s?|istic|istically|ize[ds]?|izers?|izing)/g,"$1ropagand$2"); str = str.replace(/(P|p)rotaganis(ts?)/g,"$1rotagonis$2"); str = str.replace(/(P|p)rotie([nd]s?|nases?|noids?|nuria)/g,"$1rotei$2"); str = str.replace(/(P|p)hych(es?|ics?|edelics?|otics?|iatrics?|iatrists?|ology|ological|ologically|ologists?)/g,"$1sych$2"); break; case "q": str = str.replace(/(Q|q)uanit(y|ies)/g,"$1uantit$2"); str = str.replace(/(Q|q)uestionnab(le|ly|leness|ility)/g,"$1uestionab$2"); break; case "r": str = str.replace(/(R|r)ebb?eled/g,"$1ebelled"); str = str.replace(/(R|r)eceed(es?|ed|ing)/g,"$1eced$2"); str = str.replace(/(R|r)ece?iev(e[sdr]?|ers?|ing|ership|ables?)/g,"$1eceiv$2"); str = str.replace(/(R|r)ec(?:ie|ei)veing/g,"$1eceiving"); str = str.replace(/(R|r)ecipi(e|es)/g,"$1ecip$2"); str = str.replace(/(R|r)ecepien(ts?)/g,"$1ecipien$2"); str = str.replace(/(R|r)ec(?:c[ao]m?|o)men(ds?|ded|ding|dations?)/g,"$1ecommen$2"); str = str.replace(/(R|r)econ[cs]i(?:lli|l)atio(ns?)/g,"$1econciliatio$2"); str = str.replace(/(R|r)establis(h|he[ds]|hing|hment)/g,"$1eestablis$2"); str = str.replace(/(R|r)eferr?anc(e[ds]?|ing)/g,"$1eferenc$2"); str = str.replace(/(R|r)efer(ing|ed)/g,"$1eferr$2"); str = str.replace(/(R|r)eguardless/g,"$1egardless"); str = str.replace(/(R|r)eagio(ns?|nals?|nally)/g,"$1egio$2"); str = str.replace(/(R|r)egulary/g,"$1egularly"); str = str.replace(/(R|r)elas(e[ds]?|ing)/g,"$1eleas$2"); str = str.replace(/(R|r)el+even(ce|t)/g,"$1elevan$2"); str = str.replace(/(R|r)eliablity/g,"$1eliability"); str = str.replace(/(R|r)eamain(|s|ed|ing|ders?)/g,"$1emain$2"); str = str.replace(/(R|r)ememebe(rs?|red|ring)/g,"$1emembe$2"); str = str.replace(/(R|r)emember[ae]nc(e[sr]?|ers)/g,"$1emembranc$2"); str = str.replace(/(R|r)eknow(n|ned)/g,"$1enow$2"); str = str.replace(/(R|r)eprecussio(ns?)/g,"$1epercussio$2"); str = str.replace(/(R|r)ep[ei]toir(e|es)/g,"$1epertoir$2"); str = str.replace(/(R|r)epr[ae]man(ds?|ded|dings?)/g,"$1epriman$2"); str = str.replace(/(R|r)e[sc]in(ds?|ded|ding)/g,"$1escin$2"); str = str.replace(/(R|r)eserac(h|he[drs]|hing|hists?|hable)/g,"$1esearc$2"); str = str.replace(/(R|r)esembel(ing|ance)/g,"$1esembl$2"); str = str.replace(/(R|r)esisten(t|ces?)/g,"$1esistan$2"); str = str.replace(/(R|r)est[ae]u?rant(?:eu|e|ou)(rs?)/g,"$1estaurateu$2"); str = str.replace(/(R|r)est(?:aurau|[aeu]rau?|rau)n(ts?)/g,"$1estauran$2"); str = str.replace(/(R|r)es(?:sure|urru|ure)ct(|s|ed|ing|ions?|ionists?)/g,"$1esurrect$2"); str = str.replace(/(R|r)(?:yth[ie]?|hyth[ie])(m|mics?|mical|mically|mists?)/g,"$1hyth$2"); str = str.replace(/(R|r)edic+ulou(s|sly|sness)/g,"$1idiculou$2"); str = str.replace(/(R|r)oomat(es?)/g,"$1oommat$2"); str = str.replace(/(R|r)ud[ae]mentar(y|ily|iness)/g,"$1udimentar$2"); break; case "s": str = str.replace(/(S|s)abatog(e[sd]?|ing)/g,"$1abotag$2"); str = str.replace(/(S|s)acr[ae]l[ei]g(es?|ious)/g,"$1acrileg$2"); str = str.replace(/[Ss]aducc?e(es?|an|eism)/g,"Sadduce$1"); str = str.replace(/([Ss]ate|satu)rday/g,"Saturday"); str = str.replace(/scotland/g,"Scotland"); str = str.replace(/(S|s)eccessi(ons?|onal|onists?|onism)/g,"$1ecessi$2"); str = str.replace(/(S|s)ecreter(y|ies|ia[lt])/g,"$1ecretar$2"); str = str.replace(/(S|s)iez(e[ds]?|ing|ures?)/g,"$1eiz$2"); str = str.replace(/(S|s)entanc(e[sd]?|ings?|ers?)/g,"$1entenc$2"); str = str.replace(/(S|s)eperat(e[sd]?|ely|ions?|ing|is[mt]s?)/g,"$1eparat$2"); str = str.replace(/septe[nm]ber/g,"September"); str = str.replace(/(S|s)erriou(s|sly|sness)/g,"$1eriou$2"); str = str.replace(/(S|s)e(?:rvera|v[aei]r[ei]|v[ai]r[aei])l/g,"$1everal"); str = str.replace(/(S|s)everly/g,"$1everely"); str = str.replace(/(S|s)exualy/g,"$1exually"); str = str.replace(/(S|s)eig(e|es)/g,"$1ieg$2"); str = str.replace(/(S|s)illyness/g,"$1illiness"); str = str.replace(/(S|s)immila(r|rly|rity)/g,"$1imila$2"); str = str.replace(/(S|s)incerly/g,"$1incerely"); str = str.replace(/(S|s)oftwares/g,"$1oftware"); str = str.replace(/(S|s)oilde(rs?|ring)/g,"$1oldie$2"); str = str.replace(/(S|s)methign/g,"$1omething"); str = str.replace(/(S|s)mething/g,"$1omething"); str = str.replace(/(S|s)omthing/g,"$1omething"); str = str.replace(/(S|s)omehtign/g,"$1omething"); str = str.replace(/(S|s)omehting/g,"$1omething"); str = str.replace(/(S|s)ophmor(es?|ic|ically)/g,"$1ophomor$2"); str = str.replace(/(S|s)ovreig?(ns?|nty)/g,"$1overeig$2"); str = str.replace(/(S|s)parce(r|ly|ness)/g,"$1parse$2"); str = str.replace(/(S|s)pecif(cs?|city)/g,"$1pecifi$2"); str = str.replace(/(S|s)pecifica?ly/g,"$1pecifically"); str = str.replace(/(S|s)pritua(ls?|lity|lism)/g,"$1piritua$2"); str = str.replace(/(S|s)tablili(ty|ties|[sz]e[drs]?)/g,"$1tabili$2"); str = str.replace(/(S|s)taf/g,"$1taff"); str = str.replace(/(S|s)tatmen(ts?)/g,"$1tatemen$2"); str = str.replace(/(S|s)teri?otyp(e[sd]?|ing|ical|ically)/g,"$1tereotyp$2"); str = str.replace(/(S|s)tiffl(e[sd]?|ing)/g,"$1tifl$2"); str = str.replace(/(S|s)troy/g,"$1tory"); str = str.replace(/(S|s)tudnets/g,"$1tudents"); str = str.replace(/(S|s)ubordin?[ae]nt(e[sd]?|or|ive|ly|tion|ions)/g,"$1ubordinat$2"); str = str.replace(/(S|s)ubsid(?:a|i?e)r(y|ies)/g,"$1ubsidiar$2"); str = str.replace(/(S|s)ubterranian/g,"$1ubterranean"); str = str.replace(/(S|s)uc(?:cs|s|)e(ss|sses|eds?|eded|eding)/g,"$1ucce$2"); str = str.replace(/(S|s)ucc?s?ess?ful?(l|lly)/g,"$1uccessfu$2"); str = str.replace(/(S|s)uc+esi(ve|vely|ons?)/g,"$1uccessi$2"); str = str.replace(/(S|s)uffic(?:ei?|ia?)n(t|tly|cy|cies)/g,"$1ufficien$2"); str = str.replace(/(S|s)ugest(|s|ed|ing|ive|ively|iveness|ions?|ible|ibility)/g,"$1uggest$2"); str = str.replace(/sunday/g,"Sunday"); str = str.replace(/(S|s)uperintendan(ts?)/g,"$1uperintenden$2"); str = str.replace(/(S|s)uperced(e[ds]?|ing)/g,"$1upersed$2"); str = str.replace(/(S|s)urplant(|ed|ing|s)/g,"$1upplant$2"); str = str.replace(/(S|s)ur?pres(s|se[sd]|sing|sion|sive|sants?|sible|s[eo]rs?)/g,"$1uppres$2"); str = str.replace(/(S|s)u(?:pri[sz]|rpriz)(e[ds]?|ing|ingly)/g,"$1urpris$2"); str = str.replace(/(S|s)urrunder(|s|ed|ing)/g,"$1urrender$2"); str = str.replace(/(S|s)urr?e?petitious(|ly)?/g,"$1urreptitious$2"); str = str.replace(/(S|s)uroun(ds?|ded|dings?)/g,"$1urroun$2"); str = str.replace(/(S|s)urveill/g,"$1urveil"); str = str.replace(/(S|s)urveye(rs?)/g,"$1urveyo$2"); str = str.replace(/(S|s)ur?viv(?:io|e)(rs?)/g,"$1urvivo$2"); str = str.replace(/(S|s)uc?septi(ble|bility|bleness|ve|vity|veness)/g,"$1uscepti$2"); str = str.replace(/(S|s)wae([rt]s?|[rt]ing)/g,"$1wea$2"); str = str.replace(/(S|s)ynchoniz(e[drs]?|ations?|ing)/g,"$1ynchroniz$2"); str = str.replace(/(S|s)[yi]non[oa]mou(s|sly)/g,"$1ynonymou$2"); str = str.replace(/(S|s)[yi]phyl+[iu](s|tic)/g,"$1yphili$2"); str = str.replace(/(S|s)yrap/g,"$1yrup"); break; case "t": str = str.replace(/(T|t)kaing/g,"$1aking"); str = str.replace(/(T|t)allen(ts?|ted)/g,"$1alen$2"); str = str.replace(/(T|t)alekd/g,"$1alked"); str = str.replace(/(T|t)argett(ed|ing)/g,"$1arget$2"); str = str.replace(/(T|t)a(t|tt)ooes/g,"$1a$2oos"); str = str.replace(/(T|t)eached/g,"$1aught"); str = str.replace(/(T|t)axanom(y|ic)/g,"$1axonom$2"); str = str.replace(/(T|t)echnicaly/g,"$1echnically"); str = str.replace(/(T|t)echicia(ns?)/g,"$1echnicia$2"); str = str.replace(/(T|t)elevsio(ns?)/g,"$1elevisio$2"); str = str.replace(/(T|t)emp(?:a?r[ae]|ere?|)(te|tely|tures?|ments?|mental|mentally|nce)/g,"$1empera$2"); str = str.replace(/(T|t)endanc(y|ies)/g,"$1endenc$2"); str = str.replace(/(T|t)errestia(l|lly)/g,"$1errestria$2"); str = str.replace(/(T|t)errior(y|ies)/g,"$1erritor$2"); str = str.replace(/(T|t)erritoris(ts?|tic)/g,"$1erroris$2"); str = str.replace(/(T|t)h(n|t|w)a/g,"$1ha$2"); str = str.replace(/(T|t)aht/g,"$1hat"); str = str.replace(/Untha(ws?|wed|wing)/g,"Tha$1"); str = str.replace(/untha(ws?|wed|wing)/g,"tha$1"); str = str.replace(/(T|t)eh/g,"$1he"); str = str.replace(/(T|t)he the/g,"$1he"); str = str.replace(/(T|t)hge/g,"$1he"); str = str.replace(/(T|t)heri/g,"$1heir"); str = str.replace(/(T|t)hemselfs/g,"$1hemselves"); str = str.replace(/(T|t)hne/g,"$1hen"); str = str.replace(/(T|t)heese/g,"$1hese"); str = str.replace(/(T|t)hei(f|ves|very|ving)/g,"$1hie$2"); str = str.replace(/(T|t)h(?:ign|nig)(|s)/g,"$1hing$2"); str = str.replace(/(T|t)higsn/g,"$1hings"); str = str.replace(/(T|t)hi(?:kn|unk)(|s|ing)/g,"$1hink$2"); str = str.replace(/(T|t)hri(ds?|dly)/g,"$1hir$2"); str = str.replace(/(T|t)hsi/g,"$1his"); str = str.replace(/(T|t)hroughly/g,"$1horoughly"); str = str.replace(/(T|t)hsoe/g,"$1hose"); str = str.replace(/(T|t)hreee/g,"$1hree"); str = str.replace(/(T|t)hreshhol(ds?)/g,"$1hreshol$2"); str = str.replace(/(T|t)(?:[hr]ough|hrou[gh])out/g,"$1hroughout"); //str = str.replace(/(T|t)hroug/g,"$1hrough"); // there's a problem with this one. //str = str.replace(/(T|t)roug/g,"$1rough"); // there's a problem with this one. str = str.replace(/([Tt]hru|thur)sday/g,"Thursday"); str = str.replace(/(T|t)ightning/g,"$1ightening"); str = str.replace(/(T|t)imne/g,"$1ime"); str = str.replace(/(T|t)[ao]bb?acc?o/g,"$1obacco"); str = str.replace(/(T|t)odya/g,"$1oday"); str = str.replace(/(T|t)oleren(ces?|t|tly)/g,"$1oleran$2"); str = str.replace(/[Tt]olkein/g,"Tolkien"); str = str.replace(/(T|t)omatos/g,"$1omatoes"); str = str.replace(/(T|t)om(?:mor?|o)row/g,"$1omorrow"); str = str.replace(/(T|t)oung(e[ds]?|ing)/g,"$1ongu$2"); str = str.replace(/(T|t)ongiht/g,"$1onight"); str = str.replace(/(T|t)orpedos/g,"$1orpedoes"); str = str.replace(/(T|t)ou?r[an](ments?)/g,"$1ourna$2"); str = str.replace(/(T|t)owra(ds?)/g,"$1owar$2"); str = str.replace(/(T|t)raditionaly/g,"$1raditionally"); str = str.replace(/(T|t)rans?fe(red|ring)/g,"$1ransfer$2"); str = str.replace(/(T|t)ranfor(ms?|me[dr]|ming|mations?|mative)/g,"$1ransfor$2"); str = str.replace(/(T|t)ranslate(rs?)/g,"$1ranslato$2"); str = str.replace(/(T|t)ransmissable/g,"$1ransmissible"); str = str.replace(/(T|t)ransporation/g,"$1ransportation"); str = str.replace(/(T|t)reateme?n(ts?)/g,"$1reatmen$2"); str = str.replace(/(T|t)riology/g,"$1rilogy"); str = str.replace(/(T|t)ruely/g,"$1ruly"); str = str.replace(/(T|t)rustworthyness/g,"$1rustworthiness"); str = str.replace(/(T|t)uscon/g,"Tucson"); str = str.replace(/tuesday/g,"Tuesday"); str = str.replace(/(T|t)ypcia(l|lly)/g,"$1ypica$2"); str = str.replace(/(T|t)yrr?an(y|ical|ically|icalness|ous|ously|ize[sd]?)/g,"$1yrann$2"); break; case "u": str = str.replace(/(U|u)biquitiou(s|sly|sness)/g,"$1biquitou$2"); str = str.replace(/alterior/g,"ulterior"); str = str.replace(/(U|u)na(mi|ny)mou(s|sly)/g,"$1nanimou$3"); str = str.replace(/(U|u)ncertai?nity/g,"$1ncertainty"); str = str.replace(/(U|u)ncon(?:cious|science)/g,"$1nconscious"); str = str.replace(/(U|u)nconventia(l|lly)/g,"$1nconventiona$2"); str = str.replace(/(U|u)ndecideable/g,"$1ndecidable"); str = str.replace(/(U|u)ndertan(ds?|ding|dabl[ey])/g,"$1nderstan$2"); str = str.replace(/(U|u)nfor(?:etun[ai]|tuni)t(ely|es?)/g,"$1nfortunat$2"); str = str.replace(/(U|u)n[ia]latrea(l|lly)/g,"$1nilatera$2"); str = str.replace(/(U|u)ninterupted/g,"$1ninterrupted"); str = str.replace(/Very unique/g,"Unique"); str = str.replace(/very unique/g,"unique"); str = str.replace(/[Uu]nite[sd][sS]tates/g,"United States"); str = str.replace(/united states of america/g,"United States of America"); str = str.replace(/(U|u)n(?:ive(?:risi?|si)|viersi)t(y|ies)/g,"$1niversit$2"); str = str.replace(/(U|u)nmistakeabl(y|e)/g,"$1nmistakabl$2"); str = str.replace(/(U|u)n(?:n?e(?:ccess?|ces)|ecess)ar(y|ily)/g,"$1nnecessar$2"); str = str.replace(/(U|u)notice(d|able)/g,"$1nnotice$2"); str = str.replace(/(U|u)noffica(l|lly)/g,"$1nofficia$2"); str = str.replace(/(U|u)npla?esan(t|tly)/g,"$1npleasan$2"); str = str.replace(/(U|u)nrepenten(t|tly)/g,"$1nrepentan$2"); str = str.replace(/(U|u)nsubstanciated/g,"$1nsubstantiated"); str = str.replace(/(U|u)nsucc?esful?(l|lly)/g,"$1nsuccessfu$2"); str = str.replace(/(U|u)nsu(?:pri[sz]|rpriz)(ed|ing|ingly)/g,"$1nsurpris$2"); str = str.replace(/(U|u)n(?:itl|till)/g,"$1ntil"); str = str.replace(/(U|u)ntranslateable/g,"$1ntranslatable"); str = str.replace(/(U|u)nuseable/g,"$1nusable"); str = str.replace(/(U|u)nw(ei|ie)ldly/g,"$1nwieldy"); str = str.replace(/(U|u)ise/g,"$1se"); str = str.replace(/(U|u)sefull/g,"$1seful"); str = str.replace(/(U|u)sefuly/g,"$1sefully"); str = str.replace(/(U|u)seing/g,"$1sing"); str = str.replace(/(U|u)susal/g,"$1sual"); str = str.replace(/(U|u)s(al|ua)ly/g,"$1sually"); break; case "v": str = str.replace(/(V|v)accu(ms?|med)/g,"$1acuu$2"); str = str.replace(/(V|v)alue?ble/g,"$1aluable"); str = str.replace(/(V|v)arities/g,"$1arieties"); str = str.replace(/(V|v)egi?tabl(es?)/g,"$1egetabl$2"); str = str.replace(/(V|v)egeteria(ns?)/g,"$1egetaria$2"); str = str.replace(/(V|v)eng[ea]nce/g,"$1engeance"); str = str.replace(/(V|v)enemous/g,"$1enomous"); str = str.replace(/(V|v)era?ficatio(ns?)/g,"$1erificatio$2"); str = str.replace(/(V|v)eriso(ns?)/g,"$1ersio$2"); str = str.replace(/(V|v)(?:eyr|rey|yer|yre)/g,"$1ery"); str = str.replace(/(V|v)(?:a|in)cinit(y|ies)/g,"$1icinit$2"); str = str.replace(/(V|v)igilen(ce|t|tly|tes?)/g,"$1igilan$2"); str = str.replace(/(V|v)igourou(s|sness)/g,"$1igorou$2"); str = str.replace(/(V|v)ill[ai]f(y|ie[sd])/g,"$1ilif$2"); str = str.replace(/(V|v)illia(n[sy]?|nous|nously|nousness|ness)/g,"$1illai$2"); str = str.replace(/(V|v)isab(l[ey]|ility)/g,"$1isib$2"); str = str.replace(/(V|v)isting/g,"$1isiting"); str = str.replace(/(V|v)olcanoe/g,"$1olcano"); str = str.replace(/(V|v)ol[oe]ntary/g,"$1oluntary"); str = str.replace(/(V|v)olou?nteer(|ed|ing|s)/g,"$1olunteer$2"); str = str.replace(/(V|v)omitt(s|e[dr]|ing)?/g,"$1omit$2"); break; case "w": str = str.replace(/(W|w)aal/g,"$1all"); str = str.replace(/(W|w)(atn|hant|nat)(|s|ed|ing)/g,"$1ant$3"); str = str.replace(/(W|w)arren(ts?|ted|ting)/g,"$1arran$2"); str = str.replace(/(W|w)as'?nt/g,"$1asn't"); str = str.replace(/(W|w)epo(ns?|ry)/g,"$1eapo$2"); str = str.replace(/(W|w)eaponary/g,"$1eaponry"); str = str.replace(/[Ww]en(desd|dsd?|sd)a(ys?)/g,"Wednesda$1"); str = str.replace(/wednesda(ys?)/g,"Wednesda$1"); str = str.replace(/(W|w)hta/g,"$1hat"); str = str.replace(/(W|w)her[ae]bouts/g,"$1hereabouts"); str = str.replace(/(W|w)hihc/g,"$1hich"); str = str.replace(/[Ww]ikipeida/g,"Wikipedia"); str = str.replace(/(W|w)iull/g,"$1ill"); str = str.replace(/(W|w)iththe/g,"$1ith the"); str = str.replace(/(W|w)(itht|tit?h)/g,"$1ith"); str = str.replace(/(W|w)ith([oe])l(d|ding)/g,"$1ithh$2l$3"); str = str.replace(/(W|w)ithing/g,"$1ithin"); str = str.replace(/(W|w)o'nt/g,"$1on't"); str = str.replace(/(W|w)rok(|s|ed|ing)/g,"$1ork$2"); str = str.replace(/(W|w)orlwide/g,"$1orldwide"); str = str.replace(/(W|w)orthwil(e|eness)/g,"$1orthwhil$2"); str = str.replace(/(W|w)ould'?nt/g,"$1ouldn't"); str = str.replace(/(W|w)irt(ing|ten)/g,"$1rit$2"); str = str.replace(/(W|w)roet/g,"$1rote"); str = str.replace(/(W|w)[uü]rt(?:t?embu|embe)rg/g,"Württemberg"); break; case "x": break; case "y": str = str.replace(/(Y|y)atch/g,"$1acht"); str = str.replace(/(Y|y)a'll/g,"$1'all"); str = str.replace(/(Y|y)era/g,"$1ear"); str = str.replace(/(Y|y)(aers|easr|ersa)/g,"$1ears"); str = str.replace(/(Y|y)eil(ds?|ding|ded)/g,"$1iel$2"); str = str.replace(/(Y|y)(tou|uo)/g,"$1ou"); break; case "z": str = str.replace(/(Z|z)ee+(bras?)/g,"$1e$2"); break; default: } return str; }