Hi I am extracting some text from resume using coordinates . After the text extraction from OCR Pytesseract, an arrow is popping up after each time I write the text into a txt file
This is my code
import cv2
import numpy as np
import pytesseract
import threading
image = cv2.imread(r'C:\Users\Ramesh\Desktop\Parsing_Project\Resumes_jpg\Akhil\Akhil.jpg')
image = cv2.resize(image,(800,740))
kernel = np.array([[-1,-1,-1],
[-1, 9,-1],
[-1,-1,-1]])
sharpened = cv2.filter2D(image, -1, kernel)
f = open(r'C:\Users\Ramesh\Desktop\Parsing_Project\result_text.txt', "a")
def designation(image):
designation_cropped = image[65
:90, 290:600]
text = pytesseract.image_to_string(designation_cropped).replace(',', ' ')
print(text)
f.write(text + '\n' )
def skills(image):
skills_cropped = sharpened[110:210, 10:220]
text = pytesseract.image_to_string(skills_cropped).replace(',', ' ')
print(text)
f.write(text + '\n' )
f.close()
threading.Thread(target =designation(image)).start()
threading.Thread(target =skills(image)).start()
This is the snippet of the text extracted. See that an arrow is coming after each time I write text to the txt file
I want to get rid of the arrow sign . Could someone help me out ?