get_part_of_speech: This function generates statistics about the proportions of...

Description Usage Arguments Value Examples

View source: R/part_of_speech.R

Description

This function generates statistics about the proportions of following parts of speech in the given column: - verbs - prepositions - adjectives - nouns - articles - etc.

Usage

1
2
get_part_of_speech(df_col,
  model_path = "./data/english-ewt-ud-2.4-190531.udpipe")

Arguments

df_col

a list of values in data.frame column with textual data

model_path

a string containing the path to the pretrained POS model. if provided, the function will look at it there, otherwise, the default place is considered to be data/ folder. If the model doesn't exist, it will be downloaded.

Value

data.frame with one row containing columns verbs, prepositions, adjectives, nouns and articles.

Examples

1
2
ex <- data.frame(text_col =  c('Today is a beautiful Monday'))
get_part_of_speech(ex$text_col)

UBC-MDS/nlpsummarizer documentation built on April 2, 2020, 3:59 a.m.