<commit_before>#!/usr/bin/python
# encoding: utf-8

# In order to use this script from shell:
# > make CONF=UNO clean-examples
# > make CONF=UNO examples >tempsizes
# > cat tempsizes | ./stats.py >sizes
# > rm tempsizes
# Then sizes file can be opened in LibreOffice Calc

from __future__ import with_statement
import argparse, re, sys
<commit_msg>Add doc to stats script calculating size of tutorial samples.<commit_after>#!/usr/bin/python
# encoding: utf-8

# In order to use this script from shell:
# > ./build-samples | ./stats.py >sizes
# Then sizes file can be opened in LibreOffice Calc

from __future__ import with_statement
import argparse, re, sys

{'fraction_non_alphanumeric': 0.0911854103343465, 'fraction_numerical': 0.00303951367781155, 'mean_word_length': 4.357723577235772, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7639398', 'n_tokens_mistral': 211, 'n_tokens_neox': 204, 'n_words': 81}