Glot.Lexicon (Glot v0.1.2)

View Source

Compiles JSONL glossaries into a flat map of localized expressions.

Used internally by Glot to build a lexicon of lexeme–expression mappings.

Summary

Functions

Compiles a list of JSONL glossary files into a map of keys (locale.lexeme) to expressions.

Functions

compile(base_path, sources)

@spec compile(String.t(), [String.t()]) :: {map(), [String.t()]}

Compiles a list of JSONL glossary files into a map of keys (locale.lexeme) to expressions.

Returns a tuple of {translations, file_paths} where translations is a map of keys (locale.lexeme) to expressions and file_paths is a list of file paths that were successfully loaded.