gen_score {genCountR} | R Documentation |
gen_score
Description
Calculates the score of the supplied text string based on the Gendered Language Dictionary created by Roberts and Utych (2019).
Usage
gen_score(text)
Arguments
text |
(string): A string object |
Details
Takes the matched words and their occurrence in the supplied text, finds the score for those matched words in the dictionary, sums those scores up and then divides it by the total number of words in the dictionary.
Value
list object with avg_score of the supplied text string, total_score of supplied text string, and data.frame of matches
Examples
text <- 'Hero. hero Heroine. heroine, Prison. Prisom.'
result <- genCountR::gen_score(text)
result$avg_score
result$total_score
result$df
[Package genCountR version 1.0.0 Index]