[python] NLTK의 가능한 모든 POS 태그는 무엇입니까?

Natural Language Toolkit (nltk)에서 사용되는 가능한 모든 pos 태그가있는 목록을 찾으려면 어떻게합니까?



답변

이 책 에는 다음과 같은 태그 세트에 대한 도움말을 찾는 방법이 있습니다.

nltk.help.upenn_tagset()

다른 것들은 아마 비슷할 것입니다. (참고 : 어쩌면 먼저 tagsets다운로드 도우미의 모델 섹션 에서 다운로드 해야 할 수도 있습니다 )


답변

시간을 절약하기 위해 작은 코퍼스에서 추출한 목록이 있습니다. 완료되었는지는 모르겠지만 upenn_tagset의 도움말 정의가 대부분 있어야합니다 (모두는 아님).

CC : 공동 조정

& 'n and both but either et for less minus neither nor or plus so
therefore times v. versus vs. whether yet

CD : 숫자, 추기경

mid-1890 nine-thirty forty-two one-tenth ten million 0.5 one forty-
seven 1987 twenty '79 zero two 78-degrees eighty-four IX '60s .025
fifteen 271,124 dozen quintillion DM2,000 ...

DT : 결정자

all an another any both del each either every half la many much nary
neither no some such that the them these this those

EX : 존재

there

IN : 전치사 또는 연결, 대체

astride among uppon whether out inside pro despite on by throughout
below within for towards near behind atop around if like until below
next into if beside ...

JJ : 형용사 또는 숫자, 서수

third ill-mannered pre-war regrettable oiled calamitous first separable
ectoplasmic battery-powered participatory fourth still-to-be-named
multilingual multi-disciplinary ...

JJR : 형용사, 비교

bleaker braver breezier briefer brighter brisker broader bumper busier
calmer cheaper choosier cleaner clearer closer colder commoner costlier
cozier creamier crunchier cuter ...

JJS : 형용사, 최상급

calmest cheapest choicest classiest cleanest clearest closest commonest
corniest costliest crassest creepiest crudest cutest darkest deadliest
dearest deepest densest dinkiest ...

LS : 목록 항목 마커

A A. B B. C C. D E F First G H I J K One SP-44001 SP-44002 SP-44005
SP-44007 Second Third Three Two * a b c d first five four one six three
two

MD : 모달 보조

can cannot could couldn't dare may might must need ought shall should
shouldn't will would

NN : 명사, 공통, 단수 또는 질량

common-carrier cabbage knuckle-duster Casino afghan shed thermostat
investment slide humour falloff slick wind hyena override subhumanity
machinist ...

NNP : 명사, 고유, 단수

Motown Venneboerger Czestochwa Ranzer Conchita Trumplane Christos
Oceanside Escobar Kreisler Sawyer Cougar Yvette Ervin ODI Darryl CTCA
Shannon A.K.C. Meltex Liverpool ...

NNS : 명사, 공통, 복수

undergraduates scotches bric-a-brac products bodyguards facets coasts
divestitures storehouses designs clubs fragrances averages
subjectivists apprehensions muses factory-jobs ...

PDT : 사전 결정자

all both half many quite such sure this

POS : 생식 마커

' 's

PRP : 대명사, 개인

hers herself him himself hisself it itself me myself one oneself ours
ourselves ownself self she thee theirs them themselves they thou thy us

PRP $ : 대명사, 소유

her his mine my our ours their thy your

RB : 부사

occasionally unabatingly maddeningly adventurously professedly
stirringly prominently technologically magisterially predominately
swiftly fiscally pitilessly ...

RBR : 부사, 비교

further gloomier grander graver greater grimmer harder harsher
healthier heavier higher however larger later leaner lengthier less-
perfectly lesser lonelier longer louder lower more ...

RBS : 부사, 최상급

best biggest bluntest earliest farthest first furthest hardest
heartiest highest largest least less most nearest second tightest worst

RP : 입자

aboard about across along apart around aside at away back before behind
by crop down ever fast for forth from go high i.e. in into just later
low more off on open out over per pie raising start teeth that through
under unto up up-pp upon whole with you

TO : 전치사 또는 부정 사적 마커로 “to”

to

UH : 감청

Goodbye Goody Gosh Wow Jeepers Jee-sus Hubba Hey Kee-reist Oops amen
huh howdy uh dammit whammo shucks heck anyways whodunnit honey golly
man baby diddle hush sonuvabitch ...

VB : 동사, 기본형

ask assemble assess assign assume atone attention avoid bake balkanize
bank begin behold believe bend benefit bevel beware bless boil bomb
boost brace break bring broil brush build ...

VBD : 동사, 과거 시제

dipped pleaded swiped regummed soaked tidied convened halted registered
cushioned exacted snubbed strode aimed adopted belied figgered
speculated wore appreciated contemplated ...

VBG : 동사, 현재 분사 또는 gerund

telegraphing stirring focusing angering judging stalling lactating
hankerin' alleging veering capping approaching traveling besieging
encrypting interrupting erasing wincing ...

VBN : 동사, 과거 분사

multihulled dilapidated aerosolized chaired languished panelized used
experimented flourished imitated reunifed factored condensed sheared
unsettled primed dubbed desired ...

VBP : 동사, 현재 시제, 3 인칭 단수가 아닌

predominate wrap resort sue twist spill cure lengthen brush terminate
appear tend stray glisten obtain comprise detest tease attract
emphasize mold postpone sever return wag ...

VBZ : 동사, 현재 시제, 3 인칭 단수

bases reconstructs marks mixes displeases seals carps weaves snatches
slumps stretches authorizes smolders pictures emerges stockpiles
seduces fizzes uses bolsters slaps speaks pleads ...

WDT : WH 결정기

that what whatever which whichever

WP : WH- 대명사

that what whatever whatsoever which who whom whosoever

WRB : Wh- 부사

how however whence whenever where whereby whereever wherein whereof why


답변

태그 세트는 태거를 훈련시키는 데 사용 된 모음에 따라 다릅니다. 의 기본 태거 nltk.pos_tag()Penn Treebank 태그 세트 를 사용합니다. .

NLTK 2에서는 다음과 같이 어떤 태거가 기본 태거인지 확인할 수 있습니다.

import nltk
nltk.tag._POS_TAGGER
>>> 'taggers/maxent_treebank_pos_tagger/english.pickle'

그것은 그것이 Treebank 코퍼스에 대해 훈련 된 Maximum Entropy tagger임을 의미합니다.

nltk.tag._POS_TAGGERNLTK 3에는 더 이상 존재하지 않지만 설명서에는 상용 태깅 도구가 여전히 Penn Treebank 태그 세트를 사용한다고 명시되어 있습니다.


답변

아래는 약어로 입력 한 사전에 액세스하는 데 유용 할 수 있습니다.

>>> from nltk.data import load
>>> tagdict = load('help/tagsets/upenn_tagset.pickle')
>>> tagdict['NN'][0]
'noun, common, singular or mass'
>>> tagdict.keys()
['PRP$', 'VBG', 'VBD', '``', 'VBN', ',', "''", 'VBP', 'WDT', ...


답변

참조는 공식 사이트 에서 구할 수 있습니다

거기에서 복사하여 붙여 넣기 :

  • CC | 공동 조정 |
  • CD | 기수 번호 |
  • DT | 결정자 |
  • EX | 실존 |
  • FW | 외국어 |
  • IN | 전치사 또는 대입 연결 |
  • JJ | 형용사 |
  • JJR | 형용사, 비교 |
  • JJS | 형용사, 최상급 |
  • LS | 목록 항목 마커 |
  • MD | 모달 |
  • NN | 명사, 단수 또는 질량 |
  • NNS | 명사, 복수 |
  • NNP | 고유 명사, 단수 |
  • NNPS | 적절한 명사, 복수 |
  • PDT | 사전 결정자 |
  • POS | 소유 결말 |
  • PRP | 개인 대명사 |
  • PRP $ | 소유 대명사 |
  • RB | 부사 |
  • RBR | 부사, 비교 |
  • RBS | 부사, 최상급 |
  • RP | 입자 |
  • 심벌즈 | 기호 |
  • TO | |
  • UH | 감탄사 |
  • VB | 동사, 기본형 |
  • VBD | 동사, 과거 시제 |
  • VBG | 동사, 거런 또는 현재 분사 |
  • VBN | 동사, 과거 분사 |
  • VBP | 동사, 3 인이 아닌 단수 선물 |
  • VBZ | 동사, 3 인칭 단수 선물 |
  • WDT | ㅁ 결정기 |
  • WP | ㅁ 대명사 |
  • WP $ | 소유 ㅁ 대명사 |
  • WRB | 부사 |

답변

ftp://ftp.cis.upenn.edu/pub/treebank/doc/tagguide.ps.gz 에서 목록을 다운로드 할 수 있습니다 . 혼란스러운 말, 대문자 및 기타 규칙이 포함됩니다. 또한 wikipedia 에는 이와 비슷한 흥미로운 섹션이 있습니다. 섹션 : 품사 태그가 사용되었습니다.


답변

['LS', 'TO', 'VBN', "''", 'WP', 'UH', 'VBG', 'JJ', 'VBZ', '--', 'VBP', 'NN', 'DT', 'PRP', ':', 'WP$', 'NNPS', 'PRP$', 'WDT', '(', ')', '.', ',', '``', '$', 'RB', 'RBR', 'RBS', 'VBD', 'IN', 'FW', 'RP', 'JJR', 'JJS', 'PDT', 'MD', 'VB', 'WRB', 'NNP', 'EX', 'NNS', 'SYM', 'CC', 'CD', 'POS']

더그 쇼어의 방법을 기반으로하지만 더 복사 붙여 넣기 친화적으로 만듭니다.