pub struct SejongToken {
pub surface: String,
pub pos: String,
pub start_pos: usize,
pub end_pos: usize,
pub original_surface: Option<String>,
pub original_pos: Option<String>,
}Expand description
세종 코퍼스 호환 토큰
Fields§
§surface: String표면형
pos: String세종 품사 태그
start_pos: usize원본 텍스트 시작 위치
end_pos: usize원본 텍스트 끝 위치
original_surface: Option<String>분리 전 원본 표면형 (복합 형태소일 경우)
original_pos: Option<String>분리 전 원본 품사 (복합 태그일 경우)
Implementations§
Source§impl SejongToken
impl SejongToken
Sourcepub fn new(
surface: &str,
pos: &str,
start_pos: usize,
end_pos: usize,
) -> SejongToken
pub fn new( surface: &str, pos: &str, start_pos: usize, end_pos: usize, ) -> SejongToken
새 세종 토큰 생성
Sourcepub fn from_split(
surface: &str,
pos: &str,
start_pos: usize,
end_pos: usize,
original_surface: &str,
original_pos: &str,
) -> SejongToken
pub fn from_split( surface: &str, pos: &str, start_pos: usize, end_pos: usize, original_surface: &str, original_pos: &str, ) -> SejongToken
분리된 토큰 생성 (원본 정보 포함)
Sourcepub fn to_sejong_format(&self) -> String
pub fn to_sejong_format(&self) -> String
세종 형식 문자열 반환 (표면형/품사)
Trait Implementations§
Source§impl Clone for SejongToken
impl Clone for SejongToken
Source§fn clone(&self) -> SejongToken
fn clone(&self) -> SejongToken
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SejongToken
impl Debug for SejongToken
Source§impl PartialEq for SejongToken
impl PartialEq for SejongToken
impl Eq for SejongToken
impl StructuralPartialEq for SejongToken
Auto Trait Implementations§
impl Freeze for SejongToken
impl RefUnwindSafe for SejongToken
impl Send for SejongToken
impl Sync for SejongToken
impl Unpin for SejongToken
impl UnsafeUnpin for SejongToken
impl UnwindSafe for SejongToken
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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