<commit_before>Normalt
=======

Normalt is a extension to Symfony Serializer than implements only the Normalization part. It comes with several
different Normalizers that can be used to normalize from object to array and denormalize from array to object.

That is the overall goal anyways.

Getting Started
---------------

Each normalizer can be used on its own, but you can also use a `NormalizerSet` to use many different dependent on
the type you are normalizing, just like when using the serializer.

``` php
use Normalt\NormalizerSet;
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;
use Symfony\Component\Serializer\Normalizer\CustomNormalizer;

$set = new NormalizerSet(array(
    new GetSetMethodNormalizer,
    new CustomNormalizer,
));

$normalized = $set->normalize(new MyObject);
$object = $set->denormalize($normalized);
```

Included Normalizers
--------------------

Other than the normalt normalizers from the serializer component we have added some more special
ones that can be used. Theese can be used with the normal Serializer aswell.

* `PropertyNormalizer` which uses reflection and an additional array of serializers that get each property name, and value
  as a seperate normalization.<commit_msg>more readme<commit_after>Normalt
=======

Normalt is a extension to Symfony Serializer than implements only the Normalization part. It comes with several
different Normalizers that can be used to normalize from object to array and denormalize from array to object.

That is the overall goal anyways.

Getting Started
---------------

Each normalizer can be used on its own, but you can also use a `NormalizerSet` to use many different dependent on
the type you are normalizing, just like when using the serializer.

``` php
use Normalt\NormalizerSet;
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;
use Symfony\Component\Serializer\Normalizer\CustomNormalizer;

$set = new NormalizerSet(array(
    new GetSetMethodNormalizer,
    new CustomNormalizer,
));

$normalized = $set->normalize(new MyObject);
$object = $set->denormalize($normalized);
```

Any normalizer that is used through the `NormalizerSet` will have an instance of it set
if they implement `Normalt\NormalizerAware`. Same as if you have a Normalizer that implements
`SerializerAwareInterface` and use the Serializer.

Included Normalizers
--------------------

Other than the normalt normalizers from the serializer component we have added some more special
ones that can be used. Theese can be used with the normal Serializer aswell.

* `PropertyNormalizer` which uses reflection and an additional array of serializers that get each property name, and value
  as a seperate normalization.
{'fraction_non_alphanumeric': 0.07989690721649484, 'fraction_numerical': 0.0, 'mean_word_length': 4.466800804828974, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3415689', 'n_tokens_mistral': 702, 'n_tokens_neox': 683, 'n_words': 327}