<commit_before>h1. scoring_rules

A small library that provides a simple DSL for creating scoring rules (for rankings, rating and similar uses).

Does scoring_rules helps your daily work with Rails? So, "please recommend me":http://workingwithrails.com/recommendation/new/person/9370-lucas-h-ngaro on Working With Rails. Thanks for your kindness! :)

h2. Why?

This kind of feature could by implemented without a DSL, but this really helps to build a transparent representation of business rules that is self-contained and easier to modify. Also, even if not a primary goal, this way of representation is easier for non-tech people to understand.

h2. How?

First, install the gem:

<pre>
$ [sudo] gem install scoring_rules
</pre>

Then, add it as a dependency in your code using your favorite way (a simple require or mechanisms like the Bundler gem).

The gem will provide you a module to mixin into your classes.

<pre><commit_msg>Fixing typo<commit_after>h1. scoring_rules

A small library that provides a simple DSL for creating scoring rules (for rankings, rating and similar uses).

Does scoring_rules helps your daily work with Rails? So, "please recommend me":http://workingwithrails.com/recommendation/new/person/9370-lucas-h-ngaro on Working With Rails. Thanks for your kindness! :)

h2. Why?

This kind of feature could be implemented without a DSL, but this really helps to build a transparent representation of business rules that is self-contained and easier to modify. Also, even if not a primary goal, this way of representation is easier for non-tech people to understand.

h2. How?

First, install the gem:

<pre>
$ [sudo] gem install scoring_rules
</pre>

Then, add it as a dependency in your code using your favorite way (a simple require or mechanisms like the Bundler gem).

The gem will provide you a module to mixin into your classes.

<pre>
{'fraction_non_alphanumeric': 0.06002143622722401, 'fraction_numerical': 0.007502679528403001, 'mean_word_length': 4.491176470588235, 'pattern_counts': {'":': 2, '<': 9, '<?xml version=': 0, '>': 9, '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': '5645815', 'n_tokens_mistral': 513, 'n_tokens_neox': 486, 'n_words': 272}