#[repr(u8)]pub enum PosTag {
Show 45 variants
NNG = 0,
NNP = 1,
NNB = 2,
NNBC = 3,
NP = 4,
NR = 5,
VV = 10,
VA = 11,
VX = 12,
VCP = 13,
VCN = 14,
MM = 20,
MAG = 21,
MAJ = 22,
IC = 30,
JKS = 40,
JKC = 41,
JKG = 42,
JKO = 43,
JKB = 44,
JKV = 45,
JKQ = 46,
JX = 47,
JC = 48,
EP = 50,
EF = 51,
EC = 52,
ETN = 53,
ETM = 54,
XPN = 60,
XSN = 61,
XSV = 62,
XSA = 63,
XR = 64,
SF = 70,
SP = 71,
SSO = 72,
SSC = 73,
SC = 74,
SE = 75,
SY = 76,
SL = 77,
SH = 78,
SN = 79,
Unknown = 99,
}Expand description
품사 태그 (Part-of-Speech Tag)
21세기 세종계획 품사 태그 체계 + mecab-ko-dic 확장
§Example
use mecab_ko_core::pos_tag::PosTag;
use std::str::FromStr;
let tag = PosTag::from_str("NNG").unwrap();
assert_eq!(tag.as_str(), "NNG");
assert!(tag.is_content_word());Variants§
NNG = 0
일반 명사 (General Noun) 예: 사과, 컴퓨터, 사랑, 학교
NNP = 1
고유 명사 (Proper Noun) 예: 서울, 세종대왕, 삼성, 한강
NNB = 2
의존 명사 (Dependent Noun) 예: 것, 수, 줄, 뿐, 데, 바
NNBC = 3
단위 의존 명사 (Counter/Unit Noun) mecab-ko-dic 확장 (세종 NNB에서 분리) 예: 개, 마리, 권, 명, 원
NP = 4
대명사 (Pronoun) 예: 나, 너, 우리, 이것, 저기
NR = 5
수사 (Numeral) 예: 하나, 둘, 첫째, 셋째
VV = 10
동사 (Verb) 예: 먹다, 가다, 하다, 되다
VA = 11
형용사 (Adjective) 예: 예쁘다, 크다, 좋다, 빠르다
VX = 12
보조 용언 (Auxiliary Predicate) 예: -아/어 있다, -고 싶다, -아/어 보다
VCP = 13
긍정 지정사 (Positive Copula) 예: 이다
VCN = 14
부정 지정사 (Negative Copula) 예: 아니다
MM = 20
관형사 (Determiner) 예: 새, 헌, 이, 그, 저, 모든
MAG = 21
일반 부사 (General Adverb) 예: 매우, 아주, 빨리, 천천히
MAJ = 22
접속 부사 (Conjunctive Adverb) 예: 그러나, 그리고, 따라서, 하지만
IC = 30
감탄사 (Interjection) 예: 아, 와, 어머나, 네, 예
JKS = 40
주격 조사 (Subjective Case Marker) 예: 이, 가
JKC = 41
보격 조사 (Complement Case Marker) 예: 이, 가 (되다/아니다 앞)
JKG = 42
관형격 조사 (Genitive Case Marker) 예: 의
JKO = 43
목적격 조사 (Objective Case Marker) 예: 을, 를
JKB = 44
부사격 조사 (Adverbial Case Marker) 예: 에, 에서, 로, 으로, 에게
JKV = 45
호격 조사 (Vocative Case Marker) 예: 아, 야, 이여
JKQ = 46
인용격 조사 (Quotative Case Marker) 예: 라고, 고
JX = 47
보조사 (Auxiliary Particle) 예: 은, 는, 도, 만, 까지, 조차
JC = 48
접속 조사 (Conjunctive Particle) 예: 와, 과, 하고
EP = 50
선어말 어미 (Pre-final Ending) 예: -시-, -었-, -겠-
EF = 51
종결 어미 (Final Ending) 예: -다, -ㄴ다, -니, -라
EC = 52
연결 어미 (Connective Ending) 예: -고, -면, -어서, -니까
ETN = 53
명사형 전성 어미 (Nominal Transformative Ending) 예: -ㅁ, -기
ETM = 54
관형형 전성 어미 (Adnominal Transformative Ending) 예: -ㄴ, -는, -ㄹ
XPN = 60
체언 접두사 (Noun Prefix) 예: 풋-, 맨-, 헛-, 순-
XSN = 61
명사파생 접미사 (Noun Derivational Suffix) 예: -님, -적, -화, -성
XSV = 62
동사파생 접미사 (Verb Derivational Suffix) 예: -하다, -되다, -시키다
XSA = 63
형용사파생 접미사 (Adjective Derivational Suffix) 예: -스럽다, -롭다, -답다
XR = 64
어근 (Root) 예: 꼼꼼, 달콤, 시큼
SF = 70
마침 부호 (Terminal Punctuation) 예: . ? !
SP = 71
공백 (Space)
SSO = 72
여는 괄호 (Opening Bracket) mecab-ko-dic 확장 (세종 SS에서 분리) 예: ( [ {
SSC = 73
닫는 괄호 (Closing Bracket) mecab-ko-dic 확장 (세종 SS에서 분리) 예: ) ] }
SC = 74
구분자 (Separator) mecab-ko-dic 확장 예: , ; :
SE = 75
줄임표 (Ellipsis) 예: …
SY = 76
기타 기호 (Other Symbol) 예: @ # $ % & *
SL = 77
외국어 (Foreign Language) 예: hello, computer, ABC
SH = 78
한자 (Hanja/Chinese Character) 예: 韓國, 大學, 文化
SN = 79
숫자 (Number) 예: 123, 45.6, 2024
Unknown = 99
미등록어 (Unknown Word) 사전에 없는 단어
Implementations§
Source§impl PosTag
impl PosTag
Sourcepub const fn korean_name(&self) -> &'static str
pub const fn korean_name(&self) -> &'static str
한글 명칭 반환
Sourcepub const fn category(&self) -> PosCategory
pub const fn category(&self) -> PosCategory
품사 대분류 반환
Sourcepub const fn is_content_word(&self) -> bool
pub const fn is_content_word(&self) -> bool
내용어 여부 (검색 인덱싱에 유용)
명사, 동사, 형용사, 어근 등 의미를 담고 있는 형태소
Sourcepub const fn is_function_word(&self) -> bool
pub const fn is_function_word(&self) -> bool
기능어 여부
조사, 어미, 접사 등 문법적 기능을 담당하는 형태소
Sourcepub const fn is_predicate(&self) -> bool
pub const fn is_predicate(&self) -> bool
용언 여부 (동사/형용사)
Sourcepub const fn is_particle(&self) -> bool
pub const fn is_particle(&self) -> bool
조사 여부
Sourcepub const fn to_nori_compat(&self) -> NoriTag
pub const fn to_nori_compat(&self) -> NoriTag
Nori 호환 태그로 변환 (조사/어미 통합)
Sourcepub const fn to_sejong_base(&self) -> PosTag
pub const fn to_sejong_base(&self) -> PosTag
세종 기본 태그로 정규화
Trait Implementations§
impl Copy for PosTag
impl Eq for PosTag
impl StructuralPartialEq for PosTag
Auto Trait Implementations§
impl Freeze for PosTag
impl RefUnwindSafe for PosTag
impl Send for PosTag
impl Sync for PosTag
impl Unpin for PosTag
impl UnsafeUnpin for PosTag
impl UnwindSafe for PosTag
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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