Extract TextRank-ranked keywords from a single in-memory string with a
TextRank worker created by worker(). This is separate from keywords(),
which uses TF-IDF weighting.
Usage
textrank(code, jiebar, ..., format = c("vector", "data.frame", "legacy"))Arguments
- code
A character to analyze.
- jiebar
A
jieba_workerobject created withworker(type = "textrank").- ...
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 ajiebaR-style character vector with weights innames(). Default is"vector".