pub struct Morpheme {
pub surface: String,
pub word_id: u32,
pub pos_id: u16,
pub wcost: i16,
pub feature: String,
pub entities: Vec<EntityReference>,
pub pronunciation: Option<String>,
pub embedding: Option<Vec<f32>>,
}Expand description
A single morpheme (token) in the analysis result
Fields§
§surface: StringSurface form (the actual text)
word_id: u32Word ID (token index in dictionary, used for embeddings and training)
pos_id: u16Part-of-speech ID
wcost: i16Word cost
feature: StringFeature string (comma-separated POS info, reading, etc.)
entities: Vec<EntityReference>Semantic entity references (optional)
pronunciation: Option<String>IPA pronunciation (optional, populated when ipa_enabled=true)
embedding: Option<Vec<f32>>Word embedding vector (optional, populated when vector_enabled=true)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Morpheme
impl RefUnwindSafe for Morpheme
impl Send for Morpheme
impl Sync for Morpheme
impl Unpin for Morpheme
impl UnwindSafe for Morpheme
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