Catch insensitive, inconsiderate writing. This is alex in R.
Whether your own or someone else’s writing, alex helps you find gender favouring, polarising, race related, religion inconsiderate, or other unequal phrasing.
Once on CRAN, install the package with:
install.packages("alexr")
library(alexr)
alex(<text>)
alex(file(<filename>))
If called without any arguments, alex()
checks all .md
, .Rmd
files
in the working directory.
Let's say example.md
looks like this:
The boogeyman wrote all changes to the master server. Thus, the slaves were read-only copies of master. But not to worry, he was a cripple.
Then
alex(file("example.md"))
yields
example.md
1:5-1:14 warning `boogeyman` may be insensitive, use `boogey` instead
1:42-1:48 warning `master` / `slaves` may be insensitive, use
`primary` / `replica` instead
2:52-2:54 warning `he` may be insensitive, use `they`, `it` instead
2:59-2:66 warning `cripple` may be insensitive, use
`person with a limp` instead
MIT © Titus Wormer, Gábor Csárdi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.