자연과학/컴퓨터과학

<Python> NLTK 사용시 단어의 품사 약칭 정리

Retyper 2023. 1. 19. 17:07
 

NLTK :: Natural Language Toolkit

Natural Language Toolkit NLTK is a leading platform for building Python programs to work with human language data. It provides easy-to-use interfaces to over 50 corpora and lexical resources such as WordNet, along with a suite of text processing libraries

www.nltk.org

 

NLTK(Natural Language Toolkit)

NLTK 는 Python 프로그래밍 언어로 작성된 영어의 기호 및 통계 자연어 처리 (NLP)용 라이브러리 및 프로그램 모음이다.

 

PoS tagging(Parts of Speech Tagging)

NLTK 라이브러리를 설치후 nltk.pos_tag를 사용하면 토큰화된 문장 속 모든 단어들의 '품사(Parts of speech)'를 표시한 리스트를 변수에 담을 수 있다. 이때 각 품사들은 약칭을 사용하는데 그 약칭은 다음과 같다.

 

POS tag list:
 
CC    coordinating conjunction
CD    cardinal digit
DT    determiner
EX    existential there (like: "there is" ... think of it like "there exists")
FW    foreign word
IN    preposition/subordinating conjunction
JJ    adjective    'big'
JJR    adjective, comparative    'bigger'
JJS    adjective, superlative    'biggest'
LS    list marker    1)
MD    modal    could, will
NN    noun, singular 'desk'
NNS    noun plural    'desks'
NNP    proper noun, singular    'Harrison'
NNPS    proper noun, plural    'Americans'
PDT    predeterminer    'all the kids'
POS    possessive ending    parent's
PRP    personal pronoun    I, he, she
PRP$    possessive pronoun    my, his, hers
RB    adverb    very, silently,
RBR    adverb, comparative    better
RBS    adverb, superlative    best
RP    particle    give up
TO    to    go 'to' the store.
UH    interjection    errrrrrrrm
VB    verb, base form    take
VBD    verb, past tense    took
VBG    verb, gerund/present participle    taking
VBN    verb, past participle    taken
VBP    verb, sing. present, non-3d    take
VBZ    verb, 3rd person sing. present    takes
WDT    wh-determiner    which
WP    wh-pronoun    who, what
WP$    possessive wh-pronoun    whose
WRB    wh-abverb    where, when
반응형