Learn R Programming

genCountR (version 1.0.0)

gen_score: 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)

Value

list object with avg_score of the supplied text string, total_score of supplied text string, and data.frame of matches

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.

Examples

Run this code
text <- 'Hero. hero Heroine. heroine, Prison. Prisom.'
result <- genCountR::gen_score(text)
result$avg_score
result$total_score
result$df

Run the code above in your browser using DataLab