Extract TF-IDF keywords from a single in-memory string with a keyword worker
created by worker(). This is separate from textrank(), which uses
TextRank weighting.
Usage
keywords(code, jiebar, ..., format = c("vector", "data.frame", "legacy"))Arguments
- code
A character to analyze.
- jiebar
A
jieba_workerobject created withworker(type = "keywords").- ...
Must be empty. This enforces that optional arguments such as
formatare supplied with explicit names.- format
Output format.
"vector"returns a named numeric vector,"data.frame"returns a data frame withtermandweightcolumns, and"legacy"returns the oldjiebaRstyle character vector with weights innames(). Default is"vector".