Trên GitHub, naptha/tesseract.js-core đã đạt 192 sao, ngôn ngữ JavaScript. Emscripten port of Tesseract C++ API
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Core part of tesseract.js, which compiles original tesseract from C to JavaScript WebAssembly.
Compiling
To build tesseract-core.js by yourself, please install docker and run:
bash build-with-docker.sh
The generated files will be stored in root path. When compiling, errors sometimes occur due to race conditions (some dependencies do not appear to compile properly in parallel). Re-running generally resolves.
Structure
Build scripts are in build-scripts folder
Javascript/wrapper files are in javascript folder
All dependencies (including Tesseract) are in third_party folder
All dependencies are unmodified except for Tesseract, which uses a forked repo
The Tesseract repo has the following changes:
Modified CMakeLists.txt to build with emscripten
Modified ltrresultiterator.h and ltrresultiterator.cpp to add WordChoiceIterator class
Added src/arch_sse folder containing copy of src/arch with various changes for the SIMD builds.
Hard-coded use of the SSE function because Tesseract feature detection does not work in Webassembly and made various performance optimizations (in src/arch_sse/intsimdmatrixsse.cpp).
Modified src/arch_sse/intsimdmatrixavx2.cpp and src/arch_sse/simddetect.cpp for Relaxed SIMD build.
Commented out "Empty page!!" message in src/textord/colfind.cpp to prevent this from printing to console
Added functions for detecting page angle and applying rotation
Modified src/ccmain/thresholder.cpp, src/ccmain/thresholder.h, src/api/baseapi.cpp, and include/tesseract/baseapi.h to add exif and angle arguments for rotating images
Changed FindLines from "protected" to "public" in baseapi.h to expose to Javascript
Allows for lines (and therefore page angle) to be detected without running unnecessary steps afterwards
Added public GetGradient function to baseapi.h and baseapi.cpp for reporting page angle
Also required minor changes to src/ccmain/tesseractclass.h, src/ccmain/pagesegmain.cpp, src/textord/textord.cpp, and src/textord/textord.h
See this commit: https://github.com/Balearica/tesseract/commit/db6951f655263878f6344380a5ddb95e678d7c09
Added WriteImage function to baseapi.h and baseapi.cpp for saving images (original, grey, and binary)
Added SaveParameters and RestoreParameters functions to baseapi.h and baseapi.cpp for saving and restoring parameters
Added calls to EM_ASM_ARGS to src/ccmain/control.cpp for progress logging (and added <emscripten.h> header)
Rewrote tprintf function in src/ccutil/tprintf.cpp to force flushing
Added new version of SetImage to src/api/baseapi.cpp and include/tesseract/baseapi.h that reads image from filesystem
This was done to resolve memory leak--see this issue
Edited ParamUtils::PrintParams in src/ccutil/params.cpp to remove description text (resolves bug)
The bug was reported in this Git Issue, so we can cut this point if resolved in a future version of Tesseract
Edited src/ccmain/tessedit.cpp to save error log to separate file (/debugDev.txt)
Added JSON as an ouput format
Added src/api/jsonrenderer.cpp, modified CMakeLists.txt, include/tesseract/baseapi.h, and include/tesseract/renderer.h
Running Minimal Examples
To run the browser examples, launch a web server in the root of the repo (i.e. run http-server). Then navigate to the pages in examples/web/minimal/ in your browser.
To run the node examples, navigate to examples/node/minimal/ and then run e.g. node index.wasm.js [input_file].
The "benchmark" examples behave similarly, except that they take longer to run and report runtime instead of recognition text. All other examples are experimental and should not be expected to run.
Contribution
As we leverage git-submodule to manage dependencies, remember to add recursive when cloning the repository:
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/naptha/tesseract.js-core là nguồn chính thức.
naptha/tesseract.js-core có phải mã nguồn mở không?
Có — naptha/tesseract.js-core phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/naptha/tesseract.js-core.
naptha/tesseract.js-core có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho naptha/tesseract.js-core. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
naptha/tesseract.js-core dùng license gì?
naptha/tesseract.js-core phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
naptha/tesseract.js-core là gì?
naptha/tesseract.js-core (naptha/tesseract.js-core) là dự án JavaScript trên GitHub. Theo mô tả gốc: Emscripten port of Tesseract C++ API
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về tesseract.js-core?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về tesseract.js-core.