<commit_before>PILtesseract
=======
[![](https://img.shields.io/pypi/v/piltesseract.svg?branch=master)](https://pypi.python.org/pypi/piltesseract)

Simple Tesseract wrapper for converting PIL Images to text.

**Warning:** PILtesseract is intended to only work with tesseract 3.03+,
one awesome feature added in 3.03 is the ability to pipe images via stdin,
PILtesseract utilizes this feature.

Features
------------
 - Completely wraps [Tesseract-OCR](https://github.com/tesseract-ocr/tesseract) command line optional arguments.
 - Sends [PIL](https://pillow.readthedocs.org/en/latest/) images to tesseract through stdin (avoids creating a temp file).
 - Works for Python 2 and 3.
 - All working code in [one file](https://github.com/Digirolamo/PILtesseract/blob/master/piltesseract/tesseractwrapper.py).
 - [MIT License](https://github.com/Digirolamo/PILtesseract/blob/master/LICENSE)
 - [Documentation](http://piltesseract.readthedocs.org/en/latest/)
 
Here is a simple example:


    >>> from PIL import Image
    >>> from piltesseract import get_text_from_image
    >>> image = Image.open('quickfox.png')
    >>> get_text_from_image(image)
    'The quick brown fox jumps over the lazy dog'

See more [advanced examples/recipes.](http://piltesseract.readthedocs.org/en/latest/recipes.html)

Requirments
------------
 - [Pillow](https://pillow.readthedocs.org/en/latest/)
   - ```$ pip install Pillow```
 - [Tesseract-OCR](https://github.com/tesseract-ocr/tesseract)
   - First install either from source or from [binaries](https://github.com/tesseract-ocr/tesseract/wiki).
   - Ensure that the tesseract binary folder is on your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)).

Install
------------
 
    $ pip install piltesseract

<commit_msg>Updated links and added install directions.<commit_after>PILtesseract
=======
[![](https://img.shields.io/pypi/v/piltesseract.svg?branch=master)](https://pypi.python.org/pypi/piltesseract)

Simple Tesseract wrapper for converting PIL Images to text.

**Warning:** PILtesseract is intended to only work with tesseract 3.03+,
one awesome feature added in 3.03 is the ability to pipe images via stdin,
PILtesseract utilizes this feature.

Features
------------
 - Completely wraps [Tesseract-OCR](https://github.com/tesseract-ocr/tesseract) command line optional arguments.
 - Sends [PIL](https://pillow.readthedocs.org/en/latest/) images to tesseract through stdin (avoids creating a temp file).
 - Works for Python 2 and 3.
 - All working code in [one file](https://github.com/Digirolamo/PILtesseract/blob/master/piltesseract/tesseractwrapper.py).
 - [MIT License](https://github.com/Digirolamo/PILtesseract/blob/master/LICENSE)
 - [Documentation](http://piltesseract.readthedocs.org/en/latest/)
 
Here is a simple example:


    >>> from PIL import Image
    >>> from piltesseract import get_text_from_image
    >>> image = Image.open('quickfox.png')
    >>> get_text_from_image(image)
    'The quick brown fox jumps over the lazy dog'

See more [advanced examples/recipes.](http://piltesseract.readthedocs.org/en/latest/recipes.html)

Requirements
------------
More detailed installation instructions can be found [here](http://piltesseract.readthedocs.org/en/latest/install.html).
 - [Tesseract-OCR](https://github.com/tesseract-ocr/tesseract): 3.03 or higher
   - First install either from source or from [binaries](https://github.com/tesseract-ocr/tesseract/wiki).
   - Ensure that the tesseract binary folder is on your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)).
 - [Pillow](https://pillow.readthedocs.org/en/latest/)
   - ```$ pip install Pillow```
 - [Six](https://pythonhosted.org/six/)
   - ```$ pip install six```

Install
------------
 
    $ pip install piltesseract


{'fraction_non_alphanumeric': 0.15052041633306645, 'fraction_numerical': 0.005070723245262877, 'mean_word_length': 3.944591029023747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, 'https://': 21, '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': '4240642', 'n_tokens_mistral': 1268, 'n_tokens_neox': 1250, 'n_words': 282}