programing

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

stoneblock 2023. 6. 23. 21:41

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

NLTK(Natural Language Toolkit)에서 사용할 수 있는 모든 POS 태그가 있는 목록을 어떻게 찾습니까?

시간을 절약하기 위해, 여기 제가 작은 말뭉치에서 발췌한 목록이 있습니다.완료되었는지는 모르겠지만 upen_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 upon 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: 동사, present particle 또는 gerund

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

VN: 동사, 과거 분사

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.help.upenn_tagset()

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

태그 세트는 태거를 훈련시키는 데 사용된 말뭉치에 따라 달라집니다.의 기본 태그 지정자nltk.pos_tag()Penn Treebank 태그 세트를 사용합니다.

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

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

즉, 트리뱅크 말뭉치에서 훈련된 최대 엔트로피 태그입니다.

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 | 입자 |
  • SYM | 기호 |
  • 행선지 | 행선지 | 행선지
  • UH | 간섭 |
  • VB | 동사, 기저형 |
  • VBD | 동사, 과거형 |
  • VBG | 동사, 구룬드 또는 현재 분사 |
  • VBN | 동사, 과거 분사 |
  • VBP | 동사, 3인칭이 아닌 단수 현재 |
  • VBZ | 동사, 3인칭 단수 현재 |
  • WDT | wh-determiner |
  • WP | Wh-pronoun |
  • WP$ | 소유형 wh-프로논어 |
  • WRB | Wh-부사 |
['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']

Doug Shore의 방법을 기반으로 하지만 복사-붙여넣기가 더 쉬워집니다.

목록은 ftp://ftp.cis.upenn.edu/pub/treebank/doc/tagguide.ps.gz 에서 다운로드할 수 있습니다.그것은 말의 혼란스러운 부분, 대문자화, 그리고 다른 관습들을 포함합니다.또한, 위키백과에는 이와 유사한 흥미로운 섹션이 있습니다.섹션: 사용된 음성 부분 태그입니다.

이 말을 그대로 실행해 보세요.

import nltk
nltk.download('tagsets')
nltk.help.upenn_tagset()

nltk.tag._POS_TAGGER작동하지 않습니다.속성 오류: 모듈 'nltk.tag'에 속성 '_POS_TAGGER'이 없습니다.NLTK 3에서는 더 이상 사용할 수 없습니다.

Python에서 아래 코드를 실행하면 모든 POS 태그에 대한 정보를 얻을 수 있습니다.

import nltk
nltk.help.upenn_tagset()

언급URL : https://stackoverflow.com/questions/15388831/what-are-all-possible-pos-tags-of-nltk