parse_constants.py

View code on Github

Parsing constants and config loading for the Wiktionary extraction module.

scribe_data.wiktionary.parse_constants.get_wiktionary_config(source_iso: str) dict[source]

Load the Wiktionary config for the given source ISO and compile its regex/set fields.

Parameters:
source_isostr

ISO code of the source Wiktionary edition (e.g. "en", "de").

Returns:
dict

The config dict with compiled regex patterns and converted sets/tuples.