Text this: An online learning method for assessing smart grid stability under dynamic perturbations