segmentCN: Sengment Chinese text.

Description Usage Arguments Value Author(s) Examples

View source: R/segmentCN.R

Description

A function to segment Chinese text into words.

Usage

1
2
3
segmentCN(strwords, analyzer = c("default", "hmm", "jiebaR", "fmm",
  "coreNLP"), nature = FALSE, nosymbol = TRUE,
  returnType = c("vector", "tm"), ...)

Arguments

strwords

A charactor vector of Chinese sentence.

analyzer

One of 'default', 'jiebaR', 'hmm', 'fmm' and 'coreNLP'. Default is 'hmm'.

nature

Whether to recognise the nature of the words.

nosymbol

Whether to keep symbols in the sentence. Default is TRUE, means no symbols kept.

returnType

Default is a string vector but we also can choose 'tm' to output a single string separated by space so that it can be used by Corpus directly.

...

Other arguments.

Value

a vector of words (list if input is vecter) which have been segmented.

Author(s)

Jian Li <rweibo@sina.com>

Examples

1
segmentCN("hello world!")

Rwordseg documentation built on Aug. 23, 2019, 9:03 a.m.

Related to segmentCN in Rwordseg...