Entanglement spectrum in one-dimensional systems