Is there a tool/ library/ algorithm that can learn from the steps I perform in cleaning text and apply them to similar data?
Trifacta (https://www.trifacta.com/) supposedly can do that (learn from some examples provided by the user. I have no interest in the company, but it comes from academic research that I'm familiar with (http://vis.stanford.edu/wrangler/). Google had something free online (Google Refine) that can also do some intuitive things very simply, but I don't think it's as well developed.
If you try either product, please let us know about your experience!