# Path: pyramids/categorization.py
# CATEGORY_WILDCARD = _CATEGORY_WILDCARD
# 
# Path: pyramids/language.py



import configparser
import os
from typing import Optional, Mapping, Any, FrozenSet, Tuple
from pyramids import categorization
from pyramids.language import Language

        data_folder = os.path.dirname(config_file_path)

        default_word_sets_folder = os.path.join(os.path.dirname(config_file_path), 'word_sets')

        if defaults is None:
            defaults = {}
        else:
            defaults = dict(defaults)
        for option, value in (('Tokenizer Type', 'standard'),
                              ('Discard Spaces', '1'),
                              ('Word Sets Folder', default_word_sets_folder)):
            if option not in defaults:
                defaults[option] = value

        config_parser = configparser.ConfigParser(defaults)
        config_parser.read(self._config_file_path)

        # Languages
        languages = {}
        for language_section in config_parser.sections():
            if not language_section.startswith('Language:'):
                continue
            language_header_name = language_section[9:].strip()
            language_name = config_parser.get(language_section, 'Name',
                                              fallback=language_header_name).strip()
            if not language_name:
                continue
            iso639_1 = config_parser.get(language_section, 'ISO 639-1', fallback=None)
            iso639_2 = config_parser.get(language_section, 'ISO 639-2', fallback=None)

# Path: pyramids/categorization.py
# CATEGORY_WILDCARD = _CATEGORY_WILDCARD
# 
# Path: pyramids/language.py



# Path: pyramids/config.py
import configparser
import os
from typing import Optional, Mapping, Any, FrozenSet, Tuple
from pyramids import categorization
from pyramids.language import Language


        data_folder = os.path.dirname(config_file_path)

        default_word_sets_folder = os.path.join(os.path.dirname(config_file_path), 'word_sets')

        if defaults is None:
            defaults = {}
        else:
            defaults = dict(defaults)
        for option, value in (('Tokenizer Type', 'standard'),
                              ('Discard Spaces', '1'),
                              ('Word Sets Folder', default_word_sets_folder)):
            if option not in defaults:
                defaults[option] = value

        config_parser = configparser.ConfigParser(defaults)
        config_parser.read(self._config_file_path)

        # Languages
        languages = {}
        for language_section in config_parser.sections():
            if not language_section.startswith('Language:'):
                continue
            language_header_name = language_section[9:].strip()
            language_name = config_parser.get(language_section, 'Name',
                                              fallback=language_header_name).strip()
            if not language_name:
                continue
            iso639_1 = config_parser.get(language_section, 'ISO 639-1', fallback=None)
            iso639_2 = config_parser.get(language_section, 'ISO 639-2', fallback=None)

            languages[language_header_name] = Language(language_name, iso639_1, iso639_2)