Where people come together to learn, code, and play. Custom-built HTTP server, site generator, and website from scratch using no external libraries. Goal is to be as minimalistic and fun as possible.
http://projectdivar.com
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
454 B
17 lines
454 B
import easyocr
|
|
import sys
|
|
if len(sys.argv)==3:
|
|
if sys.argv[1]=="ja":
|
|
#print("Loading JP data...")
|
|
#print("Reading image "+sys.argv[2])
|
|
reader = easyocr.Reader(['ja','en'])
|
|
print(reader.readtext(sys.argv[2]))
|
|
else:
|
|
#print("Loading EN data...")
|
|
#print("Reading image "+sys.argv[2])
|
|
reader2 = easyocr.Reader(['en'])
|
|
print(reader2.readtext(sys.argv[2]))
|
|
else:
|
|
print("Unspecified language. Format:")
|
|
print(" runocr.py <ja|en> filename")
|
|
|
|
|