kopitiam-document 0.1.0

Structural document reconstruction (paragraphs, headings, tables, columns) for KOPITIAM's Document Engine.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{Block, Citation};

#[derive(Debug, Clone, Default, PartialEq)]
pub struct Metadata {
    pub source_pages: usize,
}

#[derive(Debug, Clone, Default, PartialEq)]
pub struct Document {
    pub title: Option<String>,
    pub metadata: Metadata,
    pub blocks: Vec<Block>,
    /// Citations detected in paragraph text, for provenance reporting. See
    /// [`Citation`] -- these are pointers into already-rendered text, not
    /// separate content.
    pub citations: Vec<Citation>,
}