Like what Fairslator does? Want to have something similar in your own application? There's an API for that!
I am pleased to announce the launch of the Fairslator API today: a machine-readable interface which software developers can use to include Fairslator’s functionality in their own applications (that’s why “API” stands for “Application Programming Interface”).
The Fairslator API is a service on the web (technically: a REST API, if these acronyms mean anything to you) where you can submit a piece of text and, within a few milliseconds, get it back rewritten in a different gender or a different form of address. Fairslator’s website uses the very same API too – and now I am making it available to other developers who might want to use it to build something similar, or who simply need to rewrite some texts.
In the rest of this article I will summarize what the API does, in what kinds of scenarios it might be useful to you, and how to start using it.
The Fairslator API does two things: gender rewriting and form-of-address rewriting. But what exactly are those two things?
Let’s look at gender rewriting first. In many languages, words that refer to people by occupation – such as pilot, doctor, bus driver and student – come in gender pairs: there is one word for a male person having that occupation and another word for a female person having it. The Fairslator API can find them in a text and change one into the other. It does this in a way which keeps the text grammatically correct, so that any adjectives, determiners and co-referring pronouns are changed too.
Example (French: I am a good student.):
In addition to this, the Fairslator API can rewrite gender-specific texts into gender-neutral neoforms, which is handy when you’re referring to a mixed-gender group of people and want to avoid the male default.
Example (German: All visitors must register.):
The second thing the Fairslator API can do for you is form-of-address rewriting. While English only has one form of address – the second-person pronoun you – many other languages have several, depending on whether you’re talking to one person or many, and whether you’re addressing them formally or informally. The form of address you choose affects not only pronouns but also other words in the text such as verbs. The Fairslator API can rewrite texts from one form of address into another.
Example (German: Do you know where you are?):
You can do all of these things on Fairslator’s own website, of course. But if you need to have rewriting features integrated into something you’re building yourself, then you need the API. In what scenarios might that be the case?
In translation management systems. If you have a platform in your company where human users are post-editing machine translation, you can give them more control over how gender and forms of address are translated. Machine translation engines produce translations that are often biased in these things (for example tending to always translate doctor as male doctor) but the Fairslator API can help you to quickly and even “invisibly” rewrite those biased translations as needed.
In conversational machine translation. If you’re using machine translation to translate texts of a conversational nature – such as film subtitles, or a real-time chat – you probably know a great deal about the people involved: their genders, which level of formality is appropriate, and so on. You can use this information – along with the Fairslator API – to rewrite the machine translation output in real time as needed.
In personalized user interfaces. When an app or a website communicates with human users, you might want to customize the on-screen texts based on what you know about the people involved: whether they are male or female, whether they prefer to be addressed formally or informally, which other people the texts refer to, and so on. The Fairslator API can help you do these rewrites dynamically and in real time instead of having to manually hard-code every possible option beforehand.
I have decided to make the API available through RapidAPI, a popular marketplace where publishers and consumers of APIs meet one another. So, to start using the API, go to Fairslator’s listing on RapidAPI, sign up for an account there if you haven’t got one yet, and start exploring. You can sign up for the Basic plan which lets you make a certain number of API calls per day for free, or the Pro plan which allows you to use the API more extensively for an affordable fee.
I’ll be curious to hear what people are using the API for, so feel free to get in touch and tell me how the API is working out for you. I will always welcome constructive feedback and feature suggestions.
Finally, a house-keeping clarification. This API is work in progress and, at this point, supports a narrower range of languages than Fairslator’s website. Currently, the API can only rewrite texts in German and French, and translations from English into German and from English into French. More languages and language pairs will be added to the API later.