Relative entropy, dimensions and large deviations for g-measures