Faker Python generating chinese/pinyin names
Question:
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 :
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 ??
Answers:
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…
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 :
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 ??
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…