Title: | Interacting with Roberts and Utych's (2019) Gendered Language Dictionary |
---|---|
Description: | Allows users to generate a gendered language score according to the gendered language dictionary in Roberts and Utych (2019) <doi:10.1177/1065912919874883>. |
Authors: | Damon Roberts [aut, cre] |
Maintainer: | Damon Roberts <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.0 |
Built: | 2025-03-12 03:28:56 UTC |
Source: | https://github.com/damoncharlesroberts/gencountr |
Each word in the dataset contains a rating by human coders. See details of dataset in the original paper.
dict
dict
A tibble with 701 rows and 15 columns:
The word to match
Part Of Speech
Mean score provided by all participants
Standard deviation of score provided by all participants
https://journals.sagepub.com/doi/10.1177/1065912919874883
Counts the number of masculine and feminine words in the document
gen_count(text)
gen_count(text)
text |
(string): A string object. |
Takes the number of words that are loosely categorized as Masculine, Feminine, or Neutral based on Roberts and Utych's (2019) definition. Feminine words had a score below 2.5, Neutral words had a score higher than 2.5 and lower than 5.5, Masculine words had a score higher than 5.5.
data.frame with each word from the dictionary matched with the text and its number of occurances.
text <- 'This person was a heroine due to their fighting during the war.' result_df <- genCountR::gen_count(text)
text <- 'This person was a heroine due to their fighting during the war.' result_df <- genCountR::gen_count(text)
Calculates the score of the supplied text string based on the Gendered Language Dictionary created by Roberts and Utych (2019).
gen_score(text)
gen_score(text)
text |
(string): A string object |
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.
list object with avg_score of the supplied text string, total_score of supplied text string, and data.frame of matches
text <- 'Hero. hero Heroine. heroine, Prison. Prisom.' result <- genCountR::gen_score(text) result$avg_score result$total_score result$df
text <- 'Hero. hero Heroine. heroine, Prison. Prisom.' result <- genCountR::gen_score(text) result$avg_score result$total_score result$df
Cleans the supplied text string and converts it into a list of individual words.
text_clean(text)
text_clean(text)
text |
(string): A string object. |
Takes the string, converts all the characters to lower case, removes punctuation, and splits the string into individual words.
list of each word in all lower case and without punctuation.
Count number of times a particular word from the dictionary shows up in a document.
word_count(word_item)
word_count(word_item)
word_item |
(vector or array): A vector or array of words from the text wanting to be matched to dictionary. |
Takes the number of words that are loosely categorized as Masculine, Feminine, or Neutral based on Roberts and Utych's (2019) definition. Feminine words had a score below 2.5, Neutral words had a score higher than 2.5 and lower than 5.5, Masculine words had a score higher than 5.5.
data.frame object of with count of masculine, feminine, and masculine words.