pi-ocr 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extensions/mineru.ts +1 -1
- package/extensions/pix2text.ts +9 -2
- package/package.json +1 -1
package/extensions/mineru.ts
CHANGED
|
@@ -166,7 +166,7 @@ async function mineruProcessFile(
|
|
|
166
166
|
onProgress(`${progressPrefix} uploading…`);
|
|
167
167
|
const { task_id, file_url } = await apiPost(`${BASE_URL}/parse/file`, {
|
|
168
168
|
file_name: fileName,
|
|
169
|
-
language: "
|
|
169
|
+
language: "ch", // Chinese + English (default: ch_server for better handwriting/Japanese)
|
|
170
170
|
enable_table: true,
|
|
171
171
|
enable_formula: true,
|
|
172
172
|
is_ocr: false,
|
package/extensions/pix2text.ts
CHANGED
|
@@ -46,8 +46,15 @@ def progress(payload):
|
|
|
46
46
|
|
|
47
47
|
progress({"status": "loading", "message": "Initializing Pix2Text models..."})
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
# Suppress model-loading noise on stdout during initialization
|
|
50
|
+
_real_stdout = sys.stdout
|
|
51
|
+
sys.stdout = sys.stderr
|
|
52
|
+
|
|
53
|
+
try:
|
|
54
|
+
from pix2text import Pix2Text
|
|
55
|
+
p2t = Pix2Text.from_config(enable_formula=True, enable_table=False)
|
|
56
|
+
finally:
|
|
57
|
+
sys.stdout = _real_stdout
|
|
51
58
|
|
|
52
59
|
if ext == ".pdf":
|
|
53
60
|
import fitz # PyMuPDF — already a pix2text dependency
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-ocr",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Pi extension: Zero-setup multi-backend OCR — MinerU (free cloud), Ollama (local GPU, LaTeX formulas), Pix2Text (local Python). Extract text, formulas, and tables from images and PDFs. Default: zero config, works out of the box.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|