The vimos public extragalactic redshift survey (VIPERS): Spectral classification through principal component analysis