genderizeR (version 1.0.0)

genderize: Predicting gender for character strings.

Description

For a each character string genderize use output of the findGivenNames function for the strings and returns a gender prediction for the whole character string based on first names located inside strings.

Usage

genderize(x, genderDB = givenNames, blacklist = NULL, progress = TRUE)

Arguments

x
A vector of text strings.
genderDB
A data.table output of findGivenNames function for the same vector x.
blacklist
Some terms could be exlude from gender checking
progress
If TRUE (default) progress bar is displayed in the console

Value

  • A data table with text strings, a term that is used to predict gender found in genderDB, a predicted gender and number of genderIndicator (1 if only one term is found in genderDB).

Examples

Run this code
x = c("Winston J. Durant, ASHP past president, dies at 84",
"Gold Badge of Honour of the DGAI Prof. Dr. med. Norbert R. Roewer Wuerzburg",
"The contribution of professor Yu.S. Martynov (1921-2008) to Russian neurology",
"JAN BASZKIEWICZ (3 JANUARY 1930 - 27 JANUARY 2011) IN MEMORIAM",
"Maria Sklodowska-Curie")

givenNames = findGivenNames(x)
givenNames = givenNames[count>40]
genderize(x, genderDB=givenNames, blacklist=NULL)

Run the code above in your browser using DataCamp Workspace