pub struct QueryCore {
pub question_type: QuestionType,
pub root: QueryExpr,
pub entities: Vec<(String, EntityType)>,
pub original: String,
pub resolved: Option<String>,
pub confidence: f32,
}Expand description
A complete query core with metadata
Fields§
§question_type: QuestionTypeThe question type
root: QueryExprThe root query expression
entities: Vec<(String, EntityType)>Entities mentioned in the query
original: StringOriginal question text
resolved: Option<String>Resolved question text (after coreference resolution), if different from original
confidence: f32Confidence score (0.0 - 1.0)
Implementations§
Source§impl QueryCore
impl QueryCore
Sourcepub fn new(
question_type: QuestionType,
root: QueryExpr,
entities: Vec<(String, EntityType)>,
original: String,
) -> QueryCore
pub fn new( question_type: QuestionType, root: QueryExpr, entities: Vec<(String, EntityType)>, original: String, ) -> QueryCore
Create a new query core
Sourcepub fn with_confidence(self, confidence: f32) -> QueryCore
pub fn with_confidence(self, confidence: f32) -> QueryCore
Set the confidence score
Sourcepub fn with_resolved(self, resolved: String) -> QueryCore
pub fn with_resolved(self, resolved: String) -> QueryCore
Set the resolved query text (after coreference resolution)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryCore
impl RefUnwindSafe for QueryCore
impl Send for QueryCore
impl Sync for QueryCore
impl Unpin for QueryCore
impl UnsafeUnpin for QueryCore
impl UnwindSafe for QueryCore
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