Skip to main content

Module dictionary

Module dictionary 

Source
Expand description

Dictionary management for morphological analysis.

This module provides functionality for building, loading, and managing dictionaries used in morphological analysis.

§Dictionary Types

  • Dictionary: Main dictionary for morphological analysis
  • UserDictionary: Custom user-defined dictionary for additional words

§Examples

import lindera

# Load a pre-built dictionary
dictionary = lindera.load_dictionary("ipadic")

# Build a custom dictionary
metadata = lindera.Metadata()
lindera.build_dictionary("/path/to/input", "/path/to/output", metadata)

# Build a user dictionary
lindera.build_user_dictionary("ipadic", "user.csv", "/path/to/output")

Structs§

PyDictionary
A morphological analysis dictionary.
PyUserDictionary
A user-defined dictionary for custom words.

Functions§

build_dictionary
Builds a dictionary from source files.
build_user_dictionary
Builds a user dictionary from a CSV file.
load_dictionary
Loads a dictionary from the specified URI.
load_user_dictionary
Loads a user dictionary from the specified URI.
register