We prove large-deviation results for empirical measures, with respect to an
arbitrary g-measure on a subshift of finite type, by using an ergodic theo
rem for relative entropy we establish. Extending some results of Cajar on B
illingsley dimensions to g-measures, we relate the relative entropy to the
dimensions of saturated sets. This allows a dimensional interpretation of t
he large-deviation results and the study of the set of non-generic points w
hich are proved to be of full dimension.