keywords: Keyword extraction

View source: R/keywords.R

keywordsR Documentation

Keyword extraction

Description

Keyword Extraction worker uses MixSegment model to cut word and uses TF-IDF algorithm to find the keywords. dict , hmm, idf, stop_word and topn should be provided when initializing jiebaR worker.

Usage

keywords(code, jiebar)

vector_keywords(code, jiebar)

Arguments

code

For keywords, a Chinese sentence or the path of a text file. For vector_keywords, a character vector of segmented words.

jiebar

jiebaR Worker.

Details

There is a symbol <= for this function.

Value

a vector of keywords with weight.

Author(s)

Qin Wenfeng

References

http://en.wikipedia.org/wiki/Tf-idf

See Also

<=.keywords worker

Examples

## Not run: 
### Keyword Extraction
keys = worker("keywords", topn = 1)
keys <= "words of fun"
## End(Not run)

jiebaR documentation built on April 4, 2025, 2:41 a.m.