pub struct PictureDescription {
pub text: String,
pub provenance: String,
}Expand description
A picture’s text annotation — docling-core’s PictureDescriptionData
(text + provenance), the one shape upstream uses for every model that
writes prose about a picture. The picture-OCR enrichment (#645) fills it
with the lines the OCR engine read off the image, provenance naming the
engine (ppocr / tesseract) the way a VLM description names its model.
Fields§
§text: String§provenance: StringImplementations§
Source§impl PictureDescription
impl PictureDescription
Sourcepub const ALT_TEXT: &'static str = "alt_text"
pub const ALT_TEXT: &'static str = "alt_text"
The provenance of a picture’s author-written alt text (#676): the
descr (else title) of an OOXML picture’s non-visual properties
— what DOCX, PPTX and XLSX authors type into “Alt Text”. JSON writes
it as meta.description.created_by; Markdown renders it under strict
Markdown or DoclingDocument::picture_alt_text, HTML under the latter.
Sourcepub fn alt_text(text: impl Into<String>) -> Self
pub fn alt_text(text: impl Into<String>) -> Self
An alt-text description, see Self::ALT_TEXT.
Sourcepub fn is_alt_text(&self) -> bool
pub fn is_alt_text(&self) -> bool
Whether this description is a picture’s alt text.
Trait Implementations§
Source§impl Clone for PictureDescription
impl Clone for PictureDescription
Source§impl Debug for PictureDescription
impl Debug for PictureDescription
impl Eq for PictureDescription
Source§impl PartialEq for PictureDescription
impl PartialEq for PictureDescription
impl StructuralPartialEq for PictureDescription
Auto Trait Implementations§
impl Freeze for PictureDescription
impl RefUnwindSafe for PictureDescription
impl Send for PictureDescription
impl Sync for PictureDescription
impl Unpin for PictureDescription
impl UnsafeUnpin for PictureDescription
impl UnwindSafe for PictureDescription
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.