Text this: Machine learning methods for large deviations