<commit_before>from PyDictionary import PyDictionary
import json

# Dictionary command
async def ex(c, pch, dch, m, a, Cmd_char):
    a = a.split(' ')
    if len(a) == 1:
        wrd = a[0].lower()
        pydict = PyDictionary()
        r = json.loads(pydict.meaning(wrd))
        an = '''```Apache
# Definition: {} #'''.format(wrd)
        if 'Noun' in r:
            an += '''Noun
'''
            cnt = 1
            for d in r['Noun']:
                an += '''  {}) {}
'''.format(cnt, d)
                cnt += 1
        if 'Verb' in r:
            an += '''Verb
'''
            cnt = 1
            for d in r['Verb']:
                an += '''  {}) ()
'''.format(cnt, d)
                cnt += 1
        if 'Adjective' in r:
            an += '''Adjective
            '''
            cnt = 1
            for d in r['Adjective']:
                an += '''  {}) ()
            '''.format(cnt, d)
                cnt += 1
        an += '''```'''
        await c.send_message(pch, an)
        await c.send_message(dch, '{}, the meaning for the term `{}` has been sent in a private message.'
                             .format(m, wrd))
    else:
        await c.send_message(dch, '{}, **USAGE:** {}dictionary <term>'.format(m, Cmd_char))<commit_msg>Improved formatting for -dictionary<commit_after>from PyDictionary import PyDictionary
import json

# Dictionary command
async def ex(c, pch, dch, m, a, Cmd_char):
    a = a.split(' ')
    if len(a) == 1:
        wrd = a[0].lower()
        pydict = PyDictionary()
        r = json.loads(pydict.meaning(wrd))
        an = '''```Markdown
# Meaning: {} #'''.format(wrd)
        if 'Noun' in r:
            an += '''<Noun>
'''
            cnt = 1
            for d in r['Noun']:
                an += '''[{}]: {}
'''.format(cnt, d)
                cnt += 1
        if 'Verb' in r:
            an += '''<Verb>
'''
            cnt = 1
            for d in r['Verb']:
                an += '''[{}]: {}
'''.format(cnt, d)
                cnt += 1
        if 'Adjective' in r:
            an += '''<Adjective>
            '''
            cnt = 1
            for d in r['Adjective']:
                an += '''[{}]: {}
            '''.format(cnt, d)
                cnt += 1
        an += '''```'''
        await c.send_message(pch, an)
        await c.send_message(dch, '{}, the meaning for the term `{}` has been sent in a private message.'
                             .format(m, wrd))
    else:
        await c.send_message(dch, '{}, **USAGE:** {}dictionary <term>'.format(m, Cmd_char))
{'fraction_non_alphanumeric': 0.17977084156459897, 'fraction_numerical': 0.006321612011062821, 'mean_word_length': 1.4276126558005753, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '872116', 'n_tokens_mistral': 843, 'n_tokens_neox': 804, 'n_words': 220}