Flexible Models for with Application to Entity Resolution