  Aim: We present new extraction and identification techniques for supernova
(SN) spectra developed within the Supernova Legacy Survey (SNLS) collaboration.
  Method: The new spectral extraction method takes full advantage of
photometric information from the Canada-France-Hawai telescope (CFHT) discovery
and reference images by tracing the exact position of the supernova and the
host signals on the spectrogram. When present, the host spatial profile is
measured on deep multi-band reference images and is used to model the host
contribution to the full (supernova + host) signal. The supernova is modelled
as a Gaussian function of width equal to the seeing. A chi-square minimisation
provides the flux of each component in each pixel of the 2D spectrogram. For a
host-supernova separation greater than <~ 1 pixel, the two components are
recovered separately and we do not use a spectral template in contrast to more
standard analyses. This new procedure permits a clean extraction of the
supernova separately from the host in about 70% of the 3rd year ESO/VLT spectra
of the SNLS. A new supernova identification method is also proposed. It uses
the SALT2 spectrophotometric template to combine the photometric and spectral
data. A galaxy template is allowed for spectra for which a separate extraction
of the supernova and the host was not possible.
  Result: These new techniques have been tested against more standard
extraction and identification procedures. They permit a secure type and
redshift determination in about 80% of cases. The present paper illustrates
their performances on a few sample spectra.
