pub fn build_user_dictionary(
_kind: &str,
input_file: &str,
output_dir: &str,
metadata: Option<PyMetadata>,
) -> PyResult<()>Expand description
Builds a user dictionary from a CSV file.
§Arguments
_kind- Dictionary kind (currently unused, reserved for future use).input_file- Path to the CSV file containing user dictionary entries.output_dir- Directory where the built user dictionary will be saved.metadata- Optional metadata configuration. If None, default values are used.
§CSV Format
The CSV file should contain entries in the format specified by the dictionary schema. Typically: surface,reading,pronunciation
§Errors
Returns an error if the input file doesn’t exist or if the build fails.
§Examples
# Build with default metadata
lindera.build_user_dictionary("ipadic", "user.csv", "/path/to/output")
# Build with custom metadata
metadata = lindera.Metadata()
lindera.build_user_dictionary("ipadic", "user.csv", "/path/to/output", metadata)