Skip to contents

extract proper name and nouns from POS DF

Usage

filter_ppn(pos_df, POS = c("NOUN", "PROPN"))

Arguments

pos_df

a data.frame generated by spacyr::spacy_parse

POS

the POS to be extracted. Default: NOUN and PROPN

Examples

pos <- "Mary Jane was the first to dance with Robert" |> spacy_parse()
#> Error in spacy_parse("Mary Jane was the first to dance with Robert"): could not find function "spacy_parse"
pos |> filter_ppn()
#> Error in dplyr::mutate(DF, name = grepl(POS, pos)):  In argument: `name = grepl(POS, pos)`.
#> Caused by error:
#> ! `name` must be size 23 or 1, not 4.