load_dictionary

Function load_dictionary 

Source
pub fn load_dictionary(uri: &str) -> PyResult<PyDictionary>
Expand description

Loads a dictionary from the specified URI.

§Arguments

  • uri - URI to the dictionary. Can be a file path or embedded dictionary name.

§Supported URIs

  • File paths: /path/to/dictionary
  • Embedded dictionaries: ipadic, unidic, ko-dic, cc-cedict

§Returns

A loaded Dictionary object.

§Errors

Returns an error if the dictionary cannot be loaded from the specified URI.

§Examples

# Load an embedded dictionary
dict = lindera.load_dictionary("ipadic")

# Load from file path
dict = lindera.load_dictionary("/path/to/dictionary")