1

There's a way to create random consistent addresses with Faker? https://github.com/DiUS/java-faker I need a street which belongs to a city and a city which belongs to a county and procince. I also tried new Faker(new Locale(en-US)) but addresses aren't consistent.

I also found the Faker from arakelian, but it generates only addresses from San Fransisco. https://github.com/arakelian/faker/commits/master

MrKnorke
  • 163
  • 1
  • 1
  • 10
  • What is your code issue? You mention that the first approach is not good because it is not consistent. Could you be more specific? – pastaleg Mar 19 '20 at 13:46
  • If u generate address-data with faker, you'll get get a street which does not belong to the given city and the postal-code does not belong to this city too. I need to generate realistic addresses. And generated data from the second Faker generates only addresses for SF which are to similar. – MrKnorke Mar 19 '20 at 14:02
  • 1
    Sounds like the problem is that faker generates the components of the address independently, when in reality there's a joint distribution that constrains county given province, city given county, street given city, and address range given street. You would need to derive (or find tables of) each of those conditional probabilities. – pjs Mar 19 '20 at 14:33

0 Answers0