gen_score

To find an overall score of the “genderedness” of some text, you can use the genCountR::gen_score() function. This function takes the count of words that match with those in the dictionary, sum up the scores of all of those matched occurrences and then calculates the average “document” score by dividing by the number of words passed in the string (“document”).

It also returns more information than the average score. It will return a list object including the average score (avg_score), but also the total score total_score for the document before normalized based on the length of text, but also the data.frame (df) that reports which words were matched, how often they occurred, the score, and the total score provided by each word.

# Load the package
library(genCountR)

# Pass a string to be analyzed
str <- "This person was a hero. They were a prisoner of war and I, as President, got them out."

# Use the gen_count() function on the str
gen_score(str)
#> $avg_score
#> [1] 0.6048951
#> 
#> $total_score
#> [1] 10.88811
#> 
#> $df
#>       word count   mean.a total_score
#> 1     hero     1 5.615385    5.615385
#> 2 prisoner     1 5.272727    5.272727