For Name (Person) generate gender according the random first name
Hello
Is possible to consider generate the gender according the generated first name?
The following is incorrect (ignore the last name part):
- Maria, Perez, male
- Tony, Fernandez, female
- John, Wilson, female
- Robert, Long, female
- Alison, Waters, male
Should be:
- Maria, Perez, female
- Tony, Fernandez, male
- John, Wilson, male
- Robert, Long, male
- Alison, Waters, female
Thanks for the understanding
Pretty nice this library so far!
This will be a nice addition to have.
similar to the change around cities and countries.. this is a non trivial change... I don't see this being added anytime soon..
Hi @codingricky, I would like to help implement this feature and wanted to ask if you have any design suggestions on how this issue should be tackled. Thanks in advance.
Sorry for the delay but I feel there's only 2 options.
- Use a 3rd party library/web service/api to determine the gender given a name.. so fetch a random name, ask for the gender of that name, if that's not right, then try again. I think there are significant negatives to introducing a dependency on a 3rd party web service
- Tag all the names with a gender, too much manual work I feel for this option
Not sure that either options are really that feasible unfortunately.
@haruntuncay
2. Tag all the names with a gender, too much manual work I feel for this option
I also thought that this seems like the only option based on the current structure. Maybe we could generate a python script that uses 3rd party services via http to determine whether a name is male/female name and re-structure the yaml file automatically. This would help us avoid adding a dependency to the project and keep trying until it is right, as the first option describes.
Of course, we would have to generate separate scripts for country/address issue and this one (person/gender) and any other issues that will arise in the future that requests a similar merge option. Unless we find a better way to merge providers, generating scripts to automate the process seems like an approachable solution for now. What do you think @codingricky ?
Hello
Tag all the names with a gender, too much manual work I feel for this option
I think it is the right path (even when at a first glance is verbose - it is), because it can be applied in some way for Country to City correct generation, and cellphone/phone correct random generation according a city (size of numbers and how they should start).
The point is implement this smoothly how a main factory to be applied for other extensions. Thus the .yml files would work in pairs.
Something like:
Person: Karla Cano, Claudia Canepa, Juan Ramirez [name and last name]
PersonWithSex: Karla Cano | Female, Claudia Canepa | Female, Juan Ramirez | Male
Here comes the concept of Tuple
Just sharing ideas ...
Hi, has there been any progress on this feature? If not, I'd like to work on this.
I think the way to solve this is to generate femaleName and maleName. It's even a bit more complicated for czech language where the last name is also gender specific. And in name.yml there is a separation of names female_first_name and male_first_name In case we would add female_last_name and male_last_name we would be set for all options and random gender generation would be a piece of cake.
I have implemented a simple function to generate name with gender like the examples you mentioned. (Maria Perez, female) (Tony, Fernandez, male) --SE_SUSTech, group: Lanrand