xberg 1.3.0 → 1.3.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 +60 -71
- data/ext/xberg_rb/native/Cargo.toml +6 -6
- data/ext/xberg_rb/src/lib.rs +909 -146
- data/lib/xberg/version.rb +2 -2
- data/sig/types.rbs +34 -6
- metadata +2 -2
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:fe82079c10797b9f3415c2e9fe70094470cb68e2c7bb3d301d89afea37551beb
|
|
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.
|
|
9
|
+
VERSION = "1.3.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:4d6e82c5b0834d91c2575ca21fe65ed7dc5bb424ab80623cb550f60e8cd268ad
|
|
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
|
|
@@ -354,6 +355,7 @@ def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_
|
|
|
354
355
|
attr_reader strip_tags: Array[String]
|
|
355
356
|
attr_reader preserve_tags: Array[String]
|
|
356
357
|
attr_reader skip_images: bool
|
|
358
|
+
attr_reader inline_data_media: enum_InlineDataMedia
|
|
357
359
|
attr_reader url_escape_style: enum_UrlEscapeStyle
|
|
358
360
|
attr_reader link_style: enum_LinkStyle
|
|
359
361
|
attr_reader output_format: enum_HtmlToMarkdownRsOutputFormat
|
|
@@ -367,7 +369,7 @@ def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_
|
|
|
367
369
|
attr_reader tier_strategy: enum_TierStrategy
|
|
368
370
|
attr_reader base_url: String?
|
|
369
371
|
|
|
370
|
-
def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_HtmlToMarkdownRsOutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: enum_TierStrategy, ?base_url: String) -> void
|
|
372
|
+
def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?inline_data_media: enum_InlineDataMedia, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_HtmlToMarkdownRsOutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: enum_TierStrategy, ?base_url: String) -> void
|
|
371
373
|
end
|
|
372
374
|
|
|
373
375
|
class CoreProperties
|
|
@@ -845,6 +847,16 @@ def initialize: (name: String, markdown: String, row_count: Integer, col_count:
|
|
|
845
847
|
def initialize: (sheets: Array[ExcelSheet], metadata: Hash[String, String], ?revisions: Array[DocumentRevision]) -> void
|
|
846
848
|
end
|
|
847
849
|
|
|
850
|
+
class ExternalRedactionFinding
|
|
851
|
+
attr_reader label: String
|
|
852
|
+
attr_reader text: String?
|
|
853
|
+
attr_reader start: Integer?
|
|
854
|
+
attr_reader end: Integer?
|
|
855
|
+
attr_reader score: Float?
|
|
856
|
+
|
|
857
|
+
def initialize: (?label: String, ?text: String, ?start: Integer, ?end: Integer, ?score: Float) -> void
|
|
858
|
+
end
|
|
859
|
+
|
|
848
860
|
class ExtractInput
|
|
849
861
|
attr_reader kind: enum_ExtractInputKind
|
|
850
862
|
attr_reader bytes: String?
|
|
@@ -1692,6 +1704,7 @@ def initialize: (name: String, supported_languages: Array[String]) -> void
|
|
|
1692
1704
|
attr_reader tesseract_config: TesseractConfig?
|
|
1693
1705
|
attr_reader output_format: OutputFormat?
|
|
1694
1706
|
attr_reader paddle_ocr_config: String?
|
|
1707
|
+
attr_reader paddle_ocr_settings: PaddleOcrConfig?
|
|
1695
1708
|
attr_reader backend_options: String?
|
|
1696
1709
|
attr_reader element_config: OcrElementConfig?
|
|
1697
1710
|
attr_reader quality_thresholds: OcrQualityThresholds?
|
|
@@ -1706,7 +1719,7 @@ def initialize: (name: String, supported_languages: Array[String]) -> void
|
|
|
1706
1719
|
attr_reader tessdata_path: String?
|
|
1707
1720
|
attr_reader numeric_repair: bool
|
|
1708
1721
|
|
|
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
|
|
1722
|
+
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
1723
|
end
|
|
1711
1724
|
|
|
1712
1725
|
class OcrElement
|
|
@@ -1765,10 +1778,11 @@ def initialize: (stages: Array[OcrPipelineStage], quality_thresholds: OcrQuality
|
|
|
1765
1778
|
attr_reader language: Array[String]?
|
|
1766
1779
|
attr_reader tesseract_config: TesseractConfig?
|
|
1767
1780
|
attr_reader paddle_ocr_config: String?
|
|
1781
|
+
attr_reader paddle_ocr_settings: PaddleOcrConfig?
|
|
1768
1782
|
attr_reader vlm_config: LlmConfig?
|
|
1769
1783
|
attr_reader backend_options: String?
|
|
1770
1784
|
|
|
1771
|
-
def initialize: (backend: String, priority: Integer, ?language: Array[String], ?tesseract_config: TesseractConfig, ?paddle_ocr_config: String, ?vlm_config: LlmConfig, ?backend_options: String) -> void
|
|
1785
|
+
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
1786
|
end
|
|
1773
1787
|
|
|
1774
1788
|
class OcrPoint
|
|
@@ -2264,8 +2278,12 @@ def initialize: (detection_bbox: BBox, cells: Array[Array[String]], markdown: St
|
|
|
2264
2278
|
attr_reader preserve_offsets: bool
|
|
2265
2279
|
attr_reader custom_terms: Array[RedactionTerm]
|
|
2266
2280
|
attr_reader custom_patterns: Array[RedactionPattern]
|
|
2281
|
+
attr_reader findings: Array[ExternalRedactionFinding]
|
|
2282
|
+
attr_reader min_score: Float?
|
|
2283
|
+
attr_reader findings_path: String?
|
|
2284
|
+
attr_reader findings_offset_encoding: enum_RedactionOffsetEncoding
|
|
2267
2285
|
|
|
2268
|
-
def initialize: (?categories: Array[PiiCategory], ?strategy: enum_RedactionStrategy, ?ner: NerConfig, ?preserve_offsets: bool, ?custom_terms: Array[RedactionTerm], ?custom_patterns: Array[RedactionPattern]) -> void
|
|
2286
|
+
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
2287
|
def validate: () -> void
|
|
2270
2288
|
end
|
|
2271
2289
|
|
|
@@ -2771,6 +2789,8 @@ def initialize: (?min: Integer, ?max: Integer, years: Array[Integer]) -> void
|
|
|
2771
2789
|
|
|
2772
2790
|
type enum_CandleTrocrVariant = :"base-printed" | :"large-printed" | :"base-handwritten" | :"large-handwritten"
|
|
2773
2791
|
|
|
2792
|
+
type enum_CaptionAltTextMode = :preserve | :combine | :replace
|
|
2793
|
+
|
|
2774
2794
|
class ChunkSizing
|
|
2775
2795
|
end
|
|
2776
2796
|
|
|
@@ -2851,6 +2871,8 @@ def initialize: (?min: Integer, ?max: Integer, years: Array[Integer]) -> void
|
|
|
2851
2871
|
|
|
2852
2872
|
type enum_ImageType = :"data-uri" | :"inline-svg" | :external | :relative
|
|
2853
2873
|
|
|
2874
|
+
type enum_InlineDataMedia = :Keep | :AltTextOnly | :DropElement
|
|
2875
|
+
|
|
2854
2876
|
type enum_InlineType = :text | :strong | :emphasis | :highlight | :subscript | :superscript | :insert | :delete | :code | :link | :image | :span | :math | :raw_inline | :footnote_ref | :symbol
|
|
2855
2877
|
|
|
2856
2878
|
type enum_JupyterCellRendering = :source | :outputs | :both
|
|
@@ -2926,6 +2948,8 @@ def initialize: (?min: Integer, ?max: Integer, years: Array[Integer]) -> void
|
|
|
2926
2948
|
|
|
2927
2949
|
type enum_ProcessingStage = :Early | :Middle | :Late
|
|
2928
2950
|
|
|
2951
|
+
type enum_RedactionOffsetEncoding = :utf8_bytes | :unicode_code_points | :utf16_code_units
|
|
2952
|
+
|
|
2929
2953
|
type enum_RedactionStrategy = :mask | :hash | :token_replace | :drop
|
|
2930
2954
|
|
|
2931
2955
|
type enum_ReductionLevel = :Off | :Light | :Moderate | :Aggressive | :Maximum
|
|
@@ -3002,6 +3026,8 @@ def self.extract: (ExtractInput input, ExtractionConfig config) -> ExtractionRes
|
|
|
3002
3026
|
|
|
3003
3027
|
def self.extract_batch: (Array[ExtractInput] inputs, ExtractionConfig config) -> ExtractionResult
|
|
3004
3028
|
|
|
3029
|
+
def self.extract_with_external_redaction: (ExtractInput input, ExtractionConfig config, String findings_json, ?String offset_encoding, ?Integer max_findings) -> ExtractionResult
|
|
3030
|
+
|
|
3005
3031
|
def self.find_unmarked_claims: (String markdown) -> Array[String]
|
|
3006
3032
|
|
|
3007
3033
|
def self.list_document_extractors: () -> Array[String]
|
|
@@ -3038,6 +3064,8 @@ def self.ocr_backend_supports_language_for: (String backend, String language, Oc
|
|
|
3038
3064
|
|
|
3039
3065
|
def self.pdf_page_count: (String pdf_bytes, ?String password) -> Integer
|
|
3040
3066
|
|
|
3067
|
+
def self.redact_external: (ExtractedDocument document, RedactionConfig config, String findings_json, ?String offset_encoding, ?Integer max_findings) -> ExtractedDocument
|
|
3068
|
+
|
|
3041
3069
|
def self.register_document_extractor: (_DocumentExtractor extractor) -> void
|
|
3042
3070
|
|
|
3043
3071
|
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.
|
|
4
|
+
version: 1.3.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-
|
|
11
|
+
date: 2026-10-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|