<commit_before>-module(hello_msgpack).
-behaviour(hello_decoder).
-export([decode/1, encode/1, mime_type/0]).

decode(Binary) ->
    {ok, Unpacked} = msgpack:unpack(Binary, [{format, map}]),
    Unpacked.

encode(Json) ->
    msgpack:pack(Json, [{format, jsx}]).

mime_type() -> <<"application/x-msgpack">>.
<commit_msg>allow atoms in pack of msgpack<commit_after>-module(hello_msgpack).
-behaviour(hello_decoder).
-export([decode/1, encode/1, mime_type/0]).

decode(Binary) ->
    {ok, Unpacked} = msgpack:unpack(Binary, [{format, map}]),
    Unpacked.

encode(Json) ->
    msgpack:pack(Json, [{format, jsx}, {allow_atom, pack}]).

mime_type() -> <<"application/x-msgpack">>.

{'fraction_non_alphanumeric': 0.206794682422452, 'fraction_numerical': 0.008862629246676515, 'mean_word_length': 4.844827586206897, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '1857790', 'n_tokens_mistral': 260, 'n_tokens_neox': 251, 'n_words': 43}