View Single Post
Old 05-10-2012, 03:55 AM   #5
SBT
Fanatic
SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.
 
SBT's Avatar
 
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
Just a thought:
Since most of the errors are 'll' -> 'l ', what about putting all double-l words in a loop, someting like (Sorry, don't know PHP):
Code:
for word in [actually, hallucinate, tellige, ...]
   pattern=replace(word, 'll', 'l\s')
   replace(all_text,pattern,word)
next
To find all instances of possibly missing l's, you can try
Code:
grep -o "[^ ]\+[^l ]l [a-z][^ ]*" text_file
Ahh... sufficiently advanced regexp is indistiguishable from keyboard white noise :-)
SBT is offline   Reply With Quote