| import_cidian | R Documentation |
Parse a supported Chinese input-method dictionary with the Rust cidian
parser and add all parsed words to an existing jieba_worker. The file
extension selects the parser automatically. Supported formats are .scel,
.qcel, .qpyd, .bdict, and .bcd.
import_cidian(worker, path, ..., tag = NULL)
worker |
A |
path |
A path to a supported input-method dictionary file. |
... |
Must be empty. This enforces that the optional |
tag |
An optional single non-empty character string assigned to every
imported word. |
The source dictionary's coding and weight fields are ignored. Imported words
are added without an explicit frequency, so jieba-rs infers each
frequency from the current dictionary. The same tag is assigned to every
imported word. By default, imported words have no tag (tag = NULL).
NULL, invisibly. The supplied worker is modified in place.
read_cidian().
## Not run:
cutter <- worker()
import_cidian(cutter, "dictionary.scel")
segment("\u8bcd\u5e93\u4e2d\u7684\u8bcd\u8bed", cutter)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.