Learn R Programming

jiebaR (version 0.11)

keywords: 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.

Value

a vector of keywords with weight.

Details

There is a symbol <= for this function.

References

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

See Also

<=.keywords worker

Examples

Run this code
# NOT RUN {
### Keyword Extraction
keys = worker("keywords", topn = 1)
keys <= "words of fun"
# }

Run the code above in your browser using DataLab