Struct cld2::DetectionResult [] [src]

pub struct DetectionResult {
    pub language: Option<Lang>,
    pub scores: [LanguageScore; 3],
    pub text_bytes: i32,
    pub reliability: Reliability,
    // some fields omitted
}

Detailed language detection results.

Note: Do not rely on this struct containing only the fields listed below. It may gain extra fields in the future.

Fields

language

The language detected.

scores

The scores for the top 3 candidate languages.

text_bytes

The number of bytes of actual text found, excluding tags, etc.

reliability

Is this guess reliable?

Methods

impl DetectionResult

fn new(language: Option<Lang>, scores: [LanguageScore; 3], text_bytes: i32, reliability: Reliability) -> DetectionResult

EXPERIMENTAL: Create a new DetectionResult. You generally don't need to call this directly.

Trait Implementations

Derived Implementations

impl Copy for DetectionResult

impl Clone for DetectionResult

fn clone(&self) -> DetectionResult

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