xberg 1.1.1 → 1.1.2
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 +5 -5
- data/ext/xberg_rb/src/lib.rs +6 -6
- data/lib/xberg/native.rb +14 -6
- data/lib/xberg/version.rb +2 -2
- data/sig/types.rbs +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2fabfbdcbc215452a281c88a3475e71f593c63201e35d6aa12918dbc411f6e06
|
|
4
|
+
data.tar.gz: dcf0048b9f0a25c92f860d1b077c52440191864e184de6ebc623617d14ac584b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d594d585723df11fd18ab8c9fff9968ffb201f79b8f263d937219c664362ab2379d09cfaa733c952c4ec5954f04e9dcd84bb95f3a9c0d88f139fa67260051d9d
|
|
7
|
+
data.tar.gz: 9a927c4d766304d91f6c37a4fe36aacba53b5246ce3f28ad107cd5cf86a970f64cc8ab71afa95eee17d957f9c248dde38a475a43af506fbf60003ff7604a94b7
|
|
@@ -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.2"
|
|
9217
9263
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9218
|
-
checksum = "
|
|
9264
|
+
checksum = "771b6187d6d275a97243bb452e909d9a736db1aa1ad0391b388f27d43c2364d1"
|
|
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.2"
|
|
9354
9400
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9355
|
-
checksum = "
|
|
9401
|
+
checksum = "06533bb7ef81505e00fb366ef399e119014ca2b0377b75468364fe1537ad6b87"
|
|
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.2"
|
|
9376
9422
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9377
|
-
checksum = "
|
|
9423
|
+
checksum = "c475644a8ef045d071c9e59032feb9f73a5191610c00240200a08acac4dbc57f"
|
|
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.2"
|
|
9392
9438
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9393
|
-
checksum = "
|
|
9439
|
+
checksum = "2e91e8d98372702dc5836f645b9ef020a7ebae824a00ab12d9182181a63067c9"
|
|
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.2"
|
|
9405
9451
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9406
|
-
checksum = "
|
|
9452
|
+
checksum = "d09f47b32f5b9066c9619437ccad09e278a73b53e50adeb211dcb8db5b72ead9"
|
|
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.2"
|
|
9420
9466
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9421
|
-
checksum = "
|
|
9467
|
+
checksum = "70739a2e890c3f30c3b64c8f0911ba48064cf68008b463d268babc2985d6b55f"
|
|
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.2"
|
|
9467
9513
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9468
|
-
checksum = "
|
|
9514
|
+
checksum = "8bdc84f871be63230c84861f6bdf911e99eb21153663a89be25882f4ec2d706a"
|
|
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.2"
|
|
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.2"
|
|
9500
9546
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9501
|
-
checksum = "
|
|
9547
|
+
checksum = "362ecf382c207857401e64184513656a42de37345711cf2e1554caa6d9752519"
|
|
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:07aa5bc5a192a77758e42f213f201383ef913b7d438265bf93de7863c4bfbfaf
|
|
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.2"
|
|
9
9
|
edition = "2024"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
description = "High-performance document intelligence library"
|
|
@@ -70,13 +70,13 @@ tokio = { version = "1", features = ["rt-multi-thread"] }
|
|
|
70
70
|
tracing = "0.1"
|
|
71
71
|
|
|
72
72
|
[target.'cfg(all(target_os = "macos", target_arch = "x86_64"))'.dependencies]
|
|
73
|
-
xberg = { version = "1.1.
|
|
73
|
+
xberg = { version = "1.1.2", default-features = false, features = ["macos-intel-target", "simd-utf8"] }
|
|
74
74
|
|
|
75
75
|
[target.'cfg(not(any(target_os = "windows", all(target_os = "macos", target_arch = "x86_64"))))'.dependencies]
|
|
76
|
-
xberg = { version = "1.1.
|
|
76
|
+
xberg = { version = "1.1.2", 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
77
|
|
|
78
78
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
79
|
-
xberg = { version = "1.1.
|
|
79
|
+
xberg = { version = "1.1.2", default-features = false, features = ["windows-gnu-target", "simd-utf8"] }
|
|
80
80
|
|
|
81
81
|
# This crate deliberately does not use `[lints]` / `workspace = true`: its C-ABI /
|
|
82
82
|
# 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:4ce5add6ef19794221c2b201292d5f8a63d94b5413e0adb88c4b0379154e256f
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -32141,7 +32141,7 @@ impl TableGrid {
|
|
|
32141
32141
|
#[magnus::wrap(class = "Xberg::TesseractConfig")]
|
|
32142
32142
|
pub struct TesseractConfig {
|
|
32143
32143
|
language: Vec<String>,
|
|
32144
|
-
psm: i32
|
|
32144
|
+
psm: Option<i32>,
|
|
32145
32145
|
output_format: String,
|
|
32146
32146
|
oem: i32,
|
|
32147
32147
|
min_confidence: f64,
|
|
@@ -32222,13 +32222,13 @@ impl TesseractConfig {
|
|
|
32222
32222
|
None => vec!["eng".to_string()],
|
|
32223
32223
|
},
|
|
32224
32224
|
psm: match kwargs.get(ruby.to_symbol("psm")) {
|
|
32225
|
-
Some(v) => i32::try_convert(v).map_err(|e| {
|
|
32225
|
+
Some(v) => Some(i32::try_convert(v).map_err(|e| {
|
|
32226
32226
|
magnus::Error::new(
|
|
32227
32227
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
32228
32228
|
format!("invalid value for `psm`: {}", e),
|
|
32229
32229
|
)
|
|
32230
|
-
})
|
|
32231
|
-
None =>
|
|
32230
|
+
})?),
|
|
32231
|
+
None => None,
|
|
32232
32232
|
},
|
|
32233
32233
|
output_format: match kwargs.get(ruby.to_symbol("output_format")) {
|
|
32234
32234
|
Some(v) => String::try_convert(v).map_err(|e| {
|
|
@@ -32408,7 +32408,7 @@ impl TesseractConfig {
|
|
|
32408
32408
|
self.language.clone()
|
|
32409
32409
|
}
|
|
32410
32410
|
|
|
32411
|
-
fn psm(&self) -> i32 {
|
|
32411
|
+
fn psm(&self) -> Option<i32> {
|
|
32412
32412
|
self.psm
|
|
32413
32413
|
}
|
|
32414
32414
|
|
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:b27bcf116f7d5dec9c7278cd662f93e13ba51460490348bade51c096c52c1798
|
|
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.2"
|
|
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:8935255e8d7580a6b3409f10f303f1c20025de46e73a29d529837410d3a2acda
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
@@ -2484,7 +2484,7 @@ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> voi
|
|
|
2484
2484
|
|
|
2485
2485
|
class TesseractConfig
|
|
2486
2486
|
attr_reader language: Array[String]
|
|
2487
|
-
attr_reader psm: Integer
|
|
2487
|
+
attr_reader psm: Integer?
|
|
2488
2488
|
attr_reader output_format: String
|
|
2489
2489
|
attr_reader oem: Integer
|
|
2490
2490
|
attr_reader min_confidence: Float
|