xberg 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.
- checksums.yaml +4 -4
- data/ext/xberg_rb/native/Cargo.lock +67 -21
- data/ext/xberg_rb/native/Cargo.toml +18 -6
- data/ext/xberg_rb/src/lib.rs +215 -7
- data/lib/xberg/native.rb +14 -6
- data/lib/xberg/version.rb +2 -2
- data/sig/types.rbs +16 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7dc92c33387f8c104dc35442acb6b524e50ec1d505778458efbf5d000b96d6fe
|
|
4
|
+
data.tar.gz: 71f22c054071c092d6ac931726185e3045e6dd1cc2a210b5da52c3fcd4a4156e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa897709688e7f2f5d1cc515549daa00c4a7ae4c90e74d0f29a775888349a9266ccdf64d36cacadb3192881465fc55cbdf576531203bddef42722a314c3d6a7b
|
|
7
|
+
data.tar.gz: ba9b07d78f372cfbec36377e699e2cd79f512551e9a2d313bd31d639d4caff5cf80c31d4c5c6a59a10cdb6e92d924d673cdcbb6579e5e4bcbd5b186c7fd33ae7
|
|
@@ -1501,6 +1501,12 @@ version = "0.8.7"
|
|
|
1501
1501
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1502
1502
|
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
1503
1503
|
|
|
1504
|
+
[[package]]
|
|
1505
|
+
name = "core_detect"
|
|
1506
|
+
version = "1.0.0"
|
|
1507
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1508
|
+
checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48"
|
|
1509
|
+
|
|
1504
1510
|
[[package]]
|
|
1505
1511
|
name = "core_maths"
|
|
1506
1512
|
version = "0.1.1"
|
|
@@ -2027,11 +2033,17 @@ dependencies = [
|
|
|
2027
2033
|
|
|
2028
2034
|
[[package]]
|
|
2029
2035
|
name = "encoding_rs"
|
|
2030
|
-
version = "0.8.
|
|
2036
|
+
version = "0.8.40"
|
|
2031
2037
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2032
|
-
checksum = "
|
|
2038
|
+
checksum = "2a7a45518d2863d18aa47f4a0cf9faec2aa4304cc09df5e41299f276b3ad135e"
|
|
2033
2039
|
dependencies = [
|
|
2034
2040
|
"cfg-if 1.0.4",
|
|
2041
|
+
"core_detect",
|
|
2042
|
+
"multiversion",
|
|
2043
|
+
"multiversion_no_op",
|
|
2044
|
+
"rustversion",
|
|
2045
|
+
"scopeguard",
|
|
2046
|
+
"simdutf8",
|
|
2035
2047
|
]
|
|
2036
2048
|
|
|
2037
2049
|
[[package]]
|
|
@@ -4545,6 +4557,34 @@ dependencies = [
|
|
|
4545
4557
|
"version_check",
|
|
4546
4558
|
]
|
|
4547
4559
|
|
|
4560
|
+
[[package]]
|
|
4561
|
+
name = "multiversion"
|
|
4562
|
+
version = "0.8.0"
|
|
4563
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4564
|
+
checksum = "7edb7f0ff51249dfda9ab96b5823695e15a052dc15074c9dbf3d118afaf2c201"
|
|
4565
|
+
dependencies = [
|
|
4566
|
+
"multiversion-macros",
|
|
4567
|
+
"target-features",
|
|
4568
|
+
]
|
|
4569
|
+
|
|
4570
|
+
[[package]]
|
|
4571
|
+
name = "multiversion-macros"
|
|
4572
|
+
version = "0.8.0"
|
|
4573
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4574
|
+
checksum = "b093064383341eb3271f42e381cb8f10a01459478446953953c75d24bd339fc0"
|
|
4575
|
+
dependencies = [
|
|
4576
|
+
"proc-macro2",
|
|
4577
|
+
"quote",
|
|
4578
|
+
"syn 2.0.119",
|
|
4579
|
+
"target-features",
|
|
4580
|
+
]
|
|
4581
|
+
|
|
4582
|
+
[[package]]
|
|
4583
|
+
name = "multiversion_no_op"
|
|
4584
|
+
version = "1.0.0"
|
|
4585
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4586
|
+
checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d"
|
|
4587
|
+
|
|
4548
4588
|
[[package]]
|
|
4549
4589
|
name = "nalgebra"
|
|
4550
4590
|
version = "0.35.0"
|
|
@@ -4674,9 +4714,9 @@ dependencies = [
|
|
|
4674
4714
|
|
|
4675
4715
|
[[package]]
|
|
4676
4716
|
name = "nom-exif"
|
|
4677
|
-
version = "3.
|
|
4717
|
+
version = "3.8.0"
|
|
4678
4718
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4679
|
-
checksum = "
|
|
4719
|
+
checksum = "3217a90c724aa7c99f53b2fc7eec37b63e3e9aa1801ebe031dee75234d9c8339"
|
|
4680
4720
|
dependencies = [
|
|
4681
4721
|
"bytes",
|
|
4682
4722
|
"chrono",
|
|
@@ -7458,6 +7498,12 @@ dependencies = [
|
|
|
7458
7498
|
"xattr",
|
|
7459
7499
|
]
|
|
7460
7500
|
|
|
7501
|
+
[[package]]
|
|
7502
|
+
name = "target-features"
|
|
7503
|
+
version = "0.1.6"
|
|
7504
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
7505
|
+
checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5"
|
|
7506
|
+
|
|
7461
7507
|
[[package]]
|
|
7462
7508
|
name = "target-lexicon"
|
|
7463
7509
|
version = "0.13.5"
|
|
@@ -9213,9 +9259,9 @@ dependencies = [
|
|
|
9213
9259
|
|
|
9214
9260
|
[[package]]
|
|
9215
9261
|
name = "xberg"
|
|
9216
|
-
version = "1.1.
|
|
9262
|
+
version = "1.1.3"
|
|
9217
9263
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9218
|
-
checksum = "
|
|
9264
|
+
checksum = "b5ceb984af8471cb7d367eba18d687f2fe86f9dc2afa54214bc099b0e3aaa392"
|
|
9219
9265
|
dependencies = [
|
|
9220
9266
|
"aes-gcm",
|
|
9221
9267
|
"ahash",
|
|
@@ -9350,9 +9396,9 @@ dependencies = [
|
|
|
9350
9396
|
|
|
9351
9397
|
[[package]]
|
|
9352
9398
|
name = "xberg-candle-ocr"
|
|
9353
|
-
version = "1.1.
|
|
9399
|
+
version = "1.1.3"
|
|
9354
9400
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9355
|
-
checksum = "
|
|
9401
|
+
checksum = "ff0dd685c5fb93f4bd22f6867409410e5652ddc657cef59b8e64152a3c4e1d36"
|
|
9356
9402
|
dependencies = [
|
|
9357
9403
|
"base64 0.23.1",
|
|
9358
9404
|
"candle-core",
|
|
@@ -9372,9 +9418,9 @@ dependencies = [
|
|
|
9372
9418
|
|
|
9373
9419
|
[[package]]
|
|
9374
9420
|
name = "xberg-gliner"
|
|
9375
|
-
version = "1.1.
|
|
9421
|
+
version = "1.1.3"
|
|
9376
9422
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9377
|
-
checksum = "
|
|
9423
|
+
checksum = "cce382640b642185dab50b6d7029183cf12f8500c66887e8ccb76150d68a2fb2"
|
|
9378
9424
|
dependencies = [
|
|
9379
9425
|
"getrandom 0.2.17",
|
|
9380
9426
|
"getrandom 0.3.4",
|
|
@@ -9388,9 +9434,9 @@ dependencies = [
|
|
|
9388
9434
|
|
|
9389
9435
|
[[package]]
|
|
9390
9436
|
name = "xberg-libheif"
|
|
9391
|
-
version = "1.1.
|
|
9437
|
+
version = "1.1.3"
|
|
9392
9438
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9393
|
-
checksum = "
|
|
9439
|
+
checksum = "eb7aa698d6ea5f9ef36a0e7f32653b8d57c21e738beb964ba3646c1a4f8150bb"
|
|
9394
9440
|
dependencies = [
|
|
9395
9441
|
"cfg-if 1.0.4",
|
|
9396
9442
|
"enumn",
|
|
@@ -9401,9 +9447,9 @@ dependencies = [
|
|
|
9401
9447
|
|
|
9402
9448
|
[[package]]
|
|
9403
9449
|
name = "xberg-libwpd"
|
|
9404
|
-
version = "1.1.
|
|
9450
|
+
version = "1.1.3"
|
|
9405
9451
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9406
|
-
checksum = "
|
|
9452
|
+
checksum = "1f01a67c7b74aa18d5850f50d2869888873a493741f188c66ed93b97ca91ebce"
|
|
9407
9453
|
dependencies = [
|
|
9408
9454
|
"cc",
|
|
9409
9455
|
"flate2",
|
|
@@ -9416,9 +9462,9 @@ dependencies = [
|
|
|
9416
9462
|
|
|
9417
9463
|
[[package]]
|
|
9418
9464
|
name = "xberg-native-pdf"
|
|
9419
|
-
version = "1.1.
|
|
9465
|
+
version = "1.1.3"
|
|
9420
9466
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9421
|
-
checksum = "
|
|
9467
|
+
checksum = "3d2beb4d548a67f0c110a081ebdf9b61e58d4e82e02cdf53bea5a7e8cfcf3c64"
|
|
9422
9468
|
dependencies = [
|
|
9423
9469
|
"aes 0.9.3",
|
|
9424
9470
|
"base64 0.23.1",
|
|
@@ -9463,9 +9509,9 @@ dependencies = [
|
|
|
9463
9509
|
|
|
9464
9510
|
[[package]]
|
|
9465
9511
|
name = "xberg-paddle-ocr"
|
|
9466
|
-
version = "1.1.
|
|
9512
|
+
version = "1.1.3"
|
|
9467
9513
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9468
|
-
checksum = "
|
|
9514
|
+
checksum = "1cc1aaf00d7895a9d613c0f1e176faaccefc43d4ef9c0c3e5886df9381d3f771"
|
|
9469
9515
|
dependencies = [
|
|
9470
9516
|
"geo-clipper",
|
|
9471
9517
|
"geo-types",
|
|
@@ -9480,7 +9526,7 @@ dependencies = [
|
|
|
9480
9526
|
|
|
9481
9527
|
[[package]]
|
|
9482
9528
|
name = "xberg-rb"
|
|
9483
|
-
version = "1.1.
|
|
9529
|
+
version = "1.1.3"
|
|
9484
9530
|
dependencies = [
|
|
9485
9531
|
"async-trait",
|
|
9486
9532
|
"crawlberg",
|
|
@@ -9496,9 +9542,9 @@ dependencies = [
|
|
|
9496
9542
|
|
|
9497
9543
|
[[package]]
|
|
9498
9544
|
name = "xberg-tesseract"
|
|
9499
|
-
version = "1.1.
|
|
9545
|
+
version = "1.1.3"
|
|
9500
9546
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9501
|
-
checksum = "
|
|
9547
|
+
checksum = "c259d98976ae7e5f06867e595bc41a3cda5335e9ea63cbae8d9028c94181fd7e"
|
|
9502
9548
|
dependencies = [
|
|
9503
9549
|
"cc",
|
|
9504
9550
|
"cmake",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:6d69d48379ade66e534af835b520570ab6397625974dfe2112b3d5d87f3da54a
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
6
6
|
[package]
|
|
7
7
|
name = "xberg-rb"
|
|
8
|
-
version = "1.1.
|
|
8
|
+
version = "1.1.3"
|
|
9
9
|
edition = "2024"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
description = "High-performance document intelligence library"
|
|
@@ -22,15 +22,19 @@ path = "../src/lib.rs"
|
|
|
22
22
|
crate-type = ["cdylib"]
|
|
23
23
|
|
|
24
24
|
[features]
|
|
25
|
-
default = ["api", "api-types", "auto-rotate-types", "candle-ocr", "chunking-tokenizers", "classification", "diff", "embedding-presets", "heuristics", "html", "keywords-rake", "keywords-yake", "late-interaction", "late-interaction-presets", "layout-types", "markdown-footnotes", "ocr", "ocr-wasm", "office", "paddle-ocr-types", "pdf", "presets", "quality", "redaction", "reranker", "reranker-presets", "sparse-embedding-presets", "svg", "transcription-types", "tree-sitter", "url-config-types", "url-ingestion", "xml"]
|
|
25
|
+
default = ["api", "api-types", "auto-rotate-types", "candle-ocr", "captioning", "chunking", "chunking-tokenizers", "classification", "diff", "embedding-presets", "embeddings", "formula-recognition", "heuristics", "html", "keywords-rake", "keywords-yake", "late-interaction", "late-interaction-presets", "layout-types", "liter-llm", "markdown-footnotes", "mcp", "mcp-http", "ner-onnx", "ocr", "ocr-wasm", "office", "paddle-ocr-types", "pdf", "presets", "quality", "redaction", "redaction-rehydrate", "reranker", "reranker-presets", "sparse-embedding-presets", "sparse-embeddings", "svg", "tokio-runtime", "transcription", "transcription-types", "tree-sitter", "url-config-types", "url-ingestion", "xml"]
|
|
26
26
|
api = ["xberg/api"]
|
|
27
27
|
api-types = ["xberg/api-types"]
|
|
28
28
|
auto-rotate-types = ["xberg/auto-rotate-types"]
|
|
29
29
|
candle-ocr = ["xberg/candle-ocr"]
|
|
30
|
+
captioning = ["xberg/captioning"]
|
|
31
|
+
chunking = ["xberg/chunking"]
|
|
30
32
|
chunking-tokenizers = ["xberg/chunking-tokenizers"]
|
|
31
33
|
classification = ["xberg/classification"]
|
|
32
34
|
diff = ["xberg/diff"]
|
|
33
35
|
embedding-presets = ["xberg/embedding-presets"]
|
|
36
|
+
embeddings = ["xberg/embeddings"]
|
|
37
|
+
formula-recognition = ["xberg/formula-recognition"]
|
|
34
38
|
heic = ["xberg/heic"]
|
|
35
39
|
heuristics = ["xberg/heuristics"]
|
|
36
40
|
html = ["xberg/html"]
|
|
@@ -39,7 +43,11 @@ keywords-yake = ["xberg/keywords-yake"]
|
|
|
39
43
|
late-interaction = ["xberg/late-interaction"]
|
|
40
44
|
late-interaction-presets = ["xberg/late-interaction-presets"]
|
|
41
45
|
layout-types = ["xberg/layout-types"]
|
|
46
|
+
liter-llm = ["xberg/liter-llm"]
|
|
42
47
|
markdown-footnotes = ["xberg/markdown-footnotes"]
|
|
48
|
+
mcp = ["xberg/mcp"]
|
|
49
|
+
mcp-http = ["xberg/mcp-http"]
|
|
50
|
+
ner-onnx = ["xberg/ner-onnx"]
|
|
43
51
|
ocr = ["xberg/ocr"]
|
|
44
52
|
ocr-wasm = ["xberg/ocr-wasm"]
|
|
45
53
|
office = ["xberg/office"]
|
|
@@ -48,10 +56,14 @@ pdf = ["xberg/pdf"]
|
|
|
48
56
|
presets = ["xberg/presets"]
|
|
49
57
|
quality = ["xberg/quality"]
|
|
50
58
|
redaction = ["xberg/redaction"]
|
|
59
|
+
redaction-rehydrate = ["xberg/redaction-rehydrate"]
|
|
51
60
|
reranker = ["xberg/reranker"]
|
|
52
61
|
reranker-presets = ["xberg/reranker-presets"]
|
|
53
62
|
sparse-embedding-presets = ["xberg/sparse-embedding-presets"]
|
|
63
|
+
sparse-embeddings = ["xberg/sparse-embeddings"]
|
|
54
64
|
svg = ["xberg/svg"]
|
|
65
|
+
tokio-runtime = ["xberg/tokio-runtime"]
|
|
66
|
+
transcription = ["xberg/transcription"]
|
|
55
67
|
transcription-types = ["xberg/transcription-types"]
|
|
56
68
|
tree-sitter = ["xberg/tree-sitter"]
|
|
57
69
|
url-config-types = ["xberg/url-config-types"]
|
|
@@ -70,13 +82,13 @@ tokio = { version = "1", features = ["rt-multi-thread"] }
|
|
|
70
82
|
tracing = "0.1"
|
|
71
83
|
|
|
72
84
|
[target.'cfg(all(target_os = "macos", target_arch = "x86_64"))'.dependencies]
|
|
73
|
-
xberg = { version = "1.1.
|
|
85
|
+
xberg = { version = "1.1.3", default-features = false, features = ["macos-intel-target", "simd-utf8"] }
|
|
74
86
|
|
|
75
87
|
[target.'cfg(not(any(target_os = "windows", all(target_os = "macos", target_arch = "x86_64"))))'.dependencies]
|
|
76
|
-
xberg = { version = "1.1.
|
|
88
|
+
xberg = { version = "1.1.3", features = ["full", "pdf", "ocr", "paddle-ocr", "paddle-ocr-types", "layout-detection", "layout-types", "embeddings", "embedding-presets", "reranker", "reranker-presets", "sparse-embeddings", "sparse-embedding-presets", "late-interaction", "late-interaction-presets", "chunking", "keywords-yake", "keywords-rake", "language-detection", "html", "tree-sitter", "office", "email", "archives", "stopwords", "auto-rotate", "auto-rotate-types", "tokio-runtime", "api", "api-types", "mcp", "liter-llm", "quality", "svg", "transcription", "transcription-types", "classification", "captioning", "ner-onnx", "ner-llm", "diff", "markdown-footnotes", "redaction", "enrichment", "heuristics", "presets", "structured", "url-ingestion"] }
|
|
77
89
|
|
|
78
90
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
79
|
-
xberg = { version = "1.1.
|
|
91
|
+
xberg = { version = "1.1.3", default-features = false, features = ["windows-gnu-target", "simd-utf8"] }
|
|
80
92
|
|
|
81
93
|
# This crate deliberately does not use `[lints]` / `workspace = true`: its C-ABI /
|
|
82
94
|
# PyO3 / napi / ext-php-rs / NIF boundary requires `unsafe` code, and the workspace's
|
data/ext/xberg_rb/src/lib.rs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:2708601d3a9f5bb14721ff6d8e7d75689d9ac6f2bb7902b241a407e9a9951ff6
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -14755,6 +14755,8 @@ pub struct GridCell {
|
|
|
14755
14755
|
col_span: u32,
|
|
14756
14756
|
is_header: bool,
|
|
14757
14757
|
bbox: Option<BoundingBox>,
|
|
14758
|
+
heading_level: Option<u8>,
|
|
14759
|
+
style_name: Option<String>,
|
|
14758
14760
|
}
|
|
14759
14761
|
|
|
14760
14762
|
unsafe impl IntoValueFromNative for GridCell {}
|
|
@@ -14803,6 +14805,8 @@ impl Default for GridCell {
|
|
|
14803
14805
|
col_span: 1,
|
|
14804
14806
|
is_header: false,
|
|
14805
14807
|
bbox: None,
|
|
14808
|
+
heading_level: None,
|
|
14809
|
+
style_name: None,
|
|
14806
14810
|
}
|
|
14807
14811
|
}
|
|
14808
14812
|
}
|
|
@@ -14877,6 +14881,24 @@ impl GridCell {
|
|
|
14877
14881
|
})?),
|
|
14878
14882
|
None => None,
|
|
14879
14883
|
},
|
|
14884
|
+
heading_level: match kwargs.get(ruby.to_symbol("heading_level")) {
|
|
14885
|
+
Some(v) => Some(u8::try_convert(v).map_err(|e| {
|
|
14886
|
+
magnus::Error::new(
|
|
14887
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
14888
|
+
format!("invalid value for `heading_level`: {}", e),
|
|
14889
|
+
)
|
|
14890
|
+
})?),
|
|
14891
|
+
None => None,
|
|
14892
|
+
},
|
|
14893
|
+
style_name: match kwargs.get(ruby.to_symbol("style_name")) {
|
|
14894
|
+
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
14895
|
+
magnus::Error::new(
|
|
14896
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
14897
|
+
format!("invalid value for `style_name`: {}", e),
|
|
14898
|
+
)
|
|
14899
|
+
})?),
|
|
14900
|
+
None => None,
|
|
14901
|
+
},
|
|
14880
14902
|
})
|
|
14881
14903
|
}
|
|
14882
14904
|
|
|
@@ -14908,6 +14930,14 @@ impl GridCell {
|
|
|
14908
14930
|
self.bbox.clone()
|
|
14909
14931
|
}
|
|
14910
14932
|
|
|
14933
|
+
fn heading_level(&self) -> Option<u8> {
|
|
14934
|
+
self.heading_level
|
|
14935
|
+
}
|
|
14936
|
+
|
|
14937
|
+
fn style_name(&self) -> Option<String> {
|
|
14938
|
+
self.style_name.clone()
|
|
14939
|
+
}
|
|
14940
|
+
|
|
14911
14941
|
#[allow(clippy::should_implement_trait)]
|
|
14912
14942
|
fn to_s(&self) -> String {
|
|
14913
14943
|
self.content.clone()
|
|
@@ -31696,6 +31726,7 @@ pub struct Table {
|
|
|
31696
31726
|
page_number: u32,
|
|
31697
31727
|
bounding_box: Option<BoundingBox>,
|
|
31698
31728
|
table_id: Option<String>,
|
|
31729
|
+
cell_styles: Vec<TableCellStyle>,
|
|
31699
31730
|
columns: Option<Vec<String>>,
|
|
31700
31731
|
}
|
|
31701
31732
|
|
|
@@ -31793,6 +31824,15 @@ impl Table {
|
|
|
31793
31824
|
})?),
|
|
31794
31825
|
None => None,
|
|
31795
31826
|
},
|
|
31827
|
+
cell_styles: match kwargs.get(ruby.to_symbol("cell_styles")) {
|
|
31828
|
+
Some(v) => <Vec<TableCellStyle>>::try_convert(v).map_err(|e| {
|
|
31829
|
+
magnus::Error::new(
|
|
31830
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
31831
|
+
format!("invalid value for `cell_styles`: {}", e),
|
|
31832
|
+
)
|
|
31833
|
+
})?,
|
|
31834
|
+
None => Default::default(),
|
|
31835
|
+
},
|
|
31796
31836
|
columns: match kwargs.get(ruby.to_symbol("columns")) {
|
|
31797
31837
|
Some(v) => Some(<Vec<String>>::try_convert(v).map_err(|e| {
|
|
31798
31838
|
magnus::Error::new(
|
|
@@ -31825,6 +31865,10 @@ impl Table {
|
|
|
31825
31865
|
self.table_id.clone()
|
|
31826
31866
|
}
|
|
31827
31867
|
|
|
31868
|
+
fn cell_styles(&self) -> Vec<TableCellStyle> {
|
|
31869
|
+
self.cell_styles.clone()
|
|
31870
|
+
}
|
|
31871
|
+
|
|
31828
31872
|
fn columns(&self) -> Option<Vec<String>> {
|
|
31829
31873
|
self.columns.clone()
|
|
31830
31874
|
}
|
|
@@ -31950,6 +31994,121 @@ impl TableCell {
|
|
|
31950
31994
|
}
|
|
31951
31995
|
}
|
|
31952
31996
|
|
|
31997
|
+
#[derive(Clone, Debug, serde::Serialize)]
|
|
31998
|
+
#[serde(default)]
|
|
31999
|
+
#[magnus::wrap(class = "Xberg::TableCellStyle")]
|
|
32000
|
+
pub struct TableCellStyle {
|
|
32001
|
+
row: u32,
|
|
32002
|
+
col: u32,
|
|
32003
|
+
heading_level: Option<u8>,
|
|
32004
|
+
style_name: Option<String>,
|
|
32005
|
+
}
|
|
32006
|
+
|
|
32007
|
+
unsafe impl IntoValueFromNative for TableCellStyle {}
|
|
32008
|
+
|
|
32009
|
+
impl magnus::TryConvert for TableCellStyle {
|
|
32010
|
+
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
32011
|
+
if let Ok(r) = <&TableCellStyle as magnus::TryConvert>::try_convert(val) {
|
|
32012
|
+
return Ok(r.clone());
|
|
32013
|
+
}
|
|
32014
|
+
let json_str: String = if let Ok(s) = <String as magnus::TryConvert>::try_convert(val) {
|
|
32015
|
+
s
|
|
32016
|
+
} else {
|
|
32017
|
+
val.funcall::<_, _, String>("to_json", ()).map_err(|e| {
|
|
32018
|
+
magnus::Error::new(
|
|
32019
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
32020
|
+
format!("no implicit conversion into TableCellStyle: {}", e),
|
|
32021
|
+
)
|
|
32022
|
+
})?
|
|
32023
|
+
};
|
|
32024
|
+
serde_json::from_str::<TableCellStyle>(&json_str).map_err(|e| {
|
|
32025
|
+
magnus::Error::new(
|
|
32026
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
32027
|
+
format!("failed to deserialize TableCellStyle: {}", e),
|
|
32028
|
+
)
|
|
32029
|
+
})
|
|
32030
|
+
}
|
|
32031
|
+
}
|
|
32032
|
+
|
|
32033
|
+
unsafe impl TryConvertOwned for TableCellStyle {}
|
|
32034
|
+
impl<'de> serde::Deserialize<'de> for TableCellStyle {
|
|
32035
|
+
fn deserialize<D>(deserializer: D) -> ::core::result::Result<Self, D::Error>
|
|
32036
|
+
where
|
|
32037
|
+
D: serde::Deserializer<'de>,
|
|
32038
|
+
{
|
|
32039
|
+
<xberg::TableCellStyle as serde::Deserialize>::deserialize(deserializer).map(Into::into)
|
|
32040
|
+
}
|
|
32041
|
+
}
|
|
32042
|
+
|
|
32043
|
+
impl Default for TableCellStyle {
|
|
32044
|
+
fn default() -> Self {
|
|
32045
|
+
xberg::TableCellStyle::default().into()
|
|
32046
|
+
}
|
|
32047
|
+
}
|
|
32048
|
+
|
|
32049
|
+
impl TableCellStyle {
|
|
32050
|
+
fn new(args: &[magnus::Value]) -> Result<Self, magnus::Error> {
|
|
32051
|
+
let ruby = unsafe { magnus::Ruby::get_unchecked() };
|
|
32052
|
+
let args = magnus::scan_args::scan_args::<(), (Option<magnus::RHash>,), (), (), (), ()>(args)?;
|
|
32053
|
+
let (kwargs_opt,) = args.optional;
|
|
32054
|
+
let kwargs = kwargs_opt.unwrap_or_else(|| ruby.hash_new());
|
|
32055
|
+
Ok(Self {
|
|
32056
|
+
row: match kwargs.get(ruby.to_symbol("row")) {
|
|
32057
|
+
Some(v) => u32::try_convert(v).map_err(|e| {
|
|
32058
|
+
magnus::Error::new(
|
|
32059
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
32060
|
+
format!("invalid value for `row`: {}", e),
|
|
32061
|
+
)
|
|
32062
|
+
})?,
|
|
32063
|
+
None => Default::default(),
|
|
32064
|
+
},
|
|
32065
|
+
col: match kwargs.get(ruby.to_symbol("col")) {
|
|
32066
|
+
Some(v) => u32::try_convert(v).map_err(|e| {
|
|
32067
|
+
magnus::Error::new(
|
|
32068
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
32069
|
+
format!("invalid value for `col`: {}", e),
|
|
32070
|
+
)
|
|
32071
|
+
})?,
|
|
32072
|
+
None => Default::default(),
|
|
32073
|
+
},
|
|
32074
|
+
heading_level: match kwargs.get(ruby.to_symbol("heading_level")) {
|
|
32075
|
+
Some(v) => Some(u8::try_convert(v).map_err(|e| {
|
|
32076
|
+
magnus::Error::new(
|
|
32077
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
32078
|
+
format!("invalid value for `heading_level`: {}", e),
|
|
32079
|
+
)
|
|
32080
|
+
})?),
|
|
32081
|
+
None => None,
|
|
32082
|
+
},
|
|
32083
|
+
style_name: match kwargs.get(ruby.to_symbol("style_name")) {
|
|
32084
|
+
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
32085
|
+
magnus::Error::new(
|
|
32086
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
32087
|
+
format!("invalid value for `style_name`: {}", e),
|
|
32088
|
+
)
|
|
32089
|
+
})?),
|
|
32090
|
+
None => None,
|
|
32091
|
+
},
|
|
32092
|
+
})
|
|
32093
|
+
}
|
|
32094
|
+
|
|
32095
|
+
fn row(&self) -> u32 {
|
|
32096
|
+
self.row
|
|
32097
|
+
}
|
|
32098
|
+
|
|
32099
|
+
fn col(&self) -> u32 {
|
|
32100
|
+
self.col
|
|
32101
|
+
}
|
|
32102
|
+
|
|
32103
|
+
fn heading_level(&self) -> Option<u8> {
|
|
32104
|
+
self.heading_level
|
|
32105
|
+
}
|
|
32106
|
+
|
|
32107
|
+
fn style_name(&self) -> Option<String> {
|
|
32108
|
+
self.style_name.clone()
|
|
32109
|
+
}
|
|
32110
|
+
}
|
|
32111
|
+
|
|
31953
32112
|
#[cfg(feature = "diff")]
|
|
31954
32113
|
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
|
31955
32114
|
#[magnus::wrap(class = "Xberg::TableDiff")]
|
|
@@ -32141,7 +32300,7 @@ impl TableGrid {
|
|
|
32141
32300
|
#[magnus::wrap(class = "Xberg::TesseractConfig")]
|
|
32142
32301
|
pub struct TesseractConfig {
|
|
32143
32302
|
language: Vec<String>,
|
|
32144
|
-
psm: i32
|
|
32303
|
+
psm: Option<i32>,
|
|
32145
32304
|
output_format: String,
|
|
32146
32305
|
oem: i32,
|
|
32147
32306
|
min_confidence: f64,
|
|
@@ -32222,13 +32381,13 @@ impl TesseractConfig {
|
|
|
32222
32381
|
None => vec!["eng".to_string()],
|
|
32223
32382
|
},
|
|
32224
32383
|
psm: match kwargs.get(ruby.to_symbol("psm")) {
|
|
32225
|
-
Some(v) => i32::try_convert(v).map_err(|e| {
|
|
32384
|
+
Some(v) => Some(i32::try_convert(v).map_err(|e| {
|
|
32226
32385
|
magnus::Error::new(
|
|
32227
32386
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
32228
32387
|
format!("invalid value for `psm`: {}", e),
|
|
32229
32388
|
)
|
|
32230
|
-
})
|
|
32231
|
-
None =>
|
|
32389
|
+
})?),
|
|
32390
|
+
None => None,
|
|
32232
32391
|
},
|
|
32233
32392
|
output_format: match kwargs.get(ruby.to_symbol("output_format")) {
|
|
32234
32393
|
Some(v) => String::try_convert(v).map_err(|e| {
|
|
@@ -32408,7 +32567,7 @@ impl TesseractConfig {
|
|
|
32408
32567
|
self.language.clone()
|
|
32409
32568
|
}
|
|
32410
32569
|
|
|
32411
|
-
fn psm(&self) -> i32 {
|
|
32570
|
+
fn psm(&self) -> Option<i32> {
|
|
32412
32571
|
self.psm
|
|
32413
32572
|
}
|
|
32414
32573
|
|
|
@@ -47907,11 +48066,13 @@ impl From<GridCell> for xberg::GridCell {
|
|
|
47907
48066
|
col_span: val.col_span,
|
|
47908
48067
|
is_header: val.is_header,
|
|
47909
48068
|
bbox: val.bbox.map(Into::into),
|
|
48069
|
+
heading_level: val.heading_level,
|
|
48070
|
+
style_name: val.style_name,
|
|
47910
48071
|
}
|
|
47911
48072
|
}
|
|
47912
48073
|
}
|
|
47913
48074
|
|
|
47914
|
-
#[allow(clippy::useless_conversion)]
|
|
48075
|
+
#[allow(clippy::redundant_closure, clippy::useless_conversion)]
|
|
47915
48076
|
impl From<xberg::GridCell> for GridCell {
|
|
47916
48077
|
fn from(val: xberg::GridCell) -> Self {
|
|
47917
48078
|
Self {
|
|
@@ -47922,6 +48083,8 @@ impl From<xberg::GridCell> for GridCell {
|
|
|
47922
48083
|
col_span: val.col_span,
|
|
47923
48084
|
is_header: val.is_header,
|
|
47924
48085
|
bbox: val.bbox.map(Into::into),
|
|
48086
|
+
heading_level: val.heading_level,
|
|
48087
|
+
style_name: val.style_name.map(|v| v.to_string()),
|
|
47925
48088
|
}
|
|
47926
48089
|
}
|
|
47927
48090
|
}
|
|
@@ -51079,6 +51242,7 @@ impl From<Table> for xberg::Table {
|
|
|
51079
51242
|
page_number: val.page_number,
|
|
51080
51243
|
bounding_box: val.bounding_box.map(Into::into),
|
|
51081
51244
|
table_id: val.table_id,
|
|
51245
|
+
cell_styles: val.cell_styles.into_iter().map(Into::into).collect(),
|
|
51082
51246
|
columns: val.columns.map(|v| v.into_iter().collect()),
|
|
51083
51247
|
..Default::default()
|
|
51084
51248
|
}
|
|
@@ -51094,6 +51258,7 @@ impl From<xberg::Table> for Table {
|
|
|
51094
51258
|
page_number: val.page_number,
|
|
51095
51259
|
bounding_box: val.bounding_box.map(Into::into),
|
|
51096
51260
|
table_id: val.table_id.map(|v| v.to_string()),
|
|
51261
|
+
cell_styles: val.cell_styles.into_iter().map(Into::into).collect(),
|
|
51097
51262
|
columns: val.columns.map(|v| v.into_iter().collect()),
|
|
51098
51263
|
}
|
|
51099
51264
|
}
|
|
@@ -51110,6 +51275,31 @@ impl From<xberg::TableCell> for TableCell {
|
|
|
51110
51275
|
}
|
|
51111
51276
|
}
|
|
51112
51277
|
|
|
51278
|
+
#[allow(clippy::needless_update)]
|
|
51279
|
+
impl From<TableCellStyle> for xberg::TableCellStyle {
|
|
51280
|
+
fn from(val: TableCellStyle) -> Self {
|
|
51281
|
+
Self {
|
|
51282
|
+
row: val.row,
|
|
51283
|
+
col: val.col,
|
|
51284
|
+
heading_level: val.heading_level,
|
|
51285
|
+
style_name: val.style_name,
|
|
51286
|
+
..Default::default()
|
|
51287
|
+
}
|
|
51288
|
+
}
|
|
51289
|
+
}
|
|
51290
|
+
|
|
51291
|
+
#[allow(clippy::redundant_closure)]
|
|
51292
|
+
impl From<xberg::TableCellStyle> for TableCellStyle {
|
|
51293
|
+
fn from(val: xberg::TableCellStyle) -> Self {
|
|
51294
|
+
Self {
|
|
51295
|
+
row: val.row,
|
|
51296
|
+
col: val.col,
|
|
51297
|
+
heading_level: val.heading_level,
|
|
51298
|
+
style_name: val.style_name.map(|v| v.to_string()),
|
|
51299
|
+
}
|
|
51300
|
+
}
|
|
51301
|
+
}
|
|
51302
|
+
|
|
51113
51303
|
#[cfg(feature = "diff")]
|
|
51114
51304
|
#[allow(clippy::useless_conversion)]
|
|
51115
51305
|
impl From<xberg::TableDiff> for TableDiff {
|
|
@@ -56276,6 +56466,10 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
56276
56466
|
|
|
56277
56467
|
class.define_method("bbox", method!(GridCell::bbox, 0))?;
|
|
56278
56468
|
|
|
56469
|
+
class.define_method("heading_level", method!(GridCell::heading_level, 0))?;
|
|
56470
|
+
|
|
56471
|
+
class.define_method("style_name", method!(GridCell::style_name, 0))?;
|
|
56472
|
+
|
|
56279
56473
|
class.define_method("to_s", method!(GridCell::to_s, 0))?;
|
|
56280
56474
|
|
|
56281
56475
|
let class = module.define_class("HeaderMetadata", ruby.class_object())?;
|
|
@@ -58611,6 +58805,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
58611
58805
|
|
|
58612
58806
|
class.define_method("table_id", method!(Table::table_id, 0))?;
|
|
58613
58807
|
|
|
58808
|
+
class.define_method("cell_styles", method!(Table::cell_styles, 0))?;
|
|
58809
|
+
|
|
58614
58810
|
class.define_method("columns", method!(Table::columns, 0))?;
|
|
58615
58811
|
|
|
58616
58812
|
let class = module.define_class("TableCell", ruby.class_object())?;
|
|
@@ -58627,6 +58823,18 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
58627
58823
|
|
|
58628
58824
|
class.define_method("to_s", method!(TableCell::to_s, 0))?;
|
|
58629
58825
|
|
|
58826
|
+
let class = module.define_class("TableCellStyle", ruby.class_object())?;
|
|
58827
|
+
|
|
58828
|
+
class.define_singleton_method("new", function!(TableCellStyle::new, -1))?;
|
|
58829
|
+
|
|
58830
|
+
class.define_method("row", method!(TableCellStyle::row, 0))?;
|
|
58831
|
+
|
|
58832
|
+
class.define_method("col", method!(TableCellStyle::col, 0))?;
|
|
58833
|
+
|
|
58834
|
+
class.define_method("heading_level", method!(TableCellStyle::heading_level, 0))?;
|
|
58835
|
+
|
|
58836
|
+
class.define_method("style_name", method!(TableCellStyle::style_name, 0))?;
|
|
58837
|
+
|
|
58630
58838
|
let class = module.define_class("TableDiff", ruby.class_object())?;
|
|
58631
58839
|
|
|
58632
58840
|
#[cfg(feature = "diff")]
|
data/lib/xberg/native.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:2ed8d28561d80117ab2d77bb163218ecfac8cd3a943b8656907f3fbc2a23425c
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
# frozen_string_literal: true
|
|
@@ -5295,15 +5295,23 @@ module Xberg
|
|
|
5295
5295
|
## Try the classical OCR backend first. If the quality score is below
|
|
5296
5296
|
## `quality_threshold`, send the page to the VLM.
|
|
5297
5297
|
##
|
|
5298
|
-
## `quality_threshold` is in the `[0.0, 1.0]` range
|
|
5299
|
-
##
|
|
5300
|
-
##
|
|
5298
|
+
## `quality_threshold` is in the `[0.0, 1.0]` range, but it is **not** the same
|
|
5299
|
+
## quantity reported on `score` (GH#1584).
|
|
5300
|
+
## The accept decision blends text-shape quality with confidence, weighted 0.7/0.3
|
|
5301
|
+
## (`extractors::pdf::ocr::pipeline_stage_score`) -- when the backend's confidence is on
|
|
5302
|
+
## a known scale it contributes only 30% of the compared score, so a page can clear this
|
|
5303
|
+
## threshold on clean-looking text even while its own `PageOcrConfidence.score` reads
|
|
5304
|
+
## below it. Do not calibrate this value by reading `PageOcrConfidence.score` off a
|
|
5305
|
+
## sample page and expecting an equal `quality_threshold` to reproduce the same
|
|
5306
|
+
## accept/reject outcome. A value of `0.5` is a reasonable starting point; calibrate with
|
|
5307
|
+
## the Stage 0 benchmark harness.
|
|
5301
5308
|
VlmFallbackPolicyOnLowQuality = Data.define(:quality_threshold) do
|
|
5302
5309
|
include VlmFallbackPolicy
|
|
5303
5310
|
extend T::Sig
|
|
5304
5311
|
|
|
5305
|
-
# Minimum acceptable quality score from the classical backend.
|
|
5306
|
-
#
|
|
5312
|
+
# Minimum acceptable quality score from the classical backend. Pages scoring below
|
|
5313
|
+
# this are retried with VLM -- see this variant's doc comment for what "scoring"
|
|
5314
|
+
# means here.
|
|
5307
5315
|
sig { returns(Float) }
|
|
5308
5316
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
5309
5317
|
def quality_threshold = super
|
data/lib/xberg/version.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:73c70c86b0b71cc6dde88c9c0ee7245420504146c2e2122be9b741ddce361099
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
module Xberg
|
|
8
8
|
## The version string for this package.
|
|
9
|
-
VERSION = "1.1.
|
|
9
|
+
VERSION = "1.1.3"
|
|
10
10
|
end
|
data/sig/types.rbs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:983fd32130659037e7cd0d012a6583376687bf78f5f876bf66af9db448c8e3f0
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
@@ -1144,8 +1144,10 @@ def initialize: (block_type: BlockType, ?level: Integer, inline_content: Array[I
|
|
|
1144
1144
|
attr_reader col_span: Integer
|
|
1145
1145
|
attr_reader is_header: bool
|
|
1146
1146
|
attr_reader bbox: BoundingBox?
|
|
1147
|
+
attr_reader heading_level: Integer?
|
|
1148
|
+
attr_reader style_name: String?
|
|
1147
1149
|
|
|
1148
|
-
def initialize: (content: String, row: Integer, col: Integer, row_span: Integer, col_span: Integer, is_header: bool, ?bbox: BoundingBox) -> void
|
|
1150
|
+
def initialize: (content: String, row: Integer, col: Integer, row_span: Integer, col_span: Integer, is_header: bool, ?bbox: BoundingBox, ?heading_level: Integer, ?style_name: String) -> void
|
|
1149
1151
|
end
|
|
1150
1152
|
|
|
1151
1153
|
class HeaderMetadata
|
|
@@ -2452,9 +2454,10 @@ attr_reader cells: Array[Array[String]]
|
|
|
2452
2454
|
attr_reader page_number: Integer
|
|
2453
2455
|
attr_reader bounding_box: BoundingBox?
|
|
2454
2456
|
attr_reader table_id: String?
|
|
2457
|
+
attr_reader cell_styles: Array[TableCellStyle]
|
|
2455
2458
|
attr_reader columns: Array[String]?
|
|
2456
2459
|
|
|
2457
|
-
def initialize: (?cells: Array[Array[String]], ?markdown: String, ?page_number: Integer, ?bounding_box: BoundingBox, ?table_id: String, ?columns: Array[String]) -> void
|
|
2460
|
+
def initialize: (?cells: Array[Array[String]], ?markdown: String, ?page_number: Integer, ?bounding_box: BoundingBox, ?table_id: String, ?cell_styles: Array[TableCellStyle], ?columns: Array[String]) -> void
|
|
2458
2461
|
end
|
|
2459
2462
|
|
|
2460
2463
|
class TableCell
|
|
@@ -2466,6 +2469,15 @@ def initialize: (?cells: Array[Array[String]], ?markdown: String, ?page_number:
|
|
|
2466
2469
|
def initialize: (?content: String, ?row_span: Integer, ?col_span: Integer, ?is_header: bool) -> void
|
|
2467
2470
|
end
|
|
2468
2471
|
|
|
2472
|
+
class TableCellStyle
|
|
2473
|
+
attr_reader row: Integer
|
|
2474
|
+
attr_reader col: Integer
|
|
2475
|
+
attr_reader heading_level: Integer?
|
|
2476
|
+
attr_reader style_name: String?
|
|
2477
|
+
|
|
2478
|
+
def initialize: (?row: Integer, ?col: Integer, ?heading_level: Integer, ?style_name: String) -> void
|
|
2479
|
+
end
|
|
2480
|
+
|
|
2469
2481
|
class TableDiff
|
|
2470
2482
|
attr_reader from_index: Integer
|
|
2471
2483
|
attr_reader to_index: Integer
|
|
@@ -2484,7 +2496,7 @@ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> voi
|
|
|
2484
2496
|
|
|
2485
2497
|
class TesseractConfig
|
|
2486
2498
|
attr_reader language: Array[String]
|
|
2487
|
-
attr_reader psm: Integer
|
|
2499
|
+
attr_reader psm: Integer?
|
|
2488
2500
|
attr_reader output_format: String
|
|
2489
2501
|
attr_reader oem: Integer
|
|
2490
2502
|
attr_reader min_confidence: Float
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xberg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Na'aman Hirschfeld <naaman@xberg.io>
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|