Description Usage Arguments Value Examples
Extract parts of speech or corresponding tokens from a
tag_pos
object. This is useful for extracting
part of speech based text features for modeling.
1 2 3 |
x |
A |
collapse |
logical. If |
... |
ignored. |
Returns a vector of strings or a list of pos/tokens.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(dplyr)
presidential_debates_2012_pos %>%
select_tags(c("NN", "NNP", "NNPS", "NNS")) %>%
as_pos()
presidential_debates_2012_pos %>%
select_tags(c("NN", "NNP", "NNPS", "NNS")) %>%
as_pos(collapse = FALSE)
presidential_debates_2012_pos %>%
select_tags(c("NN", "NNP", "NNPS", "NNS")) %>%
as_tokens()
presidential_debates_2012_pos %>%
select_tags(c("NN", "NNP", "NNPS", "NNS")) %>%
as_tokens(collapse = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.