Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fake names based on ethnicity #1974

Open
avishwa23 opened this issue Jan 16, 2024 · 5 comments
Open

Fake names based on ethnicity #1974

avishwa23 opened this issue Jan 16, 2024 · 5 comments
Labels

Comments

@avishwa23
Copy link

  • Faker version:
  • OS: Ubuntu 22.04 LTS

Brief summary of the issue goes here.

I am performing bias evaluation tests for my LLM (language models). While I was able to perform gender bias tests by generating fake male/female data using Faker, I couldnt find a way to generate names based on ethnicity (asian, white, black, etc) to perform ethnicity-based bias tests. Is there a way in Faker to do this?

@fcurella
Copy link
Collaborator

There currently is any way to do this, and TBH I don't think we should add such a feature. But you're free to implement your own provider from your own data.

@antik-x
Copy link
Contributor

antik-x commented Jan 19, 2024

so?

def test_random_elements():
    from collections import OrderedDict
    faker = Faker(["zh-CN"])
    items = OrderedDict([("亚洲人", 0.25), ("非洲人", 0.25), ("欧洲人", 0.25), ("美洲人", 0.25)])
    print(faker.random_elements(items)[0])

@thijstriemstra
Copy link
Contributor

thijstriemstra commented Jan 31, 2024

Interesting question and answer. Looks like you made a typo and meant "There currently isn't any way to do this" @fcurella? In the current AI day and age it's inevitable people will implement this (whether we like it or not).

It's all Fake(r) anyway!

@fcurella
Copy link
Collaborator

fcurella commented Feb 1, 2024 via email

Copy link

github-actions bot commented May 3, 2024

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants