6

I am trying to generate random chinese names using Faker (Python), but it generates the names in chinese characters instead of pinyin.

I found this : enter image description here

and it show that it generates them in pinyin, while when I try the same code, it gives me only chinese characters.

how to get the pinyin ??

Dan Bonachea
  • 2,408
  • 5
  • 16
  • 31
Armonia
  • 77
  • 5

1 Answers1

4

fake.romanized_name() worked for me.

I got lucky by looking through dir(fake). Doesn't seem to have a method for pinyin address that I can see...

11574713
  • 758
  • 1
  • 4
  • 8