faker icon indicating copy to clipboard operation
faker copied to clipboard

Fake names based on ethnicity

Open avishwa23 opened this issue 1 year ago • 5 comments

  • 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?

avishwa23 avatar Jan 16 '24 00:01 avishwa23

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.

fcurella avatar Jan 16 '24 21:01 fcurella

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])

antik-x avatar Jan 19 '24 10:01 antik-x

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!

thijstriemstra avatar Jan 31 '24 23:01 thijstriemstra

Beside the fact that it would be considered borderline racist in some cultures, where would you even get the data?

I think this would be better served by implementing your own provider.

On Wed, Jan 31, 2024 at 5:15 PM Thijs Triemstra @.***> wrote:

Interesting question and answer. Looks like you made a typo and meant "There currently isn't any way to do this" @fcurella https://github.com/fcurella?

— Reply to this email directly, view it on GitHub https://github.com/joke2k/faker/issues/1974#issuecomment-1920153009, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAV4B2WIKEQDIX337NCWKTYRLGC3AVCNFSM6AAAAABB3724N2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRQGE2TGMBQHE . You are receiving this because you were mentioned.Message ID: @.***>

fcurella avatar Feb 01 '24 14:02 fcurella

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

github-actions[bot] avatar May 03 '24 01:05 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 18 '24 01:05 github-actions[bot]