pub struct TextAnnotationGraph {
pub text: String,
pub provenance: AnnotationProvenance,
pub confidence: AnnotationConfidence,
pub tokens: Vec<CanonicalToken>,
pub sentences: Vec<AnnotatedSentence>,
pub paragraphs: Vec<AnnotatedParagraph>,
}Expand description
Data type for text annotation graph.
Fields§
§text: StringText content for this value.
provenance: AnnotationProvenanceThe provenance value.
confidence: AnnotationConfidenceConfidence score for this value.
tokens: Vec<CanonicalToken>The tokens value.
sentences: Vec<AnnotatedSentence>The sentences value.
paragraphs: Vec<AnnotatedParagraph>The paragraphs value.
Implementations§
Source§impl TextAnnotationGraph
impl TextAnnotationGraph
Sourcepub fn token(&self, id: AnnotationId) -> Option<&CanonicalToken>
pub fn token(&self, id: AnnotationId) -> Option<&CanonicalToken>
Returns token.
Sourcepub fn sentence(&self, id: AnnotationId) -> Option<&AnnotatedSentence>
pub fn sentence(&self, id: AnnotationId) -> Option<&AnnotatedSentence>
Returns sentence.
Sourcepub fn paragraph(&self, id: AnnotationId) -> Option<&AnnotatedParagraph>
pub fn paragraph(&self, id: AnnotationId) -> Option<&AnnotatedParagraph>
Returns paragraph.
Trait Implementations§
Source§impl Clone for TextAnnotationGraph
impl Clone for TextAnnotationGraph
Source§fn clone(&self) -> TextAnnotationGraph
fn clone(&self) -> TextAnnotationGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextAnnotationGraph
impl Debug for TextAnnotationGraph
Source§impl<'de> Deserialize<'de> for TextAnnotationGraph
impl<'de> Deserialize<'de> for TextAnnotationGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TextAnnotationGraph
impl PartialEq for TextAnnotationGraph
Source§fn eq(&self, other: &TextAnnotationGraph) -> bool
fn eq(&self, other: &TextAnnotationGraph) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TextAnnotationGraph
impl Serialize for TextAnnotationGraph
impl StructuralPartialEq for TextAnnotationGraph
Auto Trait Implementations§
impl Freeze for TextAnnotationGraph
impl RefUnwindSafe for TextAnnotationGraph
impl Send for TextAnnotationGraph
impl Sync for TextAnnotationGraph
impl Unpin for TextAnnotationGraph
impl UnsafeUnpin for TextAnnotationGraph
impl UnwindSafe for TextAnnotationGraph
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
Mutably borrows from an owned value. Read more