View Single Post
Old 12-17-2017, 12:38 AM   #9
Steadyhands
Connoisseur
Steadyhands began at the beginning.
 
Steadyhands's Avatar
 
Posts: 57
Karma: 10
Join Date: Dec 2011
Device: Samsung Tablet
I use this to fix words that have been shortened.

Quote:
[ ]?‘(?i)(\d\d|ad[nta]{0,2}|app[yines]{0,5}|appen[eds]{0,2}|alf|ard[er]{0,2}|arf|arm|alf|ang[edingman]{0,3}|andsome|andle[ding]{0,3}|av[eing]{0,4}|bout|bye|cause|cept[ing]{0,3}|copter[s]{0,1}|cos|cross|cuz|course|d|e[emr]{0,1}|ea[singd]{1,4}|eartie[s]{0,1}|ell|elp[edling]{0,5}|ere[abouts]{0,6}|er[self]{0,4}|eard|f|fraid|fore|ford|isself|id|igh[er]{0,2}|ighness|im[self]{0,5}|gain[st]{0,2}|kay|less|lectric|mongst|member|n|nd|night|ne ath|nough|nother|nuff|o[o]{0,1}|old|ood|ome|ow|op[eding]{0,3}|ole|ot|oney|orse[flesh]{0,5}|ouse[ds]{0,1}|pon|puter[eds]{0,2}|prentice|r|round|s|scuse[ds]{0,1}|spect[sed]{0,2}|scaped|sides|splain[eding]{0,3}|special[ly]{0,2}(?!\’)|splosion|stead|t|taint|til|tis[n]{0,1}|twas[n]{0,1}|tween|twere[n]{0,1}|twon|twou[ldn]{1,3}|twill|ud|un|undred|urt[s]{0,1}|vise|way)([\p{P}|\s])
Replace with

Quote:
’\1\2
It can be a little too greedy at times and get words you don't want, usually with shortened words that are a word themselves i.e. member could be either remember shortened to ’member or just member. What the original was makes a difference. I've tried to make it as universal as possible, i.e. appen[eds]{0,2} will do ’appen, ’appened, ’appens.

Open to suggestions also.
Steadyhands is offline   Reply With Quote