I have the same problem. Any Idea? Creating a new file with these 
parameters with False values and passing it (and absolute path) to 
pytesseract functions doesn't work!!!

El viernes, 11 de octubre de 2019, 10:32:12 (UTC+2), Sandra M. escribió:
>
> I'm trying to deactivate the tesseract dictionary, but I don't get it. I'm 
> using tesseract 5.0.0 and use the Python code below. I read about the 
> parameters load_system_dawg and load_freq_dawg to change them in the 
> config, but I don't know how to do this exactly. Can someone give me more 
> details how to do this?
>
>
> import pytesseract
> import argparse
> import cv2
> import os
>
> # construct the argument parse and parse the arguments
> ap = argparse.ArgumentParser()
> ap.add_argument("-i", "--image", required=True,
>     help="path to input image to be OCR'd")
> args = vars(ap.parse_args())
>
> # load the example image and convert it to grayscale
> image = cv2.imread(args["image"])
> gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
>
> # write the grayscale image to disk as a temporary file so we can
> # apply OCR to it
> filename = "{}.png".format(os.getpid())
> cv2.imwrite(filename, gray)
>
> # load the image as a PIL/Pillow image, apply OCR, and then delete
> # the temporary file
> text = pytesseract.image_to_string(gray, lang='eng', config='--psm 6')
> print("Output: " + text)
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/78701c93-46f0-4e85-aeb6-bee04a767678%40googlegroups.com.

Reply via email to