Spectral function of finite nuclei and scattering of GeV electrons