<commit_before><?php
namespace GraphCommons\Graph;

use GraphCommons\Util\Collection;
use GraphCommons\Util\Util;
use GraphCommons\Util\{Json, JsonException};
use GraphCommons\Util\SerialTrait as Serial;
use GraphCommons\Graph\Signal;


class SignalCollection extends Collection
{
    use Serial;

    final public function add(Signal $signal): self
    {
        parent::set($this->count(), $signal);

        return $this;
    }

    final public function unserialize(): array
    {
        $array = array();
        foreach ($this->data as $key => $value) {
            $array[$key] = $value->unserialize();<commit_msg>update unserialize().<commit_after><?php
namespace GraphCommons\Graph;

use GraphCommons\Util\Collection;
use GraphCommons\Util\Util;
use GraphCommons\Util\{Json, JsonException};
use GraphCommons\Util\SerialTrait as Serial;
use GraphCommons\Graph\Signal;


class SignalCollection extends Collection
{
    use Serial;

    final public function add(Signal $signal): self
    {
        parent::set($this->count(), $signal);

        return $this;
    }

    final public function unserialize(): array
    {
        $array = array();
        foreach ($this->data as $key => $value) {
            $array['signals'][$key] = $value->unserialize();
{'fraction_non_alphanumeric': 0.12747426761678543, 'fraction_numerical': 0.0, 'mean_word_length': 3.4350877192982456, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '116419', 'n_tokens_mistral': 366, 'n_tokens_neox': 357, 'n_words': 92}