<commit_before># Copyright (c) 2005-2006 <NAME>.
# Copyright (c) 2008-2009 ITA Software, Inc.
# See LICENSE.txt for details.

"""Coil: A Configuration Library."""

__version_info__ = (0,3,10)
__version__ = ".".join([str(x) for x in __version_info__])
__all__ = ['struct', 'parser', 'tokenizer', 'errors']

from coil.parser import Parser

def parse_file(file_name, **kwargs):
    """Open and parse a coil file.

    See :class:`Parser <coil.parser.Parser>` for possible keyword arguments.

    :param file_name: Name of file to parse.
    :type file_name: str

    :return: The root object.
    :rtype: :class:`Struct <coil.struct.Struct>`
    """
    coil = open(file_name)
    return Parser(coil, file_name, **kwargs).root()<commit_msg>Bump version to 0.3.11 as a bugfix release<commit_after># Copyright (c) 2005-2006 <NAME>.
# Copyright (c) 2008-2009 ITA Software, Inc.
# See LICENSE.txt for details.

"""Coil: A Configuration Library."""

__version_info__ = (0,3,11)
__version__ = ".".join([str(x) for x in __version_info__])
__all__ = ['struct', 'parser', 'tokenizer', 'errors']

from coil.parser import Parser

def parse_file(file_name, **kwargs):
    """Open and parse a coil file.

    See :class:`Parser <coil.parser.Parser>` for possible keyword arguments.

    :param file_name: Name of file to parse.
    :type file_name: str

    :return: The root object.
    :rtype: :class:`Struct <coil.struct.Struct>`
    """
    coil = open(file_name)
    return Parser(coil, file_name, **kwargs).root()
{'fraction_non_alphanumeric': 0.14770459081836326, 'fraction_numerical': 0.02927478376580173, 'mean_word_length': 4.081081081081081, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1253255', 'n_tokens_mistral': 548, 'n_tokens_neox': 499, 'n_words': 156}