Skip to main content

embedded_dictionary

Macro embedded_dictionary 

Source
macro_rules! embedded_dictionary {
    ($dir:literal, $loader:ident) => { ... };
}
Expand description

Generates the embedded-dictionary loader for a dictionary crate.

The dictionary data is baked into the binary with include_bytes!, reading from the LINDERA_WORKDIR directory populated by the crate’s build script.

  • $dir — the dictionary subdirectory inside LINDERA_WORKDIR (e.g. "/lindera-ipadic").
  • $loader — the public loader struct name (e.g. EmbeddedIPADICLoader).

§Example

lindera_dictionary::embedded_dictionary!("/lindera-ipadic", EmbeddedIPADICLoader);