pub struct Node {Show 14 fields
pub id: NodeId,
pub surface: Cow<'static, str>,
pub start_pos: usize,
pub end_pos: usize,
pub start_byte: usize,
pub end_byte: usize,
pub left_id: u16,
pub right_id: u16,
pub word_cost: i32,
pub total_cost: i32,
pub prev_node_id: NodeId,
pub node_type: NodeType,
pub feature: Cow<'static, str>,
pub has_space_before: bool,
}Expand description
Lattice 노드
형태소 후보를 나타내는 노드입니다.
Fields§
§id: NodeId노드 ID (Lattice 내에서 유일)
surface: Cow<'static, str>표면형 (surface form)
start_pos: usize시작 위치 (문자 단위, 0-based)
end_pos: usize끝 위치 (문자 단위, exclusive)
start_byte: usize시작 위치 (바이트 단위)
end_byte: usize끝 위치 (바이트 단위)
left_id: u16좌문맥 ID (연접 비용 계산용)
right_id: u16우문맥 ID (연접 비용 계산용)
word_cost: i32단어 비용 (사전에 기록된 비용)
total_cost: i32누적 비용 (Viterbi 계산용)
prev_node_id: NodeId최적 경로의 이전 노드 ID (backtrack용)
node_type: NodeType노드 타입
feature: Cow<'static, str>품사 및 부가 정보 (CSV feature string)
has_space_before: bool띄어쓰기 앞에 있는지 여부 (space penalty 적용용)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more