<jupyter_start><jupyter_text><jupyter_code>pip install easyocr

import matplotlib.pyplot as plt
import cv2
import easyocr
from pylab import rcParams
from IPython.display import Image
rcParams['figure.figsize'] = 8,16
reader = easyocr.Reader(['hi'])
filename = "/h2.png"
Image(filename)
output = reader.readtext(filename)
output
cord = output[0][0]
x_min, y_min = [int(min(idx)) for idx in zip(*cord)]
x_max, y_max = [int(max(idx)) for idx in zip(*cord)]
image = cv2.imread(filename)
cv2.rectangle(image,(x_min,y_min),(x_max,y_max),(255,0,0),1)
plt.imshow(cv2.cvtColor(image, cv2.COLOR_BGR2RGB))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15064102564102563, 'fraction_numerical': 0.028846153846153848, 'mean_word_length': 7.802816901408451, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '191063', 'license': 'MIT', 'n_tokens_mistral': 256, 'n_tokens_neox': 247, 'n_words': 50, 'path': 'Hindi_OCR.ipynb', 'repo_name': 'dhyani21/Hindi-OCR', 'size': '624'}