Skip to main content

ParsingConfig

Struct ParsingConfig 

Source
pub struct ParsingConfig {
Show 13 fields pub document_type: DocumentType, pub section_and_hierarchy: SectionAndHierarchyConfig, pub spatial_clustering: SpatialClusteringConfig, pub section_patterns: Vec<String>, pub include_raw_tika: bool, pub pipeline: PipelineConfig, pub list_detection: ListDetectionConfig, pub size_enforcer: SizeEnforcerConfig, pub minimal_parse: bool, pub section_detection_v2: SectionDetectionV2Config, pub node_type_clustering: NodeTypeClusteringConfig, pub graph_sanity: GraphSanityConfig, pub dump_analytics: bool,
}

Fields§

§document_type: DocumentType§section_and_hierarchy: SectionAndHierarchyConfig§spatial_clustering: SpatialClusteringConfig§section_patterns: Vec<String>§include_raw_tika: bool

Include raw Tika XML/HTML output in graph metadata for debugging

§pipeline: PipelineConfig

Pipeline configuration - defines which rules to run and in what order

§list_detection: ListDetectionConfig

List detection configuration

§size_enforcer: SizeEnforcerConfig

Size enforcement configuration

§minimal_parse: bool

Minimal parse mode - bypasses all rule processing and returns only base conversion

§section_detection_v2: SectionDetectionV2Config

Configuration for the V2 section detection rule (Block 03). Uses #[serde(default)] so existing YAML configs without this key still deserialize.

§node_type_clustering: NodeTypeClusteringConfig

Configuration for the NodeTypeClustering rule (CR-29; Block 05b — renamed from ParagraphClustering once Section started flowing through the same rule). Uses #[serde(default)] so existing YAML configs without this key still deserialize. Also accepts the legacy paragraph_clustering: block via the migration shim on NodeTypeClusteringConfig deserialization (see below).

§graph_sanity: GraphSanityConfig

Configuration for the graph sanity-check-and-correction pipe (CR-28). Runs post-graph-build; defaults are safe (enabled with all invariants in check + correct mode).

§dump_analytics: bool

When true, the analytics pre-pass writes one JSON file per stat kind to {cache_dir}/stat/<stat_name>/<pdf_hash>.json after finalization. This is a sidecar for offline tooling — not a pipeline cache (output is not read back). Default true for development; flip off in production where the extra writes are unwanted.

Implementations§

Source§

impl ParsingConfig

Source

pub fn load_from_file(path: &str) -> Result<ParsingConfig, Error>

Load config from file path (functional approach)

Source

pub fn load_with_fallback(path: Option<&str>) -> ParsingConfig

Load config with fallback to default

Trait Implementations§

Source§

impl Clone for ParsingConfig

Source§

fn clone(&self) -> ParsingConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ParsingConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for ParsingConfig

Source§

fn default() -> ParsingConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ParsingConfig

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<ParsingConfig, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ParsingConfig

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.