<commit_before>#!/usr/bin/env python3
# encoding: utf8
# license: ISC (MIT/BSD compatible) https://choosealicense.com/licenses/isc/

# This library is principally created for python 3. However python 2 support may be doable and is welcomed.


"""
To use this module just import it with a short custom name. I recommend:

    >>> import fluentpy as _ # for scripts / projects that don't use gettext
    >>> import fluentpy as _f # for everything else

If you want / need this to be less magical, you can import the main wrapper normally

    >>> from fluentpy import wrap # or `_`, if you're not using gettext

Then to use the module, wrap any value and start chaining off of it. To get started 
lets try to inrospect `fluentpy` using its own fluent interface::

    $ python3 -m fluentpy '_(_).dir().print()'
    $ python3 -m fluentpy '_(_).help()'

This is incidentally the second way to use this module, as a helper that makes it easier to 
write short shell filters quickly in python.::

    $ echo "foo\\nbar\\nbaz" \\
        | python3 -m fluentpy "lib.sys.stdin.readlines().map(each.call.upper()).map(print)"<commit_msg>fix typo: inrospect -> introspect<commit_after>#!/usr/bin/env python3
# encoding: utf8
# license: ISC (MIT/BSD compatible) https://choosealicense.com/licenses/isc/

# This library is principally created for python 3. However python 2 support may be doable and is welcomed.


"""
To use this module just import it with a short custom name. I recommend:

    >>> import fluentpy as _ # for scripts / projects that don't use gettext
    >>> import fluentpy as _f # for everything else

If you want / need this to be less magical, you can import the main wrapper normally

    >>> from fluentpy import wrap # or `_`, if you're not using gettext

Then to use the module, wrap any value and start chaining off of it. To get started 
lets try to introspect `fluentpy` using its own fluent interface::

    $ python3 -m fluentpy '_(_).dir().print()'
    $ python3 -m fluentpy '_(_).help()'

This is incidentally the second way to use this module, as a helper that makes it easier to 
write short shell filters quickly in python.::

    $ echo "foo\\nbar\\nbaz" \\
        | python3 -m fluentpy "lib.sys.stdin.readlines().map(each.call.upper()).map(print)"
{'fraction_non_alphanumeric': 0.097228332600088, 'fraction_numerical': 0.0061592608886933565, 'mean_word_length': 3.5298804780876494, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 22, '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': '5731884', 'n_tokens_mistral': 681, 'n_tokens_neox': 654, 'n_words': 302}