1
0 Comments

Is there a javascript library that converts a string to gender-neutral language?

I'm working on a project that anonymises resumes to reduce bias and discrimination of things like location, gender and age.

One of the options I'd like to provide is the ability to ensure that the content is gender-neutral to avoid bias.

For example, a summary that includes the text: "She is an esteemed archaeologist and writer based in Greece. Her primary residence is in Athens, but she spends much of her time in Marrakech."

Should be converted to: "They are an esteemed archaeologist and writer based in Greece. Their primary residence is in Athens, but they spend much of their time in Marrakech."

I started by just creating a function with a bunch of .replaceAll() statements, but quickly realised that changing from "he"/"she" to "they" changes pretty much every verb that follows the word (e.g. he runs > they run, she does > they do, etc...).

Just wandering if anyone has heard of a library to tackle this or has any other ideas on how to tackle the task.

Thanks!

on December 29, 2022
Trending on Indie Hackers
I built a tool that shows what a contract could cost you before signing User Avatar 111 comments The coordination tax: six years watching a one-day feature take four months User Avatar 73 comments My users are making my product better without knowing it. Here's how I designed that. User Avatar 63 comments A simple LinkedIn prospecting trick that improved our lead quality User Avatar 52 comments I changed AIagent2 from dashboard-first to chat-first. Does this feel clearer? User Avatar 39 comments Why I built a SaaS for online front-end projects that need more than a playground User Avatar 17 comments