pub struct CharCategoryMap { /* private fields */ }Expand description
문자 카테고리 매퍼
문자를 카테고리 ID로 매핑합니다.
Implementations§
Source§impl CharCategoryMap
impl CharCategoryMap
Sourcepub fn korean_default() -> Self
pub fn korean_default() -> Self
한국어 기본 카테고리 맵 생성
mecab-ko-dic의 char.def 기반 기본 설정
Sourcepub fn add_category(&mut self, def: CharCategoryDef)
pub fn add_category(&mut self, def: CharCategoryDef)
카테고리 정의 추가
Sourcepub fn add_range(&mut self, start: u32, end: u32, category_id: CategoryId)
pub fn add_range(&mut self, start: u32, end: u32, category_id: CategoryId)
Unicode 범위에 카테고리 할당
Sourcepub fn get_category(&self, c: char) -> CategoryId
pub fn get_category(&self, c: char) -> CategoryId
문자의 카테고리 ID 반환
Sourcepub fn get_category_def(&self, id: CategoryId) -> Option<&CharCategoryDef>
pub fn get_category_def(&self, id: CategoryId) -> Option<&CharCategoryDef>
카테고리 정의 조회
Sourcepub fn get_id_by_name(&self, name: &str) -> Option<CategoryId>
pub fn get_id_by_name(&self, name: &str) -> Option<CategoryId>
카테고리 이름으로 ID 조회
Trait Implementations§
Source§impl Clone for CharCategoryMap
impl Clone for CharCategoryMap
Source§fn clone(&self) -> CharCategoryMap
fn clone(&self) -> CharCategoryMap
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 CharCategoryMap
impl Debug for CharCategoryMap
Auto Trait Implementations§
impl Freeze for CharCategoryMap
impl RefUnwindSafe for CharCategoryMap
impl Send for CharCategoryMap
impl Sync for CharCategoryMap
impl Unpin for CharCategoryMap
impl UnsafeUnpin for CharCategoryMap
impl UnwindSafe for CharCategoryMap
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