A Flexible Strategy for Fitting Complex Log-Linear Models