_~ ~_ fiveFormostthefrequently _male − female_ occurringdimension,in our corpus.we usedWordsvariousforgender-specific _career~ − family~_ wordsandwhich _good~_ were _− bad_<sup>_~_</sup> foundwereoutchosento beinthea similar fashion. Only five words were chosen for each because, given the relatively small size of the corpus, the inclusion of too many words could result in invalid measures of slant. The word used are displayed in table A2.

Table A2: Words used for each vector dimension

|Vector dimension<br>|Words|
|---|---|
|_~_<br>_MaleNames_<br>|john, joseph, peter, james, david|
|_~_<br>_FemaleNames_<br>_~_|faith, mary, rose, jane, margaret|
|_Male_<br>|his, he, him, mr, himself|
|_~_<br>_Female_<br>|her, she, ms, mrs, herself|
|_~_<br>_Good_<br>|competent, strong, power, serious, professional|
|_~_<br>_Bad_<br>|frivolous, vain, incompetent, unreasonable, incapable|
|_~_<br>_Career_<br>|company, service, pay, business, work|
|_~_<br>_Family_|family, wife, mother, father, brother|

Each dimensions includes the five most common relevant words in the corpus. Only five words were chosen for each because, given the relatively small size of the corpus, the inclusion of too many words could results in invalid measures of slant.

To apply this process to the data, we first preprocessed the entire Kenya Law corpus of judgements by removing punctuations (but retaining hyphenated words). To avoid case sensitivity, we transformed all our words to lower case. We then retained only the most common 50,000 words in all judicial opinions. To obtain judge-specific gender slant measures, we took the set of majority opinions authored by each judge as a separate corpus and trained separate GloVe embeddings on each judge’s corpus. To ensure convergence, we trained vectors for 20 iterations with a learning rate of 0.05.

Since each judge might not have a sufficiently large number of tokens, we follow the approach suggested by Antoniak and Mimno (2018) and train embedding models on 25 bootstrap samples of each judge corpus. Specifically, we consider each sentence written by a judge as a document and then create a corpus by sampling with replacement from all sentences. The number of sentences contained in the bootstrapped sample is the same as the total number of sentences in the original judge corpus. We then calculate our slant measure for all bootstrap samples and assign to each judge the median value of the measure across the samples. Given that embeddings trained on small corpora tend to be sensitive to the inclusion of specific documents, the bootstrap procedure produces more stable results. In addition, bootstrapping ensures stability with respect to the initialization of the word vectors–a potential concern given that GloVe presents a non-convex objective function (Spirling and Rodriguez 2019). The two variables resulting from this process are _Median slant, career vs. family_ and _Median slant, good vs. bad_ . For both measures, positive values indicate greater slant against women.

To validate that the embeddings capture meaningful information about gender, after following the bootstrapping procedure, we compute the cosine similarity between the gender dimension and each of the vectors representing the five most common male and female names for each judge and bootstrap sample. We then regress a dummy for whether the name is male on the median cosine similarity between the vector representing the name and the gender dimension across bootstrap samples, separately for each judge. Figure A1 shows the cumulative distribution of the t-statistics resulting from these regressions for sets of judges with different numbers of tokens. It shows that most t-statistics are significant (and they are never lower than zero). This shows that the gender dimension identified in the embeddings does indeed contain meaningful gender information.

# **Constructing other textual variables**

To create the measure of the number of cases cited in the text, we extracted a window of 10 words (5 on each side) around the words v, vs, and ndashvs (because sometimes HTML elements from the website are included in the text), which were found to be a common way of citing other judgements. This window of 10 words was then cleaned to produce the final cited judgements. A similar process was used to cite the 31