keywords: Keyword extraction

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/keywords.R

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

1
2
3
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

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

jiebaR documentation built on Dec. 16, 2019, 1:19 a.m.