Text this: Automatic spectral classification