Text this: Mapping the Universe: classifying galaxies and quasars through essential spectral features with machine learning