Python code that learns when to replace ". " with ".  " and when not to.