<commit_before>defmodule Config.Reader do
  @moduledoc """
  API for reading config files defined with `Config`.

  ## As a provider

  `Config.Reader` can also be used as a `Config.Provider`. When used
  as a provider, it expects a single argument: the configuration path
  (as outlined in `t:Config.Provider.config_path/0`) for the file to
  be read and loaded during the system boot.

  For example, if you expect the target system to have a config file
  in an absolute path, you can configure your `mix release` as:

      config_providers: [{Config.Reader, "/etc/config.exs"}]

  Or if you want to read a custom path inside the release:

      config_provider: [{Config.Reader, {:system, "RELEASE_ROOT", "/config.exs"}}]

  You can also pass a keyword list of options to the reader,
  where the `:path` is a required key:

      config_providers: [
        {Config.Reader,
         path: "/etc/config.exs",
         env: :prod,
         imports: :disabled}
      ]

  Note by default Mix releases supports runtime configuration via
  a `config/runtime.exs`. If a `config/runtime.exs` exists in your
  application, it is automatically copied inside the release and
  automatically set as a config provider.
  """

  @behaviour Config.Provider

  @impl true
  def init(opts) when is_list(opts) do
    {path, opts} = Keyword.pop!(opts, :path)
    Config.Provider.validate_config_path!(path)
    {path, opts}
  end

  def init(path) do
    init(path: path)<commit_msg>Fix typo in documentation (#10477)<commit_after>defmodule Config.Reader do
  @moduledoc """
  API for reading config files defined with `Config`.

  ## As a provider

  `Config.Reader` can also be used as a `Config.Provider`. When used
  as a provider, it expects a single argument: the configuration path
  (as outlined in `t:Config.Provider.config_path/0`) for the file to
  be read and loaded during the system boot.

  For example, if you expect the target system to have a config file
  in an absolute path, you can configure your `mix release` as:

      config_providers: [{Config.Reader, "/etc/config.exs"}]

  Or if you want to read a custom path inside the release:

      config_providers: [{Config.Reader, {:system, "RELEASE_ROOT", "/config.exs"}}]

  You can also pass a keyword list of options to the reader,
  where the `:path` is a required key:

      config_providers: [
        {Config.Reader,
         path: "/etc/config.exs",
         env: :prod,
         imports: :disabled}
      ]

  Note by default Mix releases supports runtime configuration via
  a `config/runtime.exs`. If a `config/runtime.exs` exists in your
  application, it is automatically copied inside the release and
  automatically set as a config provider.
  """

  @behaviour Config.Provider

  @impl true
  def init(opts) when is_list(opts) do
    {path, opts} = Keyword.pop!(opts, :path)
    Config.Provider.validate_config_path!(path)
    {path, opts}
  end

  def init(path) do
    init(path: path)
{'fraction_non_alphanumeric': 0.09216745442268737, 'fraction_numerical': 0.002363268062120189, 'mean_word_length': 3.287988422575977, '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': '7225411', 'n_tokens_mistral': 888, 'n_tokens_neox': 853, 'n_words': 357}