Extracting the POS tags in R using
问题 In my dataset I am trying to create variables containing the number of nouns, verbs and adjectives, respectively for each observation. Using the openNLP package I have managed to get this far: s <- paste(c("Pierre Vinken, 61 years old, will join the board as a ", "nonexecutive director Nov. 29.\n", "Mr. Vinken is chairman of Elsevier N.V., ", "the Dutch publishing group."), collapse = "") s <- as.String(s) s sent_token_annotator <- Maxent_Sent_Token_Annotator() word_token_annotator <- Maxent