filens-ocr-linux-x64 0.1.0 → 0.2.0
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/README.md +27 -7
- package/THIRD-PARTY-NOTICES.md +13 -2
- package/native/libzima_ncnn_runtime_v7.so +0 -0
- package/native/licenses/pdf-unicode-rust.txt +971 -0
- package/native/licenses/yaml-v3-LICENSE.txt +50 -0
- package/native/runtime.json +24 -131
- package/native/wrapper-build.json +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
# filens Agent CLI
|
|
2
2
|
|
|
3
3
|
Read local documents and provide text and cited evidence for agents. Supports
|
|
4
|
-
Chinese/English reading intents,
|
|
4
|
+
Chinese/English reading intents, text, JSON, Markdown, HTML, YAML, XML, CSV and
|
|
5
|
+
TSV. Source layouts include PDF/OCR coordinates and logical document structure.
|
|
6
|
+
Semantic reasoning is
|
|
5
7
|
performed by the calling agent. All document parsing uses the shared WASM core.
|
|
6
8
|
|
|
7
9
|
```sh
|
|
8
10
|
# Full: native RapidOCR NCNN and models included; no Python
|
|
9
|
-
npm install -g filens
|
|
11
|
+
npm install -g filens-cli
|
|
10
12
|
filens '读取 "report.pdf",以 JSON 输出'
|
|
11
13
|
filens 'what can you do as json'
|
|
12
14
|
|
|
13
15
|
# Lite: CLI + WASM; add native OCR when needed
|
|
14
|
-
npm install -g filens-lite
|
|
16
|
+
npm install -g filens-cli-lite
|
|
15
17
|
filens setup-ocr
|
|
16
18
|
filens 'read "scan.pdf" as json'
|
|
17
19
|
```
|
|
@@ -25,21 +27,39 @@ filens '帮我理解“会议纪要.docx”,用 JSON 返回'
|
|
|
25
27
|
filens 'Please extract all text from "report.pdf" in JSON'
|
|
26
28
|
filens '识别 "invoice.png" 中的文字,以 JSON 输出'
|
|
27
29
|
filens '理解 "embedded-images.docx",以 JSON 输出'
|
|
30
|
+
filens 'read "report.docx" as markdown'
|
|
31
|
+
filens '获取 "scan.pdf" 的布局,以 YAML 输出'
|
|
32
|
+
filens layout invoice.png --format json
|
|
33
|
+
filens read data.xlsx --format csv
|
|
28
34
|
echo '{"operation":"understand","input":"report.pdf"}' | filens
|
|
29
35
|
```
|
|
30
36
|
|
|
31
37
|
Natural language recognizes a bounded set of reading intents. `understand`
|
|
32
38
|
returns source text and evidence for the calling agent; it does not generate
|
|
33
|
-
an answer. One local file per request
|
|
39
|
+
an answer. One local file per request. Summarization,
|
|
34
40
|
translation, questions, field extraction, page selection, URL fetching and file
|
|
35
|
-
conversion are not implemented by this CLI. Some unsupported phrasings fall
|
|
41
|
+
conversion to Office/PDF are not implemented by this CLI. Some unsupported phrasings fall
|
|
36
42
|
back to reading the whole file: “only the first page” still reads all pages,
|
|
37
|
-
“only list amounts” still returns all text
|
|
43
|
+
“only list amounts” still returns all text.
|
|
38
44
|
Use the JSON request schema or explicit `--format` when strict validation is
|
|
39
45
|
required. Quote file paths inside natural-language sentences.
|
|
40
46
|
|
|
47
|
+
JSON/YAML/XML preserve the full response protocol. Markdown/HTML export document
|
|
48
|
+
content with headings and tables; `--layout` adds a metadata appendix. CSV/TSV
|
|
49
|
+
export a single table as rows, or layout blocks as records when `--layout` is
|
|
50
|
+
requested. `layout` defaults to JSON. PDF coordinates use points and a top-left
|
|
51
|
+
origin; image OCR uses orientation-corrected pixels. Embedded-image coordinates
|
|
52
|
+
are local to each image. Flow documents expose logical structure, without
|
|
53
|
+
invented page positions. Detection scores do not measure transcription accuracy.
|
|
54
|
+
|
|
41
55
|
OCR output may contain errors, including stray text detected in landscape
|
|
42
56
|
photos. `ok=true` means extraction completed; it does not measure OCR accuracy.
|
|
57
|
+
|
|
58
|
+
Supported PDF ToUnicode errors are repaired per font in the shared WASM core;
|
|
59
|
+
unusable text mappings can require OCR even with a nonempty text layer. Missing
|
|
60
|
+
fonts and incorrect rendering may still make numeric tables unreliable.
|
|
61
|
+
JSON responses contain local source paths and document text; redact them before
|
|
62
|
+
sharing. Private evaluation inputs and raw reports are excluded from packages.
|
|
43
63
|
EXIF orientation is applied, while a physically inverted image may still have
|
|
44
64
|
its text lines returned in reversed order.
|
|
45
65
|
|
|
@@ -61,4 +81,4 @@ one profile at a time. Platform packages are implementation components.
|
|
|
61
81
|
[Protocol, limitations and source build](https://github.com/IceWhaleTech/filens/blob/main/docs/agent-cli.md)
|
|
62
82
|
|
|
63
83
|
Locally built release tarballs can also be installed with
|
|
64
|
-
`npm install -g /path/to/filens-0.
|
|
84
|
+
`npm install -g /path/to/filens-cli-0.2.0.tgz /path/to/filens-cli-PLATFORM-0.2.0.tgz /path/to/filens-ocr-PLATFORM-0.2.0.tgz`.
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -20,8 +20,19 @@
|
|
|
20
20
|
|
|
21
21
|
The Go host and native wrapper also contain Go, purego, wazero, imaging,
|
|
22
22
|
gotokenizers, regexp2, protobuf and Go x/image/x/text components. Their notices
|
|
23
|
-
are included in the package license directory.
|
|
24
|
-
pinned published source snapshot with
|
|
23
|
+
are included in the package license directory. All wrappers are rebuilt from the
|
|
24
|
+
pinned published source snapshot with Go -trimpath. The macOS target is 12.0;
|
|
25
|
+
Linux wrappers use Zig's glibc 2.17 target. wrapper-build.json records the
|
|
26
|
+
source and rebuilt artifact hashes without workstation paths.
|
|
27
|
+
|
|
28
|
+
The shared text WASM core uses lopdf 0.46.0 (MIT), ttf-parser 0.25.1
|
|
29
|
+
(MIT OR Apache-2.0), and unicode-normalization 0.1.26
|
|
30
|
+
((MIT OR Apache-2.0) AND Unicode-3.0) for PDF font mapping recovery.
|
|
31
|
+
Their notices and those of the added transitive Rust components are included
|
|
32
|
+
in the package license directory as pdf-unicode-rust.txt.
|
|
33
|
+
|
|
34
|
+
Agent response YAML serialization uses go.yaml.in/yaml/v3 v3.0.4, with MIT
|
|
35
|
+
and Apache-2.0 components. Its notice is included as yaml-v3-LICENSE.txt.
|
|
25
36
|
|
|
26
37
|
This notice describes third-party components and does not grant a new license
|
|
27
38
|
for filens or the Photos application code.
|
|
Binary file
|