Này người xa lạ!

Còn chờ gì nữa mà không mau đăng nhập hoặc đăng ký để cùng tham gia thảo luận với cộng đồng!

tesseract.js in greasemonkey

đã sửa May 2018 trong Phát triển Chrome

I want to load and start this project via greasemonkey and using files from local example 'worker.js/eng.traineddata.gz/' but can't load can load only tesseract.js but can't make and startup working path core path

Load/Work On WebUI : http://tesseract.projectnaptha.com/
GitHub : https://github.com/naptha/tesseract.js
Issuse : https://github.com/naptha/tesseract.js/issues/217

// ==UserScript==
// @name http://tesseract.projectnaptha.com/
// @namespace http://tesseract.projectnaptha.com/
// @description http://tesseract.projectnaptha.com/
// @require https://cdn.rawgit.com/naptha/tesseract.js/1.0.10/dist/tesseract.js
// @require https://cdn.rawgit.com/naptha/tesseract.js/1.0.7/dist/worker.js
// @require https://cdn.rawgit.com/naptha/tessdata/gh-pages/3.02/eng.traineddata.gz
// @require https://cdn.rawgit.com/naptha/tesseract.js-core/0.1.0/index.js
// @include *
// @Version 1
// @grant none
// ==/UserScript==

window.Tesseract = Tesseract.create({
workerPath: 'file:///E:/Program%20Files%20(x86)/Mozilla%20Firefox/profile/profile.default/gm_scripts/tesseract.projectnaptha.com/worker.js',
langPath: 'file:///E:/Program%20Files%20(x86)/Mozilla%20Firefox/profile/profile.default/gm_scripts/tesseract.projectnaptha.com/eng.traineddata.gz',
corePath: 'file:///E:/Program%20Files%20(x86)/Mozilla%20Firefox/profile/profile.default/gm_scripts/tesseract.projectnaptha.com/index.js',
});
Tesseract.recognize('base64 IMAGE').then(function(result){
alert(result.text)
})
Đăng nhập hoặc Đăng ký để gửi bình luận.