Struct simplecc::Dict [] [src]

pub struct Dict { /* fields omitted */ }

Dictionary to convert text.

This library doesn't contain dictionary file. You may download them from OpenCC's repo.

For chaining multiple dicts, just concat all to one file (in any order).

File Format

The format is the same as text format (not the compiled binary one) in OpenCC project.

Specifically, one rule per line, two columns per rule splitted by a TAB (\t). First column is original word/phrase, the other is converted one, which may contains multiples word/phrase splitted by a space (), but only the first one is used, others will be ignored.

Methods

impl Dict
[src]

[src]

Load dict from string

[src]

Load dict from lines of string.

[src]

Load dict file. Unrecognizable data will be silently ignored.

[src]

Use this dict to convert string. Return converted text.

Trait Implementations

impl Debug for Dict
[src]

[src]

Formats the value using the given formatter.