  We introduce the notion of a semi-Riemannian spectral triple which
generalizes the notion of spectral triple and allows for a treatment of
semi-Riemannian manifolds within a noncommutative setting. It turns out that
the relevant spaces in noncommutative semi-Riemannian geometry are not Hilbert
spaces any more but Krein spaces, and Dirac operators are Krein-selfadjoint. We
show that the noncommutative tori can be endowed with a semi-Riemannian
structure in this way. For the noncommutative tori as well as for
semi-Riemannian spin manifolds the dimension, the signature of the metric, and
the integral of a function can be recovered from the spectral data.
