inst/doc/Quick_Start_Guide.R

## ------------------------------------------------------------------------
library(jiebaR)

##  Using default settings to initialize a worker.
cutter = worker()

###  Note: Can not display Chinese characters here.

segment( "This is a good day!" , cutter )

## OR cutter["This is a good day!"]


## ------------------------------------------------------------------------
segment( "./temp.dat" , cutter ) ### Auto encoding detection.

## ------------------------------------------------------------------------
cutter$encoding
cutter$detect
cutter$detect = F
cutter$detect

## ------------------------------------------------------------------------
show_dictpath() ### Show path
?edit_dict()   ### For more information

## ------------------------------------------------------------------------
words = "hello world"
tagger = worker("tag")
tagger[words]

## ------------------------------------------------------------------------
keys = worker("keywords", topn = 1)
keys <= "words of fun"

## ------------------------------------------------------------------------
 words = "hello world"
 simhasher = worker("simhash",topn=1)
 simhasher[words]

## ------------------------------------------------------------------------
distance("hello world" , "hello world!" , simhasher)

Try the jiebaR package in your browser

Any scripts or data that you put into this service are public.

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