<commit_before>"""
Provides functionality for converting YAML formatted files to JSON.

Specifically, YAML incorporating the YAML Stratus format is handled.

Function Exports:

- load()
- to_json()
- load_as_json()
- load_all()
- load_all_as_json()
"""

import json

from .yamlstratus import YamlStratus

__version__ = '1.0.2'


def load(stream, root_tag='main', include_dirs=None, params=None):
    """
    Parse a YAML stratus stream returning a dictionary

    :param stream: stream over the YAML Stratus document
    :param root_tag: the name of the root node in the document to return
        (default 'main')
    :param include_dirs: list of search paths for includes<commit_msg>Bump version<commit_after>"""
Provides functionality for converting YAML formatted files to JSON.

Specifically, YAML incorporating the YAML Stratus format is handled.

Function Exports:

- load()
- to_json()
- load_as_json()
- load_all()
- load_all_as_json()
"""

import json

from .yamlstratus import YamlStratus

__version__ = '1.0.3'


def load(stream, root_tag='main', include_dirs=None, params=None):
    """
    Parse a YAML stratus stream returning a dictionary

    :param stream: stream over the YAML Stratus document
    :param root_tag: the name of the root node in the document to return
        (default 'main')
    :param include_dirs: list of search paths for includes
{'fraction_non_alphanumeric': 0.08473338203067933, 'fraction_numerical': 0.004382761139517896, 'mean_word_length': 4.150375939849624, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5968215', 'n_tokens_mistral': 435, 'n_tokens_neox': 412, 'n_words': 156}