A Generalized q-State Potts model built in FACTORIE