The spectroscopic evolution of V5584 Sgr (Nova Sgr 2009 No. 4)