alexr
alexr copied to clipboard
R package to catch insensitive, inconsiderate writing
alexr
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.
Installation
Once on CRAN, install the package with:
install.packages("alexr")
Usage
library(alexr)
alex(<text>)
alex(file(<filename>))
If called without any arguments, alex() checks all .md, .Rmd files
in the working directory.
Example
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
License
MIT © Titus Wormer, Gábor Csárdi