Entity reference generator.