xberg 1.3.0 → 1.3.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.
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:05ecab5f3a98752913f33a49a0d8e2003efdf37c21a36463c366e780e9f9f882
2
+ # alef:hash:c7a2e4c0b7a9168d08ef7f09b8b967926ae2bdff61094ac93d54a86a9813924d
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.0"
9
+ VERSION = "1.3.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:04f362999b06cc48b7e517b58690ed05ddc13831ae9ef1b20fac65475ac1f94e
2
+ # alef:hash:714d17cb31a0dbcf05ffbfd2931268de7747a7876060ed07e56d20da729e9edf
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
@@ -125,8 +125,9 @@ def initialize: (?mode: enum_BrowserMode, ?backend: enum_BrowserBackend, ?endpoi
125
125
  attr_reader llm: LlmConfig
126
126
  attr_reader prompt: String?
127
127
  attr_reader min_image_area: Integer
128
+ attr_reader alt_text: enum_CaptionAltTextMode
128
129
 
129
- def initialize: (llm: LlmConfig, ?prompt: String, min_image_area: Integer) -> void
130
+ def initialize: (llm: LlmConfig, ?prompt: String, min_image_area: Integer, alt_text: enum_CaptionAltTextMode) -> void
130
131
  end
131
132
 
132
133
  class CellChange
@@ -845,6 +846,16 @@ def initialize: (name: String, markdown: String, row_count: Integer, col_count:
845
846
  def initialize: (sheets: Array[ExcelSheet], metadata: Hash[String, String], ?revisions: Array[DocumentRevision]) -> void
846
847
  end
847
848
 
849
+ class ExternalRedactionFinding
850
+ attr_reader label: String
851
+ attr_reader text: String?
852
+ attr_reader start: Integer?
853
+ attr_reader end: Integer?
854
+ attr_reader score: Float?
855
+
856
+ def initialize: (?label: String, ?text: String, ?start: Integer, ?end: Integer, ?score: Float) -> void
857
+ end
858
+
848
859
  class ExtractInput
849
860
  attr_reader kind: enum_ExtractInputKind
850
861
  attr_reader bytes: String?
@@ -1692,6 +1703,7 @@ def initialize: (name: String, supported_languages: Array[String]) -> void
1692
1703
  attr_reader tesseract_config: TesseractConfig?
1693
1704
  attr_reader output_format: OutputFormat?
1694
1705
  attr_reader paddle_ocr_config: String?
1706
+ attr_reader paddle_ocr_settings: PaddleOcrConfig?
1695
1707
  attr_reader backend_options: String?
1696
1708
  attr_reader element_config: OcrElementConfig?
1697
1709
  attr_reader quality_thresholds: OcrQualityThresholds?
@@ -1706,7 +1718,7 @@ def initialize: (name: String, supported_languages: Array[String]) -> void
1706
1718
  attr_reader tessdata_path: String?
1707
1719
  attr_reader numeric_repair: bool
1708
1720
 
1709
- def initialize: (?enabled: bool, ?backend: String, ?language: Array[String], ?tesseract_config: TesseractConfig, ?output_format: OutputFormat, ?paddle_ocr_config: String, ?backend_options: String, ?element_config: OcrElementConfig, ?quality_thresholds: OcrQualityThresholds, ?pipeline: OcrPipelineConfig, ?auto_rotate: bool, ?vlm_fallback: VlmFallbackPolicy, ?vlm_config: LlmConfig, ?vlm_prompt: String, ?acceleration: AccelerationConfig, ?security_limits: SecurityLimits, ?tessdata_bytes: Hash[String, String], ?tessdata_path: String, ?numeric_repair: bool) -> void
1721
+ def initialize: (?enabled: bool, ?backend: String, ?language: Array[String], ?tesseract_config: TesseractConfig, ?output_format: OutputFormat, ?paddle_ocr_config: String, ?paddle_ocr_settings: PaddleOcrConfig, ?backend_options: String, ?element_config: OcrElementConfig, ?quality_thresholds: OcrQualityThresholds, ?pipeline: OcrPipelineConfig, ?auto_rotate: bool, ?vlm_fallback: VlmFallbackPolicy, ?vlm_config: LlmConfig, ?vlm_prompt: String, ?acceleration: AccelerationConfig, ?security_limits: SecurityLimits, ?tessdata_bytes: Hash[String, String], ?tessdata_path: String, ?numeric_repair: bool) -> void
1710
1722
  end
1711
1723
 
1712
1724
  class OcrElement
@@ -1765,10 +1777,11 @@ def initialize: (stages: Array[OcrPipelineStage], quality_thresholds: OcrQuality
1765
1777
  attr_reader language: Array[String]?
1766
1778
  attr_reader tesseract_config: TesseractConfig?
1767
1779
  attr_reader paddle_ocr_config: String?
1780
+ attr_reader paddle_ocr_settings: PaddleOcrConfig?
1768
1781
  attr_reader vlm_config: LlmConfig?
1769
1782
  attr_reader backend_options: String?
1770
1783
 
1771
- def initialize: (backend: String, priority: Integer, ?language: Array[String], ?tesseract_config: TesseractConfig, ?paddle_ocr_config: String, ?vlm_config: LlmConfig, ?backend_options: String) -> void
1784
+ def initialize: (backend: String, priority: Integer, ?language: Array[String], ?tesseract_config: TesseractConfig, ?paddle_ocr_config: String, ?paddle_ocr_settings: PaddleOcrConfig, ?vlm_config: LlmConfig, ?backend_options: String) -> void
1772
1785
  end
1773
1786
 
1774
1787
  class OcrPoint
@@ -2264,8 +2277,12 @@ def initialize: (detection_bbox: BBox, cells: Array[Array[String]], markdown: St
2264
2277
  attr_reader preserve_offsets: bool
2265
2278
  attr_reader custom_terms: Array[RedactionTerm]
2266
2279
  attr_reader custom_patterns: Array[RedactionPattern]
2280
+ attr_reader findings: Array[ExternalRedactionFinding]
2281
+ attr_reader min_score: Float?
2282
+ attr_reader findings_path: String?
2283
+ attr_reader findings_offset_encoding: enum_RedactionOffsetEncoding
2267
2284
 
2268
- def initialize: (?categories: Array[PiiCategory], ?strategy: enum_RedactionStrategy, ?ner: NerConfig, ?preserve_offsets: bool, ?custom_terms: Array[RedactionTerm], ?custom_patterns: Array[RedactionPattern]) -> void
2285
+ def initialize: (?categories: Array[PiiCategory], ?strategy: enum_RedactionStrategy, ?ner: NerConfig, ?preserve_offsets: bool, ?custom_terms: Array[RedactionTerm], ?custom_patterns: Array[RedactionPattern], ?findings: Array[ExternalRedactionFinding], ?min_score: Float, ?findings_path: String, ?findings_offset_encoding: enum_RedactionOffsetEncoding) -> void
2269
2286
  def validate: () -> void
2270
2287
  end
2271
2288
 
@@ -2771,6 +2788,8 @@ def initialize: (?min: Integer, ?max: Integer, years: Array[Integer]) -> void
2771
2788
 
2772
2789
  type enum_CandleTrocrVariant = :"base-printed" | :"large-printed" | :"base-handwritten" | :"large-handwritten"
2773
2790
 
2791
+ type enum_CaptionAltTextMode = :preserve | :combine | :replace
2792
+
2774
2793
  class ChunkSizing
2775
2794
  end
2776
2795
 
@@ -2926,6 +2945,8 @@ def initialize: (?min: Integer, ?max: Integer, years: Array[Integer]) -> void
2926
2945
 
2927
2946
  type enum_ProcessingStage = :Early | :Middle | :Late
2928
2947
 
2948
+ type enum_RedactionOffsetEncoding = :utf8_bytes | :unicode_code_points | :utf16_code_units
2949
+
2929
2950
  type enum_RedactionStrategy = :mask | :hash | :token_replace | :drop
2930
2951
 
2931
2952
  type enum_ReductionLevel = :Off | :Light | :Moderate | :Aggressive | :Maximum
@@ -3002,6 +3023,8 @@ def self.extract: (ExtractInput input, ExtractionConfig config) -> ExtractionRes
3002
3023
 
3003
3024
  def self.extract_batch: (Array[ExtractInput] inputs, ExtractionConfig config) -> ExtractionResult
3004
3025
 
3026
+ def self.extract_with_external_redaction: (ExtractInput input, ExtractionConfig config, String findings_json, ?String offset_encoding, ?Integer max_findings) -> ExtractionResult
3027
+
3005
3028
  def self.find_unmarked_claims: (String markdown) -> Array[String]
3006
3029
 
3007
3030
  def self.list_document_extractors: () -> Array[String]
@@ -3038,6 +3061,8 @@ def self.ocr_backend_supports_language_for: (String backend, String language, Oc
3038
3061
 
3039
3062
  def self.pdf_page_count: (String pdf_bytes, ?String password) -> Integer
3040
3063
 
3064
+ def self.redact_external: (ExtractedDocument document, RedactionConfig config, String findings_json, ?String offset_encoding, ?Integer max_findings) -> ExtractedDocument
3065
+
3041
3066
  def self.register_document_extractor: (_DocumentExtractor extractor) -> void
3042
3067
 
3043
3068
  def self.register_renderer: (_Renderer renderer) -> void
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.3.0
4
+ version: 1.3.2
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-29 00:00:00.000000000 Z
11
+ date: 2026-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys