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).
The library includes optional dictionaries when builtin_dicts
feature is on. Disabled by default.
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.
Load dict from lines of string.
Load dict file.
Unrecognizable data will be silently ignored.
Return the new dict that chained together.
Use this dict to convert string.
Return converted text.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static