Open nimitbhardwaj opened 5 years ago
@nimitbhardwaj, I too had this thing in mind. The image-reading is the main bottle-neck in this. I would love to implement it if you would implement or provide a small module to read image accurately that could be like img_to_code('image/path')
which returns a text output.
from PIL import Image
import pytesseract as tes
print(tes.image_to_string(Image.open('~/Desktop/maxresdefault.jpg')))
Output
ploverpython.py + (c:\proj) - GVIM
action = _Action()
last_word = last_action.word
last_glue = last_action.glue
last_attach = last_action.attach
last_capitalize = last_action.capitalize
last_lower = last_action. lower
last_orthography = last_action.orthography
meta = _get_meta(atom)
if meta is not None:
meta = _unescape_atom(meta)
1 tO ts
action.text = meta
Cv BG t-te Wo ao
action.text = meta
action.capitalize = True
action. lower = False
elif meta == META_CAPITA|
ET g Titer ee C cdi
By the way got the image online :P
seems like we could do it now. if its accuracy is >= 98%
I propose an idea which may be very useful for hacking, when we do the contest, we can hack other solutions, we need to see the code for it, and its not able to be copied just an img, so idea is to convert img to text, run the code, compare its working with our solution by some random test cases, this way it will be fine and easy to obtain cases for hack