pub struct ViterbiNode {
pub cost: i32,
pub prev: Option<Rc<ViterbiNode>>,
pub word_id: i32,
pub left_id: i16,
pub right_id: i16,
pub start: usize,
pub length: i16,
pub is_space: bool,
}Expand description
Viterbiアルゴリズムで使用されるノード
Fields§
§cost: i32始点からノードまでの総コスト
prev: Option<Rc<ViterbiNode>>コスト最小の前方のノードへのリンク
word_id: i32単語ID
left_id: i16左文脈ID
right_id: i16右文脈ID
start: usize入力テキスト内での形態素の開始位置
length: i16形態素の表層形の長さ(文字数)
is_space: bool形態素の文字種(文字カテゴリ)が空白文字かどうか
Implementations§
Source§impl ViterbiNode
impl ViterbiNode
pub fn make_boseos() -> ViterbiNode
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ViterbiNode
impl RefUnwindSafe for ViterbiNode
impl !Send for ViterbiNode
impl !Sync for ViterbiNode
impl Unpin for ViterbiNode
impl UnwindSafe for ViterbiNode
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