<commit_before>Barcodes module documentation
==============================

The Barcodes module defines barcode nomenclatures whose rules identify specific type 
of items e.g. products, locations. It contains the following features:
- Barcode patterns to identify barcodes containing a numerical value (e.g. weight, price)
- Definitin of barcode aliases that allow to identify the same product with different barcodes
- Unlimited barcode patterns and definitions. 
- Barcode EAN13 encoding supported

Barcode nomenclatures and rules
-------------------------------

A barcode nomenclature contains a set of rules. Each rule identifies a barcode pattern. 
A rule has a type specifying the model of the object whose barcode matches the pattern.
A rule has an encoding as well, which can be either EAN-13, or Any. The encoding of a rule
must be set to EAN-13 if the rule identifies a pattern matched by objects whose barcode is
encoding in EAN-13. Rules have a sequence field indicated the order the rules are evaluated (ASC).

Many barcode scanners strip the leading zero when scanning EAN-13 barcodes. Barcode nomenclatures
have a boolean field "Use strict EAN13". If False, when trying to match a scanned barcode with
a rule whose encoding is EAN-13, if the barcode is of length 12 and, by prepending it by a 0,
the last digit is the correct checksum, we automatically prepend the barcode by 0 and try to
find a match with this new barcode. If "Use strict EAN13" is set to True, we look for a pattern
matching the original, 12-digit long, barcode.

Barcodes and patterns syntax<commit_msg>[IMP] barcodes: documentation<commit_after>Barcodes module documentation
==============================

The Barcodes module defines barcode nomenclatures whose rules identify specific type 
of items e.g. products, locations. It contains the following features:

- Barcode patterns to identify barcodes containing a numerical value (e.g. weight, price)
- Definitin of barcode aliases that allow to identify the same product with different barcodes
- Unlimited barcode patterns and definitions,
- Barcode EAN13 encoding supported.

Barcode nomenclatures and rules
-------------------------------

A barcode nomenclature contains a set of rules. Each rule identifies a barcode pattern. 
A rule has a type specifying the model of the object whose barcode matches the pattern.
A rule has an encoding as well, which can be either EAN-13, or Any. The encoding of a rule
must be set to EAN-13 if the rule identifies a pattern matched by objects whose barcode is
encoding in EAN-13. Rules have a sequence field indicated the order the rules are evaluated (ASC).

Many barcode scanners strip the leading zero when scanning EAN-13 barcodes. Barcode nomenclatures
have a boolean field "Use strict EAN13". If False, when trying to match a scanned barcode with
a rule whose encoding is EAN-13, if the barcode is of length 12 and, by prepending it by a 0,
the last digit is the correct checksum, we automatically prepend the barcode by 0 and try to
find a match with this new barcode. If "Use strict EAN13" is set to True, we look for a pattern
matching the original, 12-digit long, barcode.

Barcodes and patterns syntax
{'fraction_non_alphanumeric': 0.07069127306850172, 'fraction_numerical': 0.01376290272130122, 'mean_word_length': 4.100478468899522, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4013044', 'n_tokens_mistral': 830, 'n_tokens_neox': 786, 'n_words': 485}