Word Classes

Numbers, Symbols & the Rest

The five categories that are not words in the usual sense — numbers, interjections, symbols, punctuation and the catch-all X — plus the one label that is not a category at all. Between them they own nineteen fine tags, and most of those you will never be asked for: this page says which, and why.

What you’ll learn

  • Tag numbers and interjections, the two ordinary categories here
  • Know which symbols this model treats as symbols, and which it quietly calls nouns
  • Read the nine punctuation tags, none of which any exercise ever offers
  • Recognise the X tags — foreign words, affixes, list markers, addresses — and how rarely they occur

Two ordinary categories and three odd ones

NUM and INTJ behave like any other category: you will meet them in the exercises and their tags are unremarkable. SYM, PUNCT and X are different. Punctuation is excluded from every exercise and every diagram in this app; symbols are rare and partly mis-tagged; and X is where the tag set puts everything it has no better answer for.

Every claim below about what is rare, absent or corrected was measured against the corpus — 111 sentences at the time of writing — and against a few hundred probe sentences. A tag marked rare exists and the parser will produce it, but you have to go looking.

Five categories, nineteen tags

NUMNumeral

A numeral — a number, however it is written: seven, 42, 250, three. Only cardinals belong here. An ordinal like second describes rather than counts and is an adjective (ADJ/JJ).

How spaCy decides: digits, or a number word from its list. The one surprise is one used as a pronoun — the old one, that one — which this model keeps as NUM/CD rather than reading as a stand-in for a noun. The corpus has a case of exactly that.

SevenNUMboatsNOUNracedVERBacrossADPtheDETbayNOUN.

ThreeNUMofADPtheDETfourNUMlampsNOUNstillADVworkVERB.

CDCardinal number

A cardinal number. The single fine tag under NUM, so the two scales agree completely here. Its dependency label is usually nummod, and in a Reed-Kellogg diagram it slants under the noun it counts like any other modifier.

How spaCy decides: the same lookup as the category. Words and digits get one tag — three and 42 in the same sentence are both CD.

NineCDcandlesNNSburnedVBDforINtwoCDhoursNNS.

ChapterNNthreeCDendsVBZonINpageNN42CD.

INTJInterjection

An interjection — an exclamation or a discourse word standing outside the grammar of the sentence: wow, oh, ouch, yes, well at the start of a reply, and please. Remove it and the sentence is still complete; it attaches to nothing and nothing attaches to it.

How spaCy decides: a word from its interjection list, usually at the start of the sentence and set off by a comma. please is the one that surprises people — it is INTJ/UH wherever it appears, not an adverb. In the dependency tree an interjection carries the label intj; traditional Reed-Kellogg practice sets it on its own line above the clause, like a vocative — a shape this app does not yet draw.

WowINTJ,theDETsoupNOUNsmellsVERBwonderfulADJ!

PleaseINTJletVERBtheDETkettleNOUNcoolVERBfirstADV.

UHInterjection

The interjection tag. The single fine tag under INTJ. There is none in the corpus at the time of writing — the sentences there are statements and questions, and interjections belong to speech — so the first one the Tags exercise offers will be from a newly added sentence.

How spaCy decides: the same lookup. Note that yes and no as answers are UH, while no before a noun (no bus) is a determiner.

OhUH,IPRPforgotVBDmyPRP$umbrellaNNagainRB.

YesUH,theDTticketsNNSarrivedVBDthisDTmorningNN.

OuchUH,thatDTpanNNisVBZhotJJ!

SYMSymbol

A symbol — a non-word character that carries meaning of its own rather than punctuating: a currency sign, a mathematical operator, a slash used as a ratio. It is a genuine token, not decoration, which is what separates it from PUNCT.

How spaCy decides: unevenly, and this is the category to be wary of. The dollar sign is reliably SYM, and so are x and / between numbers. But the percent sign — the symbol most likely to appear in an ordinary sentence — comes back NOUN/NN every time, and the plus sign between two nouns is read as and (CCONJ/CC). There is no SYM of any kind in the corpus.

TicketsNOUNcostVERB$SYM12NUMforADPadultsNOUN.

TheDETanswerNOUNisAUX3NUMxSYM4NUM.

ProfitsNNSroseVBD12CD%NNinINaDTyearNN.

SYMSymbol

The symbol tag proper: mathematical operators and the like. The Penn set separates it from the dollar sign, which has a tag of its own below.

How spaCy decides: a symbol character between numbers is the reliable case — 3 x 4, 4 / 5. Most other symbols land elsewhere.

TheDTanswerNNisVBZ3CDxSYM4CD.

RateVBtheDTfilmNN4CD/SYM5CD.

$Dollar sign

The dollar sign — and, in the Penn convention, other currency signs too. It gets its own tag because it behaves unlike other symbols: it precedes its number rather than sitting between two. In the dependency tree the number is the head and the sign hangs off it — and the label it hangs by is nmod, the one construction in this app that produces that relation at all (see Nominal Dependents).

How spaCy decides: the character. The tokenizer splits $40 into $ and 40, so the sign is its own token with the tag $ and the number is a separate CD.

TicketsNNScostVBP$$12CDforINadultsNNS.

TheDTrepairNNcostsVBZ$$40CDatRBmostJJS.

PUNCTPunctuationNever offered in an exercise

Punctuation. Every mark is a token to the parser, with a tag and a place in the dependency tree — and every one is excluded from every exercise and every diagram in this app. Punctuation is not clickable, it is never a palette button, it does not count towards finishing a sentence, and it is skipped when the diagrams lay out the words. The nine tags below are documented so that the Workbench token table makes sense, not because you will be asked for them.

How spaCy decides: the character, with one wrinkle worth knowing: the same character can be two tags. A hyphen is HYPH inside a word and : as a dash; a period is . at the end of a sentence but part of an abbreviation token (Dr.) otherwise. The full stop is the second most common token in the corpus, after NN.

AfterADPlunchNOUN,PUNCTtheDETguestsNOUNdozedVERB.PUNCT

.Sentence-final punctuationNever offered in an exercise

Sentence-final punctuation: the full stop, question mark and exclamation mark. In the dependency tree it attaches to the root verb with the label punct.

TheDTlampNNflickeredVBDtwiceRB..

DidVBDtheDTguestsNNSleaveVBearlyRB?.

TheDTkettleNNisVBZboilingVBG!.

,CommaNever offered in an exercise

The comma. The one punctuation mark that matters to the diagrams indirectly: a comma after a sentence-initial adverb is what the parser reads as the signal for a sentence disjunct, and a comma pair is what sets off an appositive or a vocative. It is still never drawn.

AfterINlunchNN,,theDTguestsNNSdozedVBD..

Two commas doing two different jobs — one after a fronted phrase, one inside a list:

AfterINlunchNN,,wePRPpackedVBDtheDTcarNN,,theDTtentNNandCCtheDTdogNN..

:Colon or semicolonNever offered in an exercise

Colon or semicolon — and, by the Penn convention, the dash and the ellipsis as well. Any mark that separates two parts of a sentence without ending it.

BringVBtwoCDthingsNNS::aDTcoatNNandCCaDTmapNN..

TheDTtideNNturnedVBD;:theDTboatsNNSreturnedVBD..

TheDTverdictNNwasVBDclearJJ:nobodyNNwasVBDhurtVBN..

``Opening quotation markNever offered in an exercise

The opening quotation mark. Written as two backticks because the original Penn Treebank predates curly quotes and used `` and '' to tell opening from closing. The parser assigns it from position: the first of a pair opens.

TheDTsignNNreadVBD"``closedVBN"''inINredJJlettersNNS..

A quoted word inside a sentence — the opening mark gets this tag:

ShePRPwhisperedVBD"``waitVB"''andCCleftVBD..

''Closing quotation markNever offered in an exercise

The closing quotation mark — the second of the pair in the example above. The corpus has exactly one, a stray closing quote at the end of a sentence that was pasted in with it.

The same sentence, with the closing mark picked out:

ShePRPwhisperedVBD"``waitVB"''andCCleftVBD..

-LRB-Left bracketNever offered in an exercise

A left bracket — an opening parenthesis, square bracket or brace. The name is spelled out in letters because the original treebank format could not hold a literal bracket character.

TheDTrecipeNN(-LRB-fromINmyPRP$auntNN)-RRB-needsVBZsaffronNN..

A parenthetical aside in the middle of a clause:

TheDTferryNN(-LRB-theDTlastJJoneCD)-RRB-leftVBDatINnoonNN..

-RRB-Right bracketNever offered in an exercise

A right bracket — the closing half of the pair above. Also the closing parenthesis after a list marker such as 1), which is how it most often appears in the probes for this page.

The same aside, with the closing bracket picked out:

TheDTferryNN(-LRB-theDTlastJJoneCD)-RRB-leftVBDatINnoonNN..

HYPHHyphenNever offered in an exercise

A hyphen inside a word. The parser splits a hyphenated compound into its parts — well, -, known — so the hyphen is its own token. The pieces on either side keep their own tags (RB and VBN here), and the display joins the three back into one visual word because none of them has a space before it.

This is the one punctuation tag with a job in the app: co-captains in the corpus is three tokens, and the drag surface and the diagrams draw them as one word precisely because the middle one is HYPH with no spacing on either side.

TheDTwellRB-HYPHknownVBNauthorNNsignedVBDcopiesNNS..

TheDTtwentyCD-HYPHyearNN-HYPHoldJJbridgeNNfinallyRBreopenedVBD..

NFPSuperfluous punctuationNever offered in an exercise

Superfluous punctuation — marks that punctuate nothing: emoticons, a row of asterisks, a tilde, decorative dashes. The parser reaches for it whenever a punctuation-like character is doing no grammatical work. Absent from the corpus, and likely to stay so.

GoodJJluckNN:-)NFPandCCseeVByouPRPsoonRB..

MeetVBmePRPatINnoonNN~NFPbringVBlunchNN..

XOther

Other — anything that fits nowhere else. In practice that is a small, specific set: a foreign word, a detached affix, a list marker, an email or web address, and the parser’s admission that it does not know. The Universal Dependencies guidelines call it a last resort, and this model uses it that way.

How spaCy decides: by the fine tag. Each of the five tags below maps to X, so on the coarse scale they all look alike; the distinctions are fine-scale only. The corpus holds two X tokens, and both are administrator corrections rather than parser output — see AFX.

TheirPRONplanNOUNwasAUX,deXfactoX,aDETretreatNOUN.

1X)BringVERBaDETcoatNOUN.

FWForeign wordRare — needs unusual input

A foreign word — a word from another language used untranslated: de facto, à la carte. The tag is for the word’s status, not its meaning, so a borrowed phrase gets it whatever the phrase does in the sentence.

How spaCy decides: poorly. The model recognises a handful of Latin and French phrases and treats most foreign words as names (NNP) or plain nouns — bon appétit came back half FW, half NN; merci beaucoup was two proper nouns; status quo was two English nouns. Expect it to be inconsistent.

TheirPRP$planNNwasVBD,deFWfactoFW,aDTretreatNN.

TheDTdishNNisVBZservedVBNàFWlaNNPcarteNN.

AFXAffixOnly from an administrator correction

An affix — a prefix or suffix that the tokenizer has split from its stem, as in co-captains or pre-war. The tag exists so that the detached piece is not mistaken for a word in its own right.

How spaCy decides: it does not, in practice. Every hyphenated prefix probed for this page — pre-, co-, ex-, anti-, non-, post-, semi-, sub-, re- — came back as a noun or an adjective, never AFX.

The two instances in the corpus were both entered as NN by the parser and corrected to AFX/X by an administrator, which is the only way the tag reaches an exercise. The hyphen beside it had been called a plural noun, and was corrected to HYPH in the same pass — the raw parse below shows both.

The parser’s own output for the corpus sentence:

TwoCDstudentsNNSwereVBDmadeVBNcoNN-NNScaptainsNNS.

And the same sentence as it is stored, after correction:

TwoCDstudentsNNSwereVBDmadeVBNcoAFX-HYPHcaptainsNNS..

LSList item markerRare — needs unusual input

A list item marker — the 1) or b) that numbers an item in a list. Not a numeral: it labels the line rather than counting anything.

How spaCy decides: a bare digit or letter at the very start, followed by a closing bracket. A marker written 1. is not recognised — the period is split off as sentence-final punctuation and the digit is still tagged LS, but then the model reads the next word as a name. A list marker will not survive this app’s sentence normalisation as anything meaningful, so treat the tag as documentation.

1LS)BringVBaDTcoatNN.

bLS)BringVBaDTcoatNNandCCaDTtorchNN.

ADDEmail addressRare — needs unusual input

An email or web address. The tokenizer recognises URLs and email addresses as single tokens, and this tag marks the token as an address rather than a word.

How spaCy decides: the token shape, and only for the well-formed cases — hello@example.com and https://example.com both work. A bare domain without a scheme (www.example.com) does not, and comes back as a proper noun or an adjective. No sentence in the corpus contains an address.

EmailVBmePRPatINhello@example.comADD.

VisitVBhttps://example.comADDforINdetailsNNS.

XXUnknownRare — needs unusual input

Unknown. The tagger’s way of saying it cannot classify the token at all — stray characters, fragments of markup, damaged text. It is also the palette’s fallback colour: a tag with no colour of its own renders in the XX hue, which is why an undefined token in the app looks like this rather than vanishing.

How spaCy decides: hard to provoke on purpose. Nonsense words are confidently tagged as nouns or names; what actually triggers it is a stray symbol like the > of a text arrow. The corpus has none.

SeeVBtheDTnoteNN-->XXbelowRB.

It is hard to provoke on purpose. Lorem ipsum dolor sit amet. comes back as five proper nouns, and The password was xq7zt. makes the password a proper noun too — an unknown word is guessed to be a name long before it is written off as XX.

_SPSpaceCannot occur here — whitespace is normalised

The eighteenth label, and not one of the seventeen categories: spaCy gives a run of extra whitespace — a double space, a line break — its own token, with the coarse category SPACE and the fine tag _SP. It exists so that the parser can reproduce the original text exactly.

Fed The  gap was wide. with two spaces, the model returns the five ordinary tokens plus a sixth, the second space, tagged _SP — measured, but not drawn below, because a chip for a space would be a chip for nothing.

It can never appear in this app. Every sentence is normalised before it is parsed: leading and trailing whitespace is stripped and every internal run collapses to a single space, so there is no extra whitespace left for the tokenizer to find. The tag is in the Workbench’s dropdown for completeness, and in the palette so the generator that builds the palette covers the model’s whole tag set — but no sentence will ever carry it, and no exercise will ever ask for it.

Key terms

Cardinal number
A counting number — three, 42. NUM/CD. Ordinals (third) are adjectives. Three boats sank. Tickets cost 42 dollars.
Interjection
An exclamation outside the sentence’s grammar — oh, wow, please. INTJ/UH. Oh, the ferry left. Please hand me the map.

See: Root & Leftovers

Symbol
A meaningful non-word character — $, x between numbers. Unevenly recognised; the percent sign is a noun to this model. Tickets cost $12. The room is 3 x 4 metres.
Affix
A prefix or suffix split from its stem — the co of co-captains. Only ever AFX by administrator correction. Two students were made co-captains. The pre-war house survived.
Sentence normalisation
The cleaning every submitted sentence gets before parsing: trimmed, internal whitespace collapsed, clitic apostrophes straightened. It is why _SP is impossible here. The ferry leaves at noon. typed with two spaces inside is stored with one. Omar’s coat is here. typed with a curly apostrophe is stored with a straight one.

Practice on a real sentence

The one at the end is the surprise on this sentence: it stands in for store, but the parser tags it NUM/CD, and that is the answer the drill expects. Everything else here is a determiner, an adverb, an adjective or a preposition.

This store is as large as that one.

Parts of speech

Give every word its coarse Universal Dependencies category.

Words 0/8Attempts 0Correct 0Time 0:00

Sentence — select a part of speech below, then click the word(s) it applies to

This store is as large as that one.