Text Processing #1: Hyphenation
Retina, 88 bytes

+is`(?&lt;![a-z~])([a-z~]+)(?=([a-z]+)+[^a-z~].*(?&lt;=[\n,]\1(?(2)!)(?&lt;-2&gt;~\2)+[\n,]))
$1~
\n.*
&lt;empty&gt;


For counting purposes, each line goes into a separate file, \n are replaced with actual newline characters and &lt;empty&gt; is an empty file. For convenience, you can run the above code from a single file (where &lt;empty&gt; is an empty line) if you use the -s interpreter flag.