JavaScript library that converts a string to gender-neutral language?
2 by butler952 | 6 comments on Hacker News.
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!

Post a Comment

Previous Post Next Post