<commit_before>booksie
=======

Do fun things with books and other long texts.


Examples
--------

Generate random sentences from some text

..code-block python::

    from booksie.book import Book
    shake = Book(open("speare.txt").read())
    long_sentences = shake.gen_random_sentences(min_words=100)
    for sentence in long_sentences:
        print sentence
        if "horatio" in sentence.lower():
            break


Get a single random sentence from some text

..code-block python::

    form booksie.book import Book
    shake = Book(
        
        <commit_msg>Fixed code-block usage in rst<commit_after>booksie
=======

Do fun things with books and other long texts.


Examples
--------

Generate random sentences from some text

.. code-block:: python

    from booksie.book import Book
    shake = Book(open("speare.txt").read())
    long_sentences = shake.gen_random_sentences(min_words=100)
    for sentence in long_sentences:
        print sentence
        if "horatio" in sentence.lower():
            break


Get a single random sentence from some text

.. code-block:: python

    form booksie.book import Book
    shake = Book(
        
        
{'fraction_non_alphanumeric': 0.09658119658119659, 'fraction_numerical': 0.005128205128205128, 'mean_word_length': 2.5920245398773005, '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': '5055704', 'n_tokens_mistral': 338, 'n_tokens_neox': 321, 'n_words': 112}