pub struct FtsToken {
pub text: String,
pub position: usize,
pub kind: TokenKind,
pub is_stop: bool,
pub synonyms: Vec<String>,
pub trigrams: Vec<String>,
pub pos: Option<PosTag>,
pub ne: Option<NamedEntityKind>,
}Expand description
A token produced by the FTS pipeline, ready for lexeme indexing.
Fields§
§text: StringThe token text (owned; may be normalised).
position: usizeOrdinal position in the token sequence (0-based, gaps for whitespace).
kind: TokenKindScript / category of the original token.
is_stop: booltrue if this token matches the stopword list.
synonyms: Vec<String>Synonym expansions (empty if none configured or no match).
trigrams: Vec<String>Character trigrams — populated only for TokenKind::Unknown tokens.
pos: Option<PosTag>Primary part-of-speech tag from the lookup table, or None if the word
is not in the table (OOV) or is not a Thai token.
ne: Option<NamedEntityKind>Named entity category, or None if the token is not in the NE
gazetteer. When set, kind is TokenKind::Named(ne).
Trait Implementations§
impl Eq for FtsToken
impl StructuralPartialEq for FtsToken
Auto Trait Implementations§
impl Freeze for FtsToken
impl RefUnwindSafe for FtsToken
impl Send for FtsToken
impl Sync for FtsToken
impl Unpin for FtsToken
impl UnsafeUnpin for FtsToken
impl UnwindSafe for FtsToken
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