Pattern recognition applied to vapour-phase infrared spectra