<commit_before>lab42_intellihash
=================

A Hash with Business Logic ( call it intelligent ).

Actually it is a view layer over a Hash like object, which needs to obey the simple protocol

`Hash#fetch`.


The services `IHash` provides are of the number of four:

* Default values per key.
* Validation via _Constraints_.
* Business Logic or Lookup Logic.
* Caching of Computed Values.


## Usage

```ruby
    require 'lab42/ihash'

    IHash = Lab42::IHash
    IntelliHash = Lab42::IntelliHash
```


## Manual (QED Driven)

Details are explained in the QED demos [here](https://github.com/RobertDober/lab42_intellihash/tree/master/demo)<commit_msg>added installation notes to README<commit_after>lab42_intellihash
=================

A Hash with Business Logic ( call it intelligent ).

Actually it is a view layer over a Hash like object, which needs to obey the simple protocol

`Hash#fetch`.


The services `IHash` provides are of the number of four:

* Default values per key.
* Validation via _Constraints_.
* Business Logic or Lookup Logic.
* Caching of Computed Values.


## Installation

```sh
    gem install lab42_ihash --pre
```

## Usage

```ruby
    require 'lab42/ihash'

    IHash = Lab42::IHash
    IntelliHash = Lab42::IntelliHash
```


## Manual (QED Driven)

Details are explained in the QED demos [here](https://github.com/RobertDober/lab42_intellihash/tree/master/demo)
{'fraction_non_alphanumeric': 0.11150822015725519, 'fraction_numerical': 0.015725518227305217, 'mean_word_length': 4.204460966542751, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1930065', 'n_tokens_mistral': 469, 'n_tokens_neox': 420, 'n_words': 155}