<commit_before>from typing import TYPE_CHECKING, List  # noqa

import discord
from discord.ext import commands

from ..db import (
    ConfessType, ConfessionRow, get_confessions, get_confession, get_chapters,
    get_paragraph, search_paragraphs, search_qas, get_question_count, get_question
)
from ..format import pluralizer
from .. import re

if TYPE_CHECKING:  # pragma: no cover
    from ..erasmus import Erasmus  # noqa
    from ..context import Context  # noqa

pluralize_match = pluralizer('match', 'es')
pluralize_paragraph = pluralizer('paragraph', 's')
pluralize_question = pluralizer('question', 's')
pluralize_article = pluralizer('article', 's')

reference_res = {
    ConfessType.CHAPTERS: re.compile(re.START,
                                     re.named_group('chapter')(re.one_or_more(re.DIGITS)),
                                     re.DOT,
                                     re.named_group('paragraph')(re.one_or_more(re.DIGITS)),
                                     re.END),
    ConfessType.QA: re.compile(re.START,
                               re.optional(re.named_group('qa')('[qaQA]')),
                               re.named_group('number')(re.one_or_more(re.DIGITS)),
                               re.END)
}


confess_help = '''
Arguments:
----------
    [confession] - A confession to query. Can be found by invoking {prefix}confess with no arguments.

    [args...] - Arguments to pass to query or look up in the confession.

Examples:
---------
    List all confessions:
        {prefix}confess

    List the chapters of a confession:
        {prefix}confess 1689

    Show the number of questions in a catechism:
        {prefix}confess hc

    Search for terms in a confession/catechism:
        {prefix}confess 1689 faith hope

    Look up the paragraph of a confession:
        {prefix}confess 1689 2.2

    Look up a question, answer, or both in a catechism:
        {prefix}confess hc q3
        {prefix}confess hc a3
        {prefix}confess hc 3
'''<commit_msg>Update help test for $confess<commit_after>from typing import TYPE_CHECKING, List  # noqa

import discord
from discord.ext import commands

from ..db import (
    ConfessType, ConfessionRow, get_confessions, get_confession, get_chapters,
    get_paragraph, search_paragraphs, search_qas, get_question_count, get_question
)
from ..format import pluralizer
from .. import re

if TYPE_CHECKING:  # pragma: no cover
    from ..erasmus import Erasmus  # noqa
    from ..context import Context  # noqa

pluralize_match = pluralizer('match', 'es')
pluralize_paragraph = pluralizer('paragraph', 's')
pluralize_question = pluralizer('question', 's')
pluralize_article = pluralizer('article', 's')

reference_res = {
    ConfessType.CHAPTERS: re.compile(re.START,
                                     re.named_group('chapter')(re.one_or_more(re.DIGITS)),
                                     re.DOT,
                                     re.named_group('paragraph')(re.one_or_more(re.DIGITS)),
                                     re.END),
    ConfessType.QA: re.compile(re.START,
                               re.optional(re.named_group('qa')('[qaQA]')),
                               re.named_group('number')(re.one_or_more(re.DIGITS)),
                               re.END)
}


confess_help = '''
Arguments:
----------
    [confession] - A confession to query. Can be found by invoking {prefix}confess with no arguments.

    [args...] - Arguments to pass to query or look up in the confession.

Examples:
---------
    List all confessions/catechisms:
        {prefix}confess

    List the chapters of a confession:
        {prefix}confess 1689

    Show the number of questions in a catechism:
        {prefix}confess hc

    Search for terms in a confession/catechism:
        {prefix}confess 1689 faith hope

    Look up the paragraph of a confession:
        {prefix}confess 1689 2.2

    Look up a question, answer, or both in a catechism:
        {prefix}confess hc q3
        {prefix}confess hc a3
        {prefix}confess hc 3
'''
{'fraction_non_alphanumeric': 0.10200544689279524, 'fraction_numerical': 0.008417925229017083, 'mean_word_length': 2.2423756019261636, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1750336', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1177, 'n_words': 326}