Description Usage Arguments Value References See Also Examples
pos
- Apply part of speech tagger to
transcript(s).
pos.by
- Apply part of speech tagger to
transcript(s) by zero or more grouping variable(s).
pos.tags
- Useful for interpreting the parts of
speech tags created by pos and pos.by.
1 2 3 4 5 6 7 8 |
text.var |
The text variable |
parallel |
logical. If TRUE attempts to run the function on multiple cores. Note that this may not mean a speed boost if you have one core or if the data set is smaller as the cluster takes time to create. |
na.omit |
logical. If TRUE missing values
( |
digits |
Integer; number of decimal places to round when printing. |
progress.bar |
logical. If TRUE attempts to provide a OS appropriate progress bar. If parallel is TRUE this argument is ignored. Note that setting this argument to TRUE may slow down the function. |
percent |
logical. If TRUE output given as percent. If FALSE the output is proportion. |
zero.replace |
Value to replace 0 values with. |
gc.rate |
An integer value. This is a necessary
argument because of a problem with the garbage collection
in the openNLP function that |
grouping.var |
The grouping variables. Default NULL generates one word list for all text. Also takes a single grouping variable or a list of 1 or more grouping variables. |
... |
Other argument supplied to |
type |
An optional character string giving the
output of the pos tags. This must be one of the strings
|
pos returns a list of 4:
text |
The original text |
POStagged |
The original words replaced with parts of speech in context. |
POSprop |
Dataframe of the proportion of parts of speech by row. |
POSfreq |
Dataframe of the frequency of parts of speech by row. |
POSrnp |
Dataframe of the frequency and proportions of parts of speech by row. |
percent |
The value of percent used for plotting purposes. |
zero.replace |
The value of zero.replace used for plotting purposes. |
pos.by returns a list of 6:
text |
The original text |
POStagged |
The original words replaced with parts of speech in context. |
POSprop |
Dataframe of the proportion of parts of speech by row. |
POSfreq |
Dataframe of the frequency of parts of speech by row. |
POSrnp |
Dataframe of the frequency and proportions of parts of speech by row. |
pos.by.prop |
Dataframe of the proportion of parts of speech by grouping variable. |
pos.by.freq |
Dataframe of the frequency of parts of speech by grouping variable. |
pos.by.rnp |
Dataframe of the frequency and proportions of parts of speech by grouping variable. |
percent |
The value of percent used for plotting purposes. |
zero.replace |
The value of zero.replace used for plotting purposes. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | posdat <- pos(DATA$state)
ltruncdf(posdat, 7, 4)
## str(posdat)
names(posdat)
posdat$text #original text
posdat$POStagged #words replaced with parts of speech
posdat$POSprop[, 1:8] #proportion of parts of speech by row
posdat$POSfreq #frequency of parts of speech by row
out1 <- pos(DATA$state, parallel = TRUE) # not always useful
ltruncdf(out1, 7, 4)
#use pos.tags to interpret part of speech tags used by pos & pos.by
pos.tags()[1:10, ]
pos.tags("matrix")[1:10, ]
pos.tags("dataframe")[1:10, ]
pos.tags("df")[1:10, ]
ltruncdf(pos.tags("all"), 3)
posbydat <- with(DATA, pos.by(state, sex))
names(posbydat)
ltruncdf(posbydat, 7, 4)
truncdf(posbydat$pos.by.prop, 4)
POSby <- with(DATA, pos.by(state, list(adult, sex)))
plot(POSby, values = TRUE, digits = 2)
#or more quickly - reuse the output from before
out2 <- with(DATA, pos.by(posbydat, list(adult, sex)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.