xberg 1.3.6 → 1.3.8

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.
@@ -1,12 +1,13 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:c27e6904867bcdf10220f00395fbf4b5c652b935305f84d03c851f2a5ed1ef8f
2
+ # alef:hash:81639441f101c3984bb28cb756b4b602d013fc455dc8de7762675f08d154c275
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.3.6"
8
+ version = "1.3.8"
9
9
  edition = "2024"
10
+ authors = ["Na'aman Hirschfeld <naaman@xberg.io>", "Tobias Perlstein <tobias@xberg.io>"]
10
11
  license = "MIT"
11
12
  description = "High-performance document intelligence library"
12
13
  readme = false
@@ -72,7 +73,7 @@ xml = ["xberg/xml"]
72
73
 
73
74
  [dependencies]
74
75
  async-trait = "0.1"
75
- crawlberg = { default-features = false, version = "1.10.2" }
76
+ crawlberg = { default-features = false, version = "1.10.3" }
76
77
  html-to-markdown-rs = { default-features = false, version = "3.17.2" }
77
78
  magnus = "0.9"
78
79
  rb-sys = ">=0.9.130, <0.10"
@@ -82,20 +83,18 @@ tokio = { version = "1", features = ["rt-multi-thread"] }
82
83
  tracing = "0.1"
83
84
 
84
85
  [target.'cfg(all(target_os = "macos", target_arch = "x86_64"))'.dependencies]
85
- xberg = { version = "1.3.6", default-features = false, features = ["macos-intel-target", "simd-utf8"] }
86
+ xberg = { version = "1.3.8", default-features = false, features = ["macos-intel-target", "simd-utf8"] }
86
87
 
87
88
  [target.'cfg(not(any(target_os = "windows", all(target_os = "macos", target_arch = "x86_64"))))'.dependencies]
88
- xberg = { version = "1.3.6", features = ["full", "pdf", "pdf-pdfium", "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", "formula-recognition", "ner-onnx", "ner-llm", "diff", "markdown-footnotes", "redaction", "enrichment", "heuristics", "presets", "structured", "url-ingestion"] }
89
+ xberg = { version = "1.3.8", features = ["full", "pdf", "pdf-pdfium", "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", "formula-recognition", "ner-onnx", "ner-llm", "diff", "markdown-footnotes", "redaction", "enrichment", "heuristics", "presets", "structured", "url-ingestion"] }
89
90
 
90
91
  [target.'cfg(target_os = "windows")'.dependencies]
91
- xberg = { version = "1.3.6", default-features = false, features = ["windows-gnu-target", "simd-utf8"] }
92
+ xberg = { version = "1.3.8", default-features = false, features = ["windows-gnu-target", "simd-utf8"] }
92
93
 
93
94
  # This crate deliberately does not use `[lints]` / `workspace = true`: its C-ABI /
94
- # PyO3 / napi / ext-php-rs / NIF boundary requires `unsafe` code, and the workspace's
95
- # `[workspace.lints.rust]` sets `unsafe_code = "deny"` -- an all-or-nothing table that
96
- # would turn every such boundary into a compile error. The `[lints.clippy]` block below
97
- # instead carries the subset of the workspace's deny-by-default lint policy this crate
98
- # can actually satisfy. ~keep
95
+ # PyO3 / napi / ext-php-rs / NIF boundary requires `unsafe` code. Local lint tables
96
+ # avoid inheriting workspace policies that could reject these boundaries, and select
97
+ # the lints this binding can actually satisfy. ~keep
99
98
  [lints.clippy]
100
99
  dbg_macro = "deny"
101
100
  print_stderr = "deny"
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by alef. DO NOT EDIT.
2
- // alef:hash:3751950d58564a09b72eb0e65f2f992e39f3dcd2cd851cd4493626ba6caef9a0
2
+ // alef:hash:e22347e03d42d3b0319a894c2d6c506157865c77ab88d69f37c56c1d6a639a2c
3
3
  // Re-generate with: alef generate
4
4
  #![allow(dead_code, unused_imports, unused_variables)]
5
5
  #![allow(
@@ -11154,6 +11154,7 @@ pub struct ExtractedDocument {
11154
11154
  redaction_report: Option<RedactionReport>,
11155
11155
  formulas: Vec<Formula>,
11156
11156
  form_fields: Vec<PdfFormField>,
11157
+ ocr_page_failures: Option<Vec<OcrPageFailure>>,
11157
11158
  }
11158
11159
 
11159
11160
  unsafe impl IntoValueFromNative for ExtractedDocument {}
@@ -11506,6 +11507,15 @@ impl ExtractedDocument {
11506
11507
  })?,
11507
11508
  None => Default::default(),
11508
11509
  },
11510
+ ocr_page_failures: match kwargs.get(ruby.to_symbol("ocr_page_failures")).filter(|v| !v.is_nil()) {
11511
+ Some(v) => Some(<Vec<OcrPageFailure>>::try_convert(v).map_err(|e| {
11512
+ magnus::Error::new(
11513
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
11514
+ format!("invalid value for `ocr_page_failures`: {}", e),
11515
+ )
11516
+ })?),
11517
+ None => None,
11518
+ },
11509
11519
  })
11510
11520
  }
11511
11521
 
@@ -11644,6 +11654,10 @@ impl ExtractedDocument {
11644
11654
  self.form_fields.clone()
11645
11655
  }
11646
11656
 
11657
+ fn ocr_page_failures(&self) -> Option<Vec<OcrPageFailure>> {
11658
+ self.ocr_page_failures.clone()
11659
+ }
11660
+
11647
11661
  #[allow(clippy::should_implement_trait)]
11648
11662
  fn to_s(&self) -> String {
11649
11663
  self.content.clone()
@@ -17364,7 +17378,7 @@ impl ImageExtractionConfig {
17364
17378
  format!("invalid value for `append_ocr_text`: {}", e),
17365
17379
  )
17366
17380
  })?,
17367
- None => false,
17381
+ None => true,
17368
17382
  },
17369
17383
  output_format: match kwargs.get(ruby.to_symbol("output_format")) {
17370
17384
  Some(v) => ImageOutputFormat::try_convert(v).map_err(|e| {
@@ -23264,6 +23278,99 @@ impl OcrMetadata {
23264
23278
  }
23265
23279
  }
23266
23280
 
23281
+ #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
23282
+ #[serde(default)]
23283
+ #[magnus::wrap(class = "Xberg::OcrPageFailure")]
23284
+ pub struct OcrPageFailure {
23285
+ page: u32,
23286
+ error: String,
23287
+ recovered: bool,
23288
+ }
23289
+
23290
+ unsafe impl IntoValueFromNative for OcrPageFailure {}
23291
+
23292
+ impl magnus::TryConvert for OcrPageFailure {
23293
+ fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
23294
+ if let Ok(r) = <&OcrPageFailure as magnus::TryConvert>::try_convert(val) {
23295
+ return Ok(r.clone());
23296
+ }
23297
+ let json_str: String = if let Ok(s) = <String as magnus::TryConvert>::try_convert(val) {
23298
+ s
23299
+ } else {
23300
+ val.funcall::<_, _, String>("to_json", ()).map_err(|e| {
23301
+ magnus::Error::new(
23302
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
23303
+ format!("no implicit conversion into OcrPageFailure: {}", e),
23304
+ )
23305
+ })?
23306
+ };
23307
+ serde_json::from_str::<OcrPageFailure>(&json_str).map_err(|e| {
23308
+ magnus::Error::new(
23309
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
23310
+ format!("failed to deserialize OcrPageFailure: {}", e),
23311
+ )
23312
+ })
23313
+ }
23314
+ }
23315
+
23316
+ unsafe impl TryConvertOwned for OcrPageFailure {}
23317
+
23318
+ impl Default for OcrPageFailure {
23319
+ fn default() -> Self {
23320
+ xberg::OcrPageFailure::default().into()
23321
+ }
23322
+ }
23323
+
23324
+ impl OcrPageFailure {
23325
+ fn new(args: &[magnus::Value]) -> Result<Self, magnus::Error> {
23326
+ let ruby = unsafe { magnus::Ruby::get_unchecked() };
23327
+ let args = magnus::scan_args::scan_args::<(), (Option<magnus::RHash>,), (), (), (), ()>(args)?;
23328
+ let (kwargs_opt,) = args.optional;
23329
+ let kwargs = kwargs_opt.unwrap_or_else(|| ruby.hash_new());
23330
+ Ok(Self {
23331
+ page: match kwargs.get(ruby.to_symbol("page")) {
23332
+ Some(v) => u32::try_convert(v).map_err(|e| {
23333
+ magnus::Error::new(
23334
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
23335
+ format!("invalid value for `page`: {}", e),
23336
+ )
23337
+ })?,
23338
+ None => Default::default(),
23339
+ },
23340
+ error: match kwargs.get(ruby.to_symbol("error")) {
23341
+ Some(v) => String::try_convert(v).map_err(|e| {
23342
+ magnus::Error::new(
23343
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
23344
+ format!("invalid value for `error`: {}", e),
23345
+ )
23346
+ })?,
23347
+ None => Default::default(),
23348
+ },
23349
+ recovered: match kwargs.get(ruby.to_symbol("recovered")) {
23350
+ Some(v) => bool::try_convert(v).map_err(|e| {
23351
+ magnus::Error::new(
23352
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
23353
+ format!("invalid value for `recovered`: {}", e),
23354
+ )
23355
+ })?,
23356
+ None => Default::default(),
23357
+ },
23358
+ })
23359
+ }
23360
+
23361
+ fn page(&self) -> u32 {
23362
+ self.page
23363
+ }
23364
+
23365
+ fn error(&self) -> String {
23366
+ self.error.clone()
23367
+ }
23368
+
23369
+ fn recovered(&self) -> bool {
23370
+ self.recovered
23371
+ }
23372
+ }
23373
+
23267
23374
  #[derive(Clone, Debug, serde::Serialize)]
23268
23375
  #[magnus::wrap(class = "Xberg::OcrPipelineConfig")]
23269
23376
  pub struct OcrPipelineConfig {
@@ -25540,6 +25647,7 @@ pub struct PageConfig {
25540
25647
  extract_pages: bool,
25541
25648
  insert_page_markers: bool,
25542
25649
  marker_format: String,
25650
+ keep_native_content: bool,
25543
25651
  }
25544
25652
 
25545
25653
  unsafe impl IntoValueFromNative for PageConfig {}
@@ -25623,6 +25731,15 @@ impl PageConfig {
25623
25731
  "
25624
25732
  .to_string(),
25625
25733
  },
25734
+ keep_native_content: match kwargs.get(ruby.to_symbol("keep_native_content")) {
25735
+ Some(v) => bool::try_convert(v).map_err(|e| {
25736
+ magnus::Error::new(
25737
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
25738
+ format!("invalid value for `keep_native_content`: {}", e),
25739
+ )
25740
+ })?,
25741
+ None => false,
25742
+ },
25626
25743
  })
25627
25744
  }
25628
25745
 
@@ -25637,6 +25754,10 @@ impl PageConfig {
25637
25754
  fn marker_format(&self) -> String {
25638
25755
  self.marker_format.clone()
25639
25756
  }
25757
+
25758
+ fn keep_native_content(&self) -> bool {
25759
+ self.keep_native_content
25760
+ }
25640
25761
  }
25641
25762
 
25642
25763
  #[derive(Clone, Debug, serde::Serialize)]
@@ -25654,6 +25775,7 @@ pub struct PageContent {
25654
25775
  section_name: Option<String>,
25655
25776
  sheet_name: Option<String>,
25656
25777
  ocr_confidence: Option<PageOcrConfidence>,
25778
+ native_content: Option<String>,
25657
25779
  }
25658
25780
 
25659
25781
  unsafe impl IntoValueFromNative for PageContent {}
@@ -25707,6 +25829,7 @@ impl Default for PageContent {
25707
25829
  section_name: None,
25708
25830
  sheet_name: None,
25709
25831
  ocr_confidence: None,
25832
+ native_content: None,
25710
25833
  }
25711
25834
  }
25712
25835
  }
@@ -25829,6 +25952,15 @@ impl PageContent {
25829
25952
  })?),
25830
25953
  None => None,
25831
25954
  },
25955
+ native_content: match kwargs.get(ruby.to_symbol("native_content")).filter(|v| !v.is_nil()) {
25956
+ Some(v) => Some(String::try_convert(v).map_err(|e| {
25957
+ magnus::Error::new(
25958
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
25959
+ format!("invalid value for `native_content`: {}", e),
25960
+ )
25961
+ })?),
25962
+ None => None,
25963
+ },
25832
25964
  })
25833
25965
  }
25834
25966
 
@@ -25880,6 +26012,10 @@ impl PageContent {
25880
26012
  self.ocr_confidence.clone()
25881
26013
  }
25882
26014
 
26015
+ fn native_content(&self) -> Option<String> {
26016
+ self.native_content.clone()
26017
+ }
26018
+
25883
26019
  #[allow(clippy::should_implement_trait)]
25884
26020
  fn to_s(&self) -> String {
25885
26021
  self.content.clone()
@@ -50369,6 +50505,7 @@ impl From<ExtractedDocument> for xberg::ExtractedDocument {
50369
50505
  __result.redaction_report = val.redaction_report.map(Into::into);
50370
50506
  __result.formulas = val.formulas.into_iter().map(Into::into).collect();
50371
50507
  __result.form_fields = val.form_fields.into_iter().map(Into::into).collect();
50508
+ __result.ocr_page_failures = val.ocr_page_failures.map(|v| v.into_iter().map(Into::into).collect());
50372
50509
  __result
50373
50510
  }
50374
50511
  }
@@ -50417,6 +50554,7 @@ impl From<xberg::ExtractedDocument> for ExtractedDocument {
50417
50554
  redaction_report: val.redaction_report.map(Into::into),
50418
50555
  formulas: val.formulas.into_iter().map(Into::into).collect(),
50419
50556
  form_fields: val.form_fields.into_iter().map(Into::into).collect(),
50557
+ ocr_page_failures: val.ocr_page_failures.map(|v| v.into_iter().map(Into::into).collect()),
50420
50558
  }
50421
50559
  }
50422
50560
  }
@@ -52590,6 +52728,28 @@ impl From<xberg::OcrMetadata> for OcrMetadata {
52590
52728
  }
52591
52729
  }
52592
52730
 
52731
+ #[allow(clippy::needless_update)]
52732
+ impl From<OcrPageFailure> for xberg::OcrPageFailure {
52733
+ fn from(val: OcrPageFailure) -> Self {
52734
+ Self {
52735
+ page: val.page,
52736
+ error: val.error,
52737
+ recovered: val.recovered,
52738
+ ..Default::default()
52739
+ }
52740
+ }
52741
+ }
52742
+
52743
+ impl From<xberg::OcrPageFailure> for OcrPageFailure {
52744
+ fn from(val: xberg::OcrPageFailure) -> Self {
52745
+ Self {
52746
+ page: val.page,
52747
+ error: val.error.to_string(),
52748
+ recovered: val.recovered,
52749
+ }
52750
+ }
52751
+ }
52752
+
52593
52753
  #[allow(clippy::useless_conversion)]
52594
52754
  impl From<OcrPipelineConfig> for xberg::OcrPipelineConfig {
52595
52755
  fn from(val: OcrPipelineConfig) -> Self {
@@ -52913,6 +53073,7 @@ impl From<PageConfig> for xberg::PageConfig {
52913
53073
  extract_pages: val.extract_pages,
52914
53074
  insert_page_markers: val.insert_page_markers,
52915
53075
  marker_format: val.marker_format,
53076
+ keep_native_content: val.keep_native_content,
52916
53077
  ..Default::default()
52917
53078
  }
52918
53079
  }
@@ -52924,6 +53085,7 @@ impl From<xberg::PageConfig> for PageConfig {
52924
53085
  extract_pages: val.extract_pages,
52925
53086
  insert_page_markers: val.insert_page_markers,
52926
53087
  marker_format: val.marker_format.to_string(),
53088
+ keep_native_content: val.keep_native_content,
52927
53089
  }
52928
53090
  }
52929
53091
  }
@@ -52944,6 +53106,7 @@ impl From<PageContent> for xberg::PageContent {
52944
53106
  section_name: val.section_name,
52945
53107
  sheet_name: val.sheet_name,
52946
53108
  ocr_confidence: val.ocr_confidence.map(Into::into),
53109
+ native_content: val.native_content,
52947
53110
  }
52948
53111
  }
52949
53112
  }
@@ -52964,6 +53127,7 @@ impl From<xberg::PageContent> for PageContent {
52964
53127
  section_name: val.section_name.map(|v| v.to_string()),
52965
53128
  sheet_name: val.sheet_name.map(|v| v.to_string()),
52966
53129
  ocr_confidence: val.ocr_confidence.map(Into::into),
53130
+ native_content: val.native_content.map(|v| v.to_string()),
52967
53131
  }
52968
53132
  }
52969
53133
  }
@@ -59145,6 +59309,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
59145
59309
 
59146
59310
  class.define_method("form_fields", method!(ExtractedDocument::form_fields, 0))?;
59147
59311
 
59312
+ class.define_method("ocr_page_failures", method!(ExtractedDocument::ocr_page_failures, 0))?;
59313
+
59148
59314
  class.define_method("to_s", method!(ExtractedDocument::to_s, 0))?;
59149
59315
 
59150
59316
  let class = module.define_class("ExtractedImage", ruby.class_object())?;
@@ -60725,6 +60891,16 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
60725
60891
 
60726
60892
  class.define_method("table_cols", method!(OcrMetadata::table_cols, 0))?;
60727
60893
 
60894
+ let class = module.define_class("OcrPageFailure", ruby.class_object())?;
60895
+
60896
+ class.define_singleton_method("new", function!(OcrPageFailure::new, -1))?;
60897
+
60898
+ class.define_method("page", method!(OcrPageFailure::page, 0))?;
60899
+
60900
+ class.define_method("error", method!(OcrPageFailure::error, 0))?;
60901
+
60902
+ class.define_method("recovered", method!(OcrPageFailure::recovered, 0))?;
60903
+
60728
60904
  let class = module.define_class("OcrPipelineConfig", ruby.class_object())?;
60729
60905
 
60730
60906
  class.define_singleton_method("new", function!(OcrPipelineConfig::new, -1))?;
@@ -61066,6 +61242,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
61066
61242
 
61067
61243
  class.define_method("marker_format", method!(PageConfig::marker_format, 0))?;
61068
61244
 
61245
+ class.define_method("keep_native_content", method!(PageConfig::keep_native_content, 0))?;
61246
+
61069
61247
  let class = module.define_class("PageContent", ruby.class_object())?;
61070
61248
 
61071
61249
  class.define_singleton_method("new", function!(PageContent::new, -1))?;
@@ -61094,6 +61272,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
61094
61272
 
61095
61273
  class.define_method("ocr_confidence", method!(PageContent::ocr_confidence, 0))?;
61096
61274
 
61275
+ class.define_method("native_content", method!(PageContent::native_content, 0))?;
61276
+
61097
61277
  class.define_method("to_s", method!(PageContent::to_s, 0))?;
61098
61278
 
61099
61279
  let class = module.define_class("PageDimensions", ruby.class_object())?;
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:988034bb9172ee9a4ecaa49221da1ceed7f562d9d0ef1192f4a91b54dfed0ed1
2
+ # alef:hash:d085ba2c8857919005ea190a65fd7a877a8dc2c927c62dd028aa57cbf320ff25
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.3.6"
9
+ VERSION = "1.3.8"
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:d01bd27d5fa9368a18dda14ba966abab79e6f319668303eaa72b202e75e41946
2
+ # alef:hash:391c13182c1007f7f60874af34999c74cc5a82624a3d106886fff5a69e89545e
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
@@ -906,8 +906,9 @@ def initialize: (sheets: Array[ExcelSheet], metadata: Hash[String, String], ?rev
906
906
  attr_reader redaction_report: RedactionReport?
907
907
  attr_reader formulas: Array[Formula]
908
908
  attr_reader form_fields: Array[PdfFormField]
909
+ attr_reader ocr_page_failures: Array[OcrPageFailure]?
909
910
 
910
- def initialize: (?content: String, ?mime_type: String, ?metadata: Metadata, ?extraction_method: enum_ExtractionMethod, ?tables: Array[Table], ?counts: DocumentCounts, ?detected_languages: Array[String], ?detected_language_confidences: Array[LanguageConfidence], ?chunks: Array[Chunk], ?images: Array[ExtractedImage], ?pages: Array[PageContent], ?elements: Array[Element], ?djot_content: DjotContent, ?ocr_elements: Array[OcrElement], ?document: DocumentStructure, ?extracted_keywords: Array[Keyword], ?quality_score: Float, ?processing_warnings: Array[ProcessingWarning], ?annotations: Array[PdfAnnotation], ?children: Array[ArchiveEntry], ?uris: Array[ExtractedUri], ?revisions: Array[DocumentRevision], ?structured_output: String, ?code_intelligence: String, ?llm_usage: Array[LlmUsage], ?entities: Array[Entity], ?summary: DocumentSummary, ?extraction_confidence: ExtractionConfidence, ?translation: Translation, ?page_classifications: Array[PageClassification], ?redaction_report: RedactionReport, ?formulas: Array[Formula], ?form_fields: Array[PdfFormField]) -> void
911
+ def initialize: (?content: String, ?mime_type: String, ?metadata: Metadata, ?extraction_method: enum_ExtractionMethod, ?tables: Array[Table], ?counts: DocumentCounts, ?detected_languages: Array[String], ?detected_language_confidences: Array[LanguageConfidence], ?chunks: Array[Chunk], ?images: Array[ExtractedImage], ?pages: Array[PageContent], ?elements: Array[Element], ?djot_content: DjotContent, ?ocr_elements: Array[OcrElement], ?document: DocumentStructure, ?extracted_keywords: Array[Keyword], ?quality_score: Float, ?processing_warnings: Array[ProcessingWarning], ?annotations: Array[PdfAnnotation], ?children: Array[ArchiveEntry], ?uris: Array[ExtractedUri], ?revisions: Array[DocumentRevision], ?structured_output: String, ?code_intelligence: String, ?llm_usage: Array[LlmUsage], ?entities: Array[Entity], ?summary: DocumentSummary, ?extraction_confidence: ExtractionConfidence, ?translation: Translation, ?page_classifications: Array[PageClassification], ?redaction_report: RedactionReport, ?formulas: Array[Formula], ?form_fields: Array[PdfFormField], ?ocr_page_failures: Array[OcrPageFailure]) -> void
911
912
  end
912
913
 
913
914
  class ExtractedImage
@@ -1769,6 +1770,14 @@ def initialize: (?content: String, ?mime_type: String, ?metadata: Hash[String, S
1769
1770
  def initialize: (?language: String, ?psm: Integer, ?output_format: String, ?table_count: Integer, ?table_rows: Integer, ?table_cols: Integer) -> void
1770
1771
  end
1771
1772
 
1773
+ class OcrPageFailure
1774
+ attr_reader page: Integer
1775
+ attr_reader error: String
1776
+ attr_reader recovered: bool
1777
+
1778
+ def initialize: (?page: Integer, ?error: String, ?recovered: bool) -> void
1779
+ end
1780
+
1772
1781
  class OcrPipelineConfig
1773
1782
  attr_reader stages: Array[OcrPipelineStage]
1774
1783
  attr_reader quality_thresholds: OcrQualityThresholds
@@ -1929,8 +1938,9 @@ def initialize: (?prompt_template: String, labels: Array[String], multi_label: b
1929
1938
  attr_reader extract_pages: bool
1930
1939
  attr_reader insert_page_markers: bool
1931
1940
  attr_reader marker_format: String
1941
+ attr_reader keep_native_content: bool
1932
1942
 
1933
- def initialize: (?extract_pages: bool, ?insert_page_markers: bool, ?marker_format: String) -> void
1943
+ def initialize: (?extract_pages: bool, ?insert_page_markers: bool, ?marker_format: String, ?keep_native_content: bool) -> void
1934
1944
  end
1935
1945
 
1936
1946
  class PageContent
@@ -1946,8 +1956,9 @@ def initialize: (?prompt_template: String, labels: Array[String], multi_label: b
1946
1956
  attr_reader section_name: String?
1947
1957
  attr_reader sheet_name: String?
1948
1958
  attr_reader ocr_confidence: PageOcrConfidence?
1959
+ attr_reader native_content: String?
1949
1960
 
1950
- def initialize: (page_number: Integer, content: String, tables: Array[Table], image_indices: Array[Integer], ?image_preprocessing: ImagePreprocessingMetadata, ?hierarchy: PageHierarchy, ?is_blank: bool, ?layout_regions: Array[LayoutRegion], ?speaker_notes: String, ?section_name: String, ?sheet_name: String, ?ocr_confidence: PageOcrConfidence) -> void
1961
+ def initialize: (page_number: Integer, content: String, tables: Array[Table], image_indices: Array[Integer], ?image_preprocessing: ImagePreprocessingMetadata, ?hierarchy: PageHierarchy, ?is_blank: bool, ?layout_regions: Array[LayoutRegion], ?speaker_notes: String, ?section_name: String, ?sheet_name: String, ?ocr_confidence: PageOcrConfidence, ?native_content: String) -> void
1951
1962
  end
1952
1963
 
1953
1964
  class PageDimensions
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xberg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.8
5
5
  platform: ruby
6
6
  authors:
7
- - Na'aman Hirschfeld <naaman@xberg.io>
7
+ - Na'aman Hirschfeld
8
+ - Tobias Perlstein
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2026-10-07 00:00:00.000000000 Z
12
+ date: 2026-10-11 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rb_sys
@@ -36,16 +37,18 @@ dependencies:
36
37
  requirements:
37
38
  - - "~>"
38
39
  - !ruby/object:Gem::Version
39
- version: '0.5'
40
+ version: '0.6'
40
41
  type: :runtime
41
42
  prerelease: false
42
43
  version_requirements: !ruby/object:Gem::Requirement
43
44
  requirements:
44
45
  - - "~>"
45
46
  - !ruby/object:Gem::Version
46
- version: '0.5'
47
+ version: '0.6'
47
48
  description: High-performance document intelligence library
48
49
  email:
50
+ - naaman@xberg.io
51
+ - tobias@xberg.io
49
52
  executables: []
50
53
  extensions:
51
54
  - ext/xberg_rb/native/extconf.rb