Learn R Programming

genCountR (version 1.0.0)

gen_count: gen_count

Description

Counts the number of masculine and feminine words in the document

Usage

gen_count(text)

Value

data.frame with each word from the dictionary matched with the text and its number of occurances.

Arguments

text

(string): A string object.

Details

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.

Examples

Run this code
text <- 'This person was a heroine due to their fighting during the war.'
result_df <- genCountR::gen_count(text)

Run the code above in your browser using DataLab