What are all the possible NLTK position tags?

How to find a list with all possible positional tags that are used in the Natural Language Toolkit (nltk)?

+80
python nltk
Mar 13 '13 at 14:59
source share
6 answers

The book contains a note on how to find help on tag sets, for example:

nltk.help.upenn_tagset() 

Others are probably similar. (Note. You may first need to download the tagsets from the "Support files for download" section).

+98
Mar 13 '13 at 15:12
source share

The set of tags depends on the body that was used to train the tag. By default, the nltk.pos_tag() uses the Penn Treebank Tag Set .

In NLTK 2, you can check which tag is the default tag as follows:

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

This means that it is a maximum entropy tagger trained on the Treebank building.

nltk.tag._POS_TAGGER no longer exists in NLTK 3, but the documentation says that the finished tagger still uses the Penn Treebank tag set,

+49
Mar 13 '13 at 15:33
source share

To save some people for a while, here is a list I extracted from a small building. I don't know if it is complete, but it should have most (if not all) help definitions from upenn_tagset ...

CC : connection coordination

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

CD : digit, cardinal

 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 : Definition

 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 : existential there

 there 

IN : preposition or conjunction, submission

 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 : adjective or number, serial number

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

JJR : adjective, comparative

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

JJS : adjective, excellent

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

LS : list item marker

 A A. B B. C C. DEF First GHIJK One SP-44001 SP-44002 SP-44005 SP-44007 Second Third Three Two * abcd first five four one six three two 

MD : modal auxiliary

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

NN : noun, general, singular or mass

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

NNP : noun, own, singular

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

NNS : Noun, General, Plural

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

PDT : Pre-qualifier

 all both half many quite such sure this 

POS : genitive marker

 ' 's 

PRP : pronoun, personal

 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 $: possessive pronoun

 her his mine my our ours their thy your 

RB : adverb

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

RBR : adverb, comparative

 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 : adverb, excellent

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

RP : particle

 aboard about across along apart around aside at away back before behind by crop down ever fast for forth from go high ie 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" as a pretext or indicator of uncertainty

 to 

UH : interjection

 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 : verb, basic form

 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 : past tense

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

VBG : verb, true participle, or gerund

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

VBN : a past participle verb

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

VBP : verb, present, not the third person singular

 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 : verb, present, 3 persons in the singular

 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 qualifier

 that what whatever which whichever 

WP : WH-pronoun

 that what whatever whatsoever which who whom whosoever 

WRB : Wh-adverb

 how however whence whenever where whereby whereever wherein whereof why 
+49
Jul 08 '16 at 10:22
source share

Below it may be useful to access the dict, indicated by abbreviations:

 >>> 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', ... 
+20
01 Sep '15 at 16:46
source share

The link is available on the official website

Copy and paste from there:

  • CC | Coordination Connection |
  • CD | Cardinal Number |
  • DT | Qualifier |
  • EX | Existential there |
  • Fw | Foreign word |
  • IN | Assumption or submission |
  • Jj | Adjective |
  • JJR | Adjective, comparative |
  • JJS | Adjective, excellent |
  • LS | List item marker |
  • MD | Modal |
  • Nn | Noun, Single or Mass |
  • NNS | Noun Plural
  • NNP | Noun, the only |
  • NNPS | Noun Plural
  • PDT | Predeterminer |
  • POS | Obsessed End |
  • PRP | Personal pronoun |
  • PRP $ | Possessive Pronoun |
  • RB | Adverb |
  • RBR | Adverb, comparative |
  • RBS | Adverb, excellent |
  • RP | Particle |
  • SYM | Symbol |
  • TO | to |
  • Uh | Interjection |
  • VB | Verb, basic form |
  • VBD | Verb past tense |
  • Vbg | Verb, gerund or real participle |
  • Vbn | Communion verb |
  • VBP | Non Present Third-Party Verb Present |
  • Vbz | Verb, 3rd person, the only present |
  • WDT | Wh-qualifier |
  • WP | Wh-pronoun |
  • WP $ | Possessive wh-pronoun |
  • WRB | Wh-adverb |
+13
Dec 14 '16 at 18:53
source share

You can download the list here: ftp://ftp.cis.upenn.edu/pub/treebank/doc/tagguide.ps.gz . It includes confusing parts of speech, capitalization, and other agreements. In addition, wikipedia has an interesting section similar to this. Section: Tags are used using parts of speech.

0
Sep 28 '17 at 19:28
source share



All Articles