xberg 1.0.0.pre.rc.11 → 1.0.0.pre.rc.13
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 +24 -24
- data/ext/xberg_rb/native/Cargo.toml +4 -4
- data/ext/xberg_rb/src/lib.rs +136 -1
- data/lib/xberg/native.rb +475 -226
- data/lib/xberg/version.rb +2 -2
- data/lib/xberg.rb +1 -1
- data/lib/xberg_rb.so +0 -0
- data/sig/types.rbs +1754 -1744
- 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: 93271fcd87972e2eb3a678d1e33f243ee76323f3c6ef8c31e63225e7ab8cac05
|
|
4
|
+
data.tar.gz: 5ce8d87ae1032f4593364185fb54089d9bd76b7170e1f57f26c001682317d501
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 67cf983c3da0b78d87f98961444165562c67fc87ddfcbb08f3ab51e643e335a4e601007b9e9dc836b177514e124c10c917512bc17023583d05710fa216762be7
|
|
7
|
+
data.tar.gz: 1f74a9e41caa0eb5db2e09a047b0b9eb06276f12b80c3a04c8bb7f92913bd5ac48bd9922b16d43a770053c012e8384fc21628041c4258756f607b71f60172828
|
|
@@ -1463,9 +1463,9 @@ checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376"
|
|
|
1463
1463
|
|
|
1464
1464
|
[[package]]
|
|
1465
1465
|
name = "dbase"
|
|
1466
|
-
version = "0.
|
|
1466
|
+
version = "0.8.0"
|
|
1467
1467
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1468
|
-
checksum = "
|
|
1468
|
+
checksum = "abde818b4b82df61e01348c2b4610c221bcecb97cb7f567da086edf295d8d126"
|
|
1469
1469
|
dependencies = [
|
|
1470
1470
|
"bufrw",
|
|
1471
1471
|
"byteorder",
|
|
@@ -3233,11 +3233,11 @@ dependencies = [
|
|
|
3233
3233
|
|
|
3234
3234
|
[[package]]
|
|
3235
3235
|
name = "jobserver"
|
|
3236
|
-
version = "0.1.
|
|
3236
|
+
version = "0.1.35"
|
|
3237
3237
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3238
|
-
checksum = "
|
|
3238
|
+
checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3"
|
|
3239
3239
|
dependencies = [
|
|
3240
|
-
"getrandom 0.3
|
|
3240
|
+
"getrandom 0.4.3",
|
|
3241
3241
|
"libc",
|
|
3242
3242
|
]
|
|
3243
3243
|
|
|
@@ -5626,9 +5626,9 @@ dependencies = [
|
|
|
5626
5626
|
|
|
5627
5627
|
[[package]]
|
|
5628
5628
|
name = "rustversion"
|
|
5629
|
-
version = "1.0.
|
|
5629
|
+
version = "1.0.23"
|
|
5630
5630
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
5631
|
-
checksum = "
|
|
5631
|
+
checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
|
|
5632
5632
|
|
|
5633
5633
|
[[package]]
|
|
5634
5634
|
name = "rustybuzz"
|
|
@@ -7065,9 +7065,9 @@ checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782"
|
|
|
7065
7065
|
|
|
7066
7066
|
[[package]]
|
|
7067
7067
|
name = "tree-sitter-language-pack"
|
|
7068
|
-
version = "1.12.
|
|
7068
|
+
version = "1.12.5"
|
|
7069
7069
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
7070
|
-
checksum = "
|
|
7070
|
+
checksum = "f860e7a7df78207ed80a1f8a4cab7fd5e366ed9bfd5fa74f2d1ed3022905a058"
|
|
7071
7071
|
dependencies = [
|
|
7072
7072
|
"ahash 0.8.12",
|
|
7073
7073
|
"cc",
|
|
@@ -8063,9 +8063,9 @@ dependencies = [
|
|
|
8063
8063
|
|
|
8064
8064
|
[[package]]
|
|
8065
8065
|
name = "xberg"
|
|
8066
|
-
version = "1.0.0-rc.
|
|
8066
|
+
version = "1.0.0-rc.13"
|
|
8067
8067
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
8068
|
-
checksum = "
|
|
8068
|
+
checksum = "6819b396096da99a7e57c8188daebfe9ed8e80f5effc7cdf1e7709019aac71be"
|
|
8069
8069
|
dependencies = [
|
|
8070
8070
|
"ahash 0.8.12",
|
|
8071
8071
|
"async-trait",
|
|
@@ -8181,9 +8181,9 @@ dependencies = [
|
|
|
8181
8181
|
|
|
8182
8182
|
[[package]]
|
|
8183
8183
|
name = "xberg-gliner"
|
|
8184
|
-
version = "1.0.0-rc.
|
|
8184
|
+
version = "1.0.0-rc.13"
|
|
8185
8185
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
8186
|
-
checksum = "
|
|
8186
|
+
checksum = "4e52cac01a2e651a57127b3b1a3b0e25939dfdf6bb6792e31ec7708cec2e092c"
|
|
8187
8187
|
dependencies = [
|
|
8188
8188
|
"ndarray 0.17.2",
|
|
8189
8189
|
"ort",
|
|
@@ -8195,9 +8195,9 @@ dependencies = [
|
|
|
8195
8195
|
|
|
8196
8196
|
[[package]]
|
|
8197
8197
|
name = "xberg-libheif"
|
|
8198
|
-
version = "1.0.0-rc.
|
|
8198
|
+
version = "1.0.0-rc.13"
|
|
8199
8199
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
8200
|
-
checksum = "
|
|
8200
|
+
checksum = "05e3e60dc8704cd66708b94b74306135895281ff0e0f9b2df9f0948df249c0f5"
|
|
8201
8201
|
dependencies = [
|
|
8202
8202
|
"cfg-if",
|
|
8203
8203
|
"enumn",
|
|
@@ -8208,9 +8208,9 @@ dependencies = [
|
|
|
8208
8208
|
|
|
8209
8209
|
[[package]]
|
|
8210
8210
|
name = "xberg-paddle-ocr"
|
|
8211
|
-
version = "1.0.0-rc.
|
|
8211
|
+
version = "1.0.0-rc.13"
|
|
8212
8212
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
8213
|
-
checksum = "
|
|
8213
|
+
checksum = "7490a234118acb62781f3ef6e258435bce77f1b4b99598e9ff83385665ee6b2f"
|
|
8214
8214
|
dependencies = [
|
|
8215
8215
|
"geo-clipper",
|
|
8216
8216
|
"geo-types",
|
|
@@ -8225,7 +8225,7 @@ dependencies = [
|
|
|
8225
8225
|
|
|
8226
8226
|
[[package]]
|
|
8227
8227
|
name = "xberg-rb"
|
|
8228
|
-
version = "1.0.0-rc.
|
|
8228
|
+
version = "1.0.0-rc.13"
|
|
8229
8229
|
dependencies = [
|
|
8230
8230
|
"async-trait",
|
|
8231
8231
|
"crawlberg",
|
|
@@ -8239,9 +8239,9 @@ dependencies = [
|
|
|
8239
8239
|
|
|
8240
8240
|
[[package]]
|
|
8241
8241
|
name = "xberg-tesseract"
|
|
8242
|
-
version = "1.0.0-rc.
|
|
8242
|
+
version = "1.0.0-rc.13"
|
|
8243
8243
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
8244
|
-
checksum = "
|
|
8244
|
+
checksum = "92d753ce7d55f901afd93ac1531bf0a8c49fa7d23d809994d3f0197e923e80ac"
|
|
8245
8245
|
dependencies = [
|
|
8246
8246
|
"cc",
|
|
8247
8247
|
"cmake",
|
|
@@ -8296,18 +8296,18 @@ dependencies = [
|
|
|
8296
8296
|
|
|
8297
8297
|
[[package]]
|
|
8298
8298
|
name = "zerocopy"
|
|
8299
|
-
version = "0.8.
|
|
8299
|
+
version = "0.8.53"
|
|
8300
8300
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
8301
|
-
checksum = "
|
|
8301
|
+
checksum = "75726053136156d419e285b9b7eddaaea9e3fea6ce32eed44a89901f0bd98de1"
|
|
8302
8302
|
dependencies = [
|
|
8303
8303
|
"zerocopy-derive",
|
|
8304
8304
|
]
|
|
8305
8305
|
|
|
8306
8306
|
[[package]]
|
|
8307
8307
|
name = "zerocopy-derive"
|
|
8308
|
-
version = "0.8.
|
|
8308
|
+
version = "0.8.53"
|
|
8309
8309
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
8310
|
-
checksum = "
|
|
8310
|
+
checksum = "4714fd92cf900833d49538023a9b3915155210801d1c1169eba513b2addefd71"
|
|
8311
8311
|
dependencies = [
|
|
8312
8312
|
"proc-macro2",
|
|
8313
8313
|
"quote",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "xberg-rb"
|
|
3
|
-
version = "1.0.0-rc.
|
|
3
|
+
version = "1.0.0-rc.13"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
description = "High-performance document intelligence library"
|
|
@@ -56,10 +56,10 @@ serde = { version = "1", features = ["derive"] }
|
|
|
56
56
|
serde_json = "1"
|
|
57
57
|
tokio = { version = "1", features = ["rt-multi-thread"] }
|
|
58
58
|
[target.'cfg(not(any(target_os = "windows", all(target_os = "macos", target_arch = "x86_64"))))'.dependencies]
|
|
59
|
-
xberg = { version = "1.0.0-rc.
|
|
59
|
+
xberg = { version = "1.0.0-rc.13", features = ["full", "pdf", "ocr", "paddle-ocr", "paddle-ocr-types", "layout-detection", "layout-types", "embeddings", "embedding-presets", "reranker", "reranker-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"] }
|
|
60
60
|
|
|
61
61
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
62
|
-
xberg = { version = "1.0.0-rc.
|
|
62
|
+
xberg = { version = "1.0.0-rc.13", features = ["windows-target"] }
|
|
63
63
|
|
|
64
64
|
[target.'cfg(all(target_os = "macos", target_arch = "x86_64"))'.dependencies]
|
|
65
|
-
xberg = { version = "1.0.0-rc.
|
|
65
|
+
xberg = { version = "1.0.0-rc.13", features = ["macos-intel-target"] }
|
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:38dce430f8d9bea3dcf8465197cc598552462cd7a5930cc5e7e769e1d0990c01
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -3973,6 +3973,7 @@ pub struct EmbeddingConfig {
|
|
|
3973
3973
|
cache_dir: Option<String>,
|
|
3974
3974
|
acceleration: Option<AccelerationConfig>,
|
|
3975
3975
|
max_embed_duration_secs: Option<u64>,
|
|
3976
|
+
max_sequence_length: Option<usize>,
|
|
3976
3977
|
}
|
|
3977
3978
|
|
|
3978
3979
|
unsafe impl IntoValueFromNative for EmbeddingConfig {}
|
|
@@ -4041,6 +4042,9 @@ impl EmbeddingConfig {
|
|
|
4041
4042
|
max_embed_duration_secs: kwargs
|
|
4042
4043
|
.get(ruby.to_symbol("max_embed_duration_secs"))
|
|
4043
4044
|
.and_then(|v| u64::try_convert(v).ok()),
|
|
4045
|
+
max_sequence_length: kwargs
|
|
4046
|
+
.get(ruby.to_symbol("max_sequence_length"))
|
|
4047
|
+
.and_then(|v| usize::try_convert(v).ok()),
|
|
4044
4048
|
})
|
|
4045
4049
|
}
|
|
4046
4050
|
|
|
@@ -4071,6 +4075,10 @@ impl EmbeddingConfig {
|
|
|
4071
4075
|
fn max_embed_duration_secs(&self) -> Option<u64> {
|
|
4072
4076
|
self.max_embed_duration_secs
|
|
4073
4077
|
}
|
|
4078
|
+
|
|
4079
|
+
fn max_sequence_length(&self) -> Option<usize> {
|
|
4080
|
+
self.max_sequence_length
|
|
4081
|
+
}
|
|
4074
4082
|
}
|
|
4075
4083
|
|
|
4076
4084
|
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
|
@@ -8057,6 +8065,84 @@ impl Entity {
|
|
|
8057
8065
|
}
|
|
8058
8066
|
}
|
|
8059
8067
|
|
|
8068
|
+
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
|
8069
|
+
#[serde(default)]
|
|
8070
|
+
#[magnus::wrap(class = "Xberg::DocumentCounts")]
|
|
8071
|
+
pub struct DocumentCounts {
|
|
8072
|
+
pages: usize,
|
|
8073
|
+
tables: usize,
|
|
8074
|
+
images: usize,
|
|
8075
|
+
}
|
|
8076
|
+
|
|
8077
|
+
unsafe impl IntoValueFromNative for DocumentCounts {}
|
|
8078
|
+
|
|
8079
|
+
impl magnus::TryConvert for DocumentCounts {
|
|
8080
|
+
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
8081
|
+
if let Ok(r) = <&DocumentCounts as magnus::TryConvert>::try_convert(val) {
|
|
8082
|
+
return Ok(r.clone());
|
|
8083
|
+
}
|
|
8084
|
+
let json_str: String = if let Ok(s) = <String as magnus::TryConvert>::try_convert(val) {
|
|
8085
|
+
s
|
|
8086
|
+
} else {
|
|
8087
|
+
val.funcall::<_, _, String>("to_json", ()).map_err(|e| {
|
|
8088
|
+
magnus::Error::new(
|
|
8089
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
8090
|
+
format!("no implicit conversion into DocumentCounts: {}", e),
|
|
8091
|
+
)
|
|
8092
|
+
})?
|
|
8093
|
+
};
|
|
8094
|
+
serde_json::from_str::<DocumentCounts>(&json_str).map_err(|e| {
|
|
8095
|
+
magnus::Error::new(
|
|
8096
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
8097
|
+
format!("failed to deserialize DocumentCounts: {}", e),
|
|
8098
|
+
)
|
|
8099
|
+
})
|
|
8100
|
+
}
|
|
8101
|
+
}
|
|
8102
|
+
|
|
8103
|
+
unsafe impl TryConvertOwned for DocumentCounts {}
|
|
8104
|
+
|
|
8105
|
+
impl Default for DocumentCounts {
|
|
8106
|
+
fn default() -> Self {
|
|
8107
|
+
xberg::DocumentCounts::default().into()
|
|
8108
|
+
}
|
|
8109
|
+
}
|
|
8110
|
+
|
|
8111
|
+
impl DocumentCounts {
|
|
8112
|
+
fn new(args: &[magnus::Value]) -> Result<Self, magnus::Error> {
|
|
8113
|
+
let ruby = unsafe { magnus::Ruby::get_unchecked() };
|
|
8114
|
+
let args = magnus::scan_args::scan_args::<(), (Option<magnus::RHash>,), (), (), (), ()>(args)?;
|
|
8115
|
+
let (kwargs_opt,) = args.optional;
|
|
8116
|
+
let kwargs = kwargs_opt.unwrap_or_else(|| ruby.hash_new());
|
|
8117
|
+
Ok(Self {
|
|
8118
|
+
pages: kwargs
|
|
8119
|
+
.get(ruby.to_symbol("pages"))
|
|
8120
|
+
.and_then(|v| usize::try_convert(v).ok())
|
|
8121
|
+
.unwrap_or_default(),
|
|
8122
|
+
tables: kwargs
|
|
8123
|
+
.get(ruby.to_symbol("tables"))
|
|
8124
|
+
.and_then(|v| usize::try_convert(v).ok())
|
|
8125
|
+
.unwrap_or_default(),
|
|
8126
|
+
images: kwargs
|
|
8127
|
+
.get(ruby.to_symbol("images"))
|
|
8128
|
+
.and_then(|v| usize::try_convert(v).ok())
|
|
8129
|
+
.unwrap_or_default(),
|
|
8130
|
+
})
|
|
8131
|
+
}
|
|
8132
|
+
|
|
8133
|
+
fn pages(&self) -> usize {
|
|
8134
|
+
self.pages
|
|
8135
|
+
}
|
|
8136
|
+
|
|
8137
|
+
fn tables(&self) -> usize {
|
|
8138
|
+
self.tables
|
|
8139
|
+
}
|
|
8140
|
+
|
|
8141
|
+
fn images(&self) -> usize {
|
|
8142
|
+
self.images
|
|
8143
|
+
}
|
|
8144
|
+
}
|
|
8145
|
+
|
|
8060
8146
|
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
|
8061
8147
|
#[serde(default)]
|
|
8062
8148
|
#[magnus::wrap(class = "Xberg::ExtractedDocument")]
|
|
@@ -8066,6 +8152,7 @@ pub struct ExtractedDocument {
|
|
|
8066
8152
|
metadata: Metadata,
|
|
8067
8153
|
extraction_method: Option<ExtractionMethod>,
|
|
8068
8154
|
tables: Vec<Table>,
|
|
8155
|
+
counts: DocumentCounts,
|
|
8069
8156
|
detected_languages: Option<Vec<String>>,
|
|
8070
8157
|
chunks: Option<Vec<Chunk>>,
|
|
8071
8158
|
images: Option<Vec<ExtractedImage>>,
|
|
@@ -8155,6 +8242,10 @@ impl ExtractedDocument {
|
|
|
8155
8242
|
.get(ruby.to_symbol("tables"))
|
|
8156
8243
|
.and_then(|v| <Vec<Table>>::try_convert(v).ok())
|
|
8157
8244
|
.unwrap_or_default(),
|
|
8245
|
+
counts: kwargs
|
|
8246
|
+
.get(ruby.to_symbol("counts"))
|
|
8247
|
+
.and_then(|v| DocumentCounts::try_convert(v).ok())
|
|
8248
|
+
.unwrap_or_default(),
|
|
8158
8249
|
detected_languages: kwargs
|
|
8159
8250
|
.get(ruby.to_symbol("detected_languages"))
|
|
8160
8251
|
.and_then(|v| <Vec<String>>::try_convert(v).ok()),
|
|
@@ -8262,6 +8353,10 @@ impl ExtractedDocument {
|
|
|
8262
8353
|
self.tables.clone()
|
|
8263
8354
|
}
|
|
8264
8355
|
|
|
8356
|
+
fn counts(&self) -> DocumentCounts {
|
|
8357
|
+
self.counts.clone()
|
|
8358
|
+
}
|
|
8359
|
+
|
|
8265
8360
|
fn detected_languages(&self) -> Option<Vec<String>> {
|
|
8266
8361
|
self.detected_languages.clone()
|
|
8267
8362
|
}
|
|
@@ -28581,6 +28676,7 @@ impl From<EmbeddingConfig> for xberg::EmbeddingConfig {
|
|
|
28581
28676
|
cache_dir: val.cache_dir.map(Into::into),
|
|
28582
28677
|
acceleration: val.acceleration.map(Into::into),
|
|
28583
28678
|
max_embed_duration_secs: val.max_embed_duration_secs,
|
|
28679
|
+
max_sequence_length: val.max_sequence_length,
|
|
28584
28680
|
}
|
|
28585
28681
|
}
|
|
28586
28682
|
}
|
|
@@ -28596,6 +28692,7 @@ impl From<xberg::EmbeddingConfig> for EmbeddingConfig {
|
|
|
28596
28692
|
cache_dir: val.cache_dir.map(|p| p.to_string_lossy().to_string()),
|
|
28597
28693
|
acceleration: val.acceleration.map(Into::into),
|
|
28598
28694
|
max_embed_duration_secs: val.max_embed_duration_secs,
|
|
28695
|
+
max_sequence_length: val.max_sequence_length,
|
|
28599
28696
|
}
|
|
28600
28697
|
}
|
|
28601
28698
|
}
|
|
@@ -29582,6 +29679,28 @@ impl From<xberg::Entity> for Entity {
|
|
|
29582
29679
|
}
|
|
29583
29680
|
}
|
|
29584
29681
|
|
|
29682
|
+
#[allow(clippy::redundant_closure, clippy::useless_conversion)]
|
|
29683
|
+
impl From<DocumentCounts> for xberg::DocumentCounts {
|
|
29684
|
+
fn from(val: DocumentCounts) -> Self {
|
|
29685
|
+
Self {
|
|
29686
|
+
pages: val.pages,
|
|
29687
|
+
tables: val.tables,
|
|
29688
|
+
images: val.images,
|
|
29689
|
+
}
|
|
29690
|
+
}
|
|
29691
|
+
}
|
|
29692
|
+
|
|
29693
|
+
#[allow(clippy::redundant_closure, clippy::useless_conversion)]
|
|
29694
|
+
impl From<xberg::DocumentCounts> for DocumentCounts {
|
|
29695
|
+
fn from(val: xberg::DocumentCounts) -> Self {
|
|
29696
|
+
Self {
|
|
29697
|
+
pages: val.pages,
|
|
29698
|
+
tables: val.tables,
|
|
29699
|
+
images: val.images,
|
|
29700
|
+
}
|
|
29701
|
+
}
|
|
29702
|
+
}
|
|
29703
|
+
|
|
29585
29704
|
#[allow(clippy::field_reassign_with_default, clippy::let_and_return)]
|
|
29586
29705
|
#[allow(clippy::redundant_closure, clippy::useless_conversion)]
|
|
29587
29706
|
impl From<ExtractedDocument> for xberg::ExtractedDocument {
|
|
@@ -29592,6 +29711,7 @@ impl From<ExtractedDocument> for xberg::ExtractedDocument {
|
|
|
29592
29711
|
__result.metadata = val.metadata.into();
|
|
29593
29712
|
__result.extraction_method = val.extraction_method.map(Into::into);
|
|
29594
29713
|
__result.tables = val.tables.into_iter().map(Into::into).collect();
|
|
29714
|
+
__result.counts = val.counts.into();
|
|
29595
29715
|
__result.detected_languages = val.detected_languages.map(|v| v.into_iter().collect());
|
|
29596
29716
|
__result.chunks = val.chunks.map(|v| v.into_iter().map(Into::into).collect());
|
|
29597
29717
|
__result.images = val.images.map(|v| v.into_iter().map(Into::into).collect());
|
|
@@ -29640,6 +29760,7 @@ impl From<xberg::ExtractedDocument> for ExtractedDocument {
|
|
|
29640
29760
|
metadata: val.metadata.into(),
|
|
29641
29761
|
extraction_method: val.extraction_method.map(Into::into),
|
|
29642
29762
|
tables: val.tables.into_iter().map(Into::into).collect(),
|
|
29763
|
+
counts: val.counts.into(),
|
|
29643
29764
|
detected_languages: val.detected_languages.map(|v| v.into_iter().collect()),
|
|
29644
29765
|
chunks: val.chunks.map(|v| v.into_iter().map(Into::into).collect()),
|
|
29645
29766
|
images: val.images.map(|v| v.into_iter().map(Into::into).collect()),
|
|
@@ -35190,6 +35311,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
35190
35311
|
method!(EmbeddingConfig::max_embed_duration_secs, 0),
|
|
35191
35312
|
)?;
|
|
35192
35313
|
|
|
35314
|
+
class.define_method("max_sequence_length", method!(EmbeddingConfig::max_sequence_length, 0))?;
|
|
35315
|
+
|
|
35193
35316
|
let class = module.define_class("RedactionConfig", ruby.class_object())?;
|
|
35194
35317
|
|
|
35195
35318
|
class.define_singleton_method("new", function!(RedactionConfig::new, -1))?;
|
|
@@ -35836,6 +35959,16 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
35836
35959
|
|
|
35837
35960
|
class.define_method("confidence", method!(Entity::confidence, 0))?;
|
|
35838
35961
|
|
|
35962
|
+
let class = module.define_class("DocumentCounts", ruby.class_object())?;
|
|
35963
|
+
|
|
35964
|
+
class.define_singleton_method("new", function!(DocumentCounts::new, -1))?;
|
|
35965
|
+
|
|
35966
|
+
class.define_method("pages", method!(DocumentCounts::pages, 0))?;
|
|
35967
|
+
|
|
35968
|
+
class.define_method("tables", method!(DocumentCounts::tables, 0))?;
|
|
35969
|
+
|
|
35970
|
+
class.define_method("images", method!(DocumentCounts::images, 0))?;
|
|
35971
|
+
|
|
35839
35972
|
let class = module.define_class("ExtractedDocument", ruby.class_object())?;
|
|
35840
35973
|
|
|
35841
35974
|
class.define_singleton_method("new", function!(ExtractedDocument::new, -1))?;
|
|
@@ -35850,6 +35983,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
35850
35983
|
|
|
35851
35984
|
class.define_method("tables", method!(ExtractedDocument::tables, 0))?;
|
|
35852
35985
|
|
|
35986
|
+
class.define_method("counts", method!(ExtractedDocument::counts, 0))?;
|
|
35987
|
+
|
|
35853
35988
|
class.define_method("detected_languages", method!(ExtractedDocument::detected_languages, 0))?;
|
|
35854
35989
|
|
|
35855
35990
|
class.define_method("chunks", method!(ExtractedDocument::chunks, 0))?;
|