Word Classes
Numbers, Symbols & the Rest
X (other), plus SPACE, a label that is not a category at all. Together they have nineteen fine tags. You will meet only a few of them in the exercises, and this page says which ones, and why.What you’ll learn
- Tag numbers and interjections (NUM/CD, INTJ/UH), and tell a cardinal number from an ordinal
- Tell which symbols the parser tags as symbols (SYM, $) and which it tags as nouns (%)
- Read the nine punctuation tags, which no exercise ever asks for
- Recognise the five X tags (foreign words, affixes, list markers, addresses, unknown tokens) and explain why they are rare
- Explain why a space never becomes an _SP token in Grammify
Two ordinary categories and three unusual ones
Like the other Word Classes pages, this page describes each coarse category first and then the fine tags that go with it. NUM (numbers) and INTJ (interjections) work like the categories on those pages: the POS and Tags exercises ask for them, and each has only one fine tag. The other three are different:
SYM(symbols) is rare, and the parser tags some symbols as nouns.PUNCT(punctuation) is never asked for in an exercise and never drawn in a diagram.X(other) is for anything that fits no other category.
Every claim here about rare or missing tags was tested with the parser and checked in the corpus: all the sentences stored in Grammify. A badge beside a tag tells you how often you will meet it:
- Never offered in an exercise: you will never be asked for this tag.
- Rare — needs unusual input: the parser gives it only to unusual text, such as a foreign phrase or an email address.
- Only from a person’s correction: the parser does not give it in practice; a teacher or an administrator set it by hand.
Five categories, nineteen tags
NUM Numeral
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 the parser decides: digits, or a number word from its list. The one surprise is one used as a pronoun, as in the old one or that one. The parser still tags it NUM/CD, although it stands in for a noun. The corpus has a case of exactly that.
Seven (NUM, ringed)boats (NOUN)raced (VERB)across (ADP)the (DET)bay (NOUN).
Three (NUM, ringed)of (ADP)the (DET)four (NUM, ringed)lamps (NOUN)still (ADV)work (VERB).
CD Cardinal 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 the parser decides: the same lookup as the category. Words and digits get one tag — three and 42 in the same sentence are both CD.
Nine (CD, ringed)candles (NNS)burned (VBD)for (IN)two (CD, ringed)hours (NNS).
Chapter (NN)three (CD, ringed)ends (VBZ)on (IN)page (NN)42 (CD, ringed).
INTJ Interjection
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. In the grammar of the sentence, it attaches to nothing.
How the parser decides: a word from its interjection list, usually at the start of the sentence and followed by a comma. In the dependency tree it still depends on the root, usually the main verb, with the label intj. Grammify’s Reed-Kellogg diagram leaves it out; traditional practice writes it on its own line above the clause, like a vocative.
The word please surprises many learners. The polite word (Spanish por favor) is INTJ/UH wherever it stands, not an adverb: Could you please repeat the question? The verb please (to make someone happy) is an ordinary verb, VERB/VB: You cannot please everyone.
Wow (INTJ, ringed),the (DET)soup (NOUN)smells (VERB)wonderful (ADJ)!
Please (INTJ, ringed)let (VERB)the (DET)kettle (NOUN)cool (VERB)first (ADV).
UH Interjection
The interjection tag. The single fine tag under INTJ. The corpus has none yet: nearly all its sentences are written statements and questions, and interjections belong mostly to speech.
How the parser decides: the same lookup. Note that yes and no as answers are UH, while no before a noun (no bus) is a determiner.
Oh (UH, ringed),I (PRP)forgot (VBD)my (PRP$)umbrella (NN)again (RB).
Yes (UH, ringed),the (DT)tickets (NNS)arrived (VBD)this (DT)morning (NN).
Ouch (UH, ringed),that (DT)pan (NN)is (VBZ)hot (JJ)!
SYM Symbol
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 the parser decides: not always correctly, so take care with this category. The dollar sign is SYM in every test, and so are x and / between numbers. The percent sign is not: it is tagged as a noun (see the note below). A plus sign between two nouns is read as and (CCONJ/CC). The corpus has no SYM at all.
Tickets (NOUN)cost (VERB)$ (SYM, ringed)12 (NUM)for (ADP)adults (NOUN).
The (DET)answer (NOUN)is (AUX)3 (NUM)x (SYM, ringed)4 (NUM).
Profits (NNS)rose (VBD)12 (CD)% (NN, ringed)in (IN)a (DT)year (NN).
SYM Symbol
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 the parser decides: a symbol character between numbers is the reliable case — 3 x 4, 4 / 5. Most other symbols land elsewhere.
The (DT)answer (NN)is (VBZ)3 (CD)x (SYM, ringed)4 (CD).
Rate (VB)the (DT)film (NN)4 (CD)/ (SYM, ringed)5 (CD).
$ Dollar sign
The dollar sign, and in the Penn convention other currency signs too (the Colombian peso also uses $). It has its own tag because it comes before its number instead of between two numbers. In the dependency tree the number is the head, and the sign depends on it with the label nmod. This parser uses that label only for a currency sign (see Nominal Dependents).
How the parser 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.
Tickets (NNS)cost (VBP)$ ($, ringed)12 (CD)for (IN)adults (NNS).
The (DT)repair (NN)costs (VBZ)$ ($, ringed)40 (CD)at (RB)most (JJS).
PUNCT Punctuation Never offered in an exercise
Punctuation. The parser gives every mark a tag and a place in its analysis, but no exercise asks about punctuation and no diagram draws it. You cannot click it, no button offers its tag, and it does not count towards finishing a sentence. The nine tags below are here so that teachers and administrators can read the token table in the Workbench; you will never be asked for them.
How the parser decides: mostly by the character, but one character can get two tags. A hyphen is HYPH inside a word and : when it is used as a dash. A period is . at the end of a sentence, but inside an abbreviation (Dr.) it stays part of the word. After NN, the . tag is the most common tag in the corpus.
After (ADP)lunch (NOUN), (PUNCT, ringed)the (DET)guests (NOUN)dozed (VERB). (PUNCT, ringed)
. Sentence-final punctuation Never offered in an exercise
Sentence-final punctuation: the full stop, the question mark and the exclamation mark all take this one tag. The tag names the mark’s job, ending the sentence, not its shape. The parser usually attaches it to the root of the sentence with the label punct, but the app’s dependency tree does not draw it.
The (DT)lamp (NN)flickered (VBD)twice (RB). (., ringed)
Did (VBD)the (DT)guests (NNS)leave (VB)early (RB)? (., ringed)
The (DT)kettle (NN)is (VBZ)boiling (VBG)! (., ringed)
, Comma Never offered in an exercise
The comma. It is never drawn, but it can change a diagram. A comment adverb at the start of a sentence, such as Fortunately, is drawn as a disjunct only when a comma follows it. Commas also set off an appositive or a vocative.
After (IN)lunch (NN), (,, ringed)the (DT)guests (NNS)dozed (VBD). (.)
Two commas doing two different jobs — one after a fronted phrase, one inside a list:
After (IN)lunch (NN), (,, ringed)we (PRP)packed (VBD)the (DT)car (NN), (,, ringed)the (DT)tent (NN)and (CC)the (DT)dog (NN). (.)
: Colon or semicolon Never 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.
Bring (VB)two (CD)things (NNS): (:, ringed)a (DT)coat (NN)and (CC)a (DT)map (NN). (.)
The (DT)tide (NN)turned (VBD); (:, ringed)the (DT)boats (NNS)returned (VBD). (.)
The (DT)verdict (NN)was (VBD)clear (JJ)— (:, ringed)nobody (NN)was (VBD)hurt (VBN). (.)
`` Opening quotation mark Never 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.
The (DT)sign (NN)read (VBD)" (``, ringed)closed (VBN)" ('', ringed)in (IN)red (JJ)letters (NNS). (.)
A quoted word inside a sentence — the opening mark gets this tag:
She (PRP)whispered (VBD)" (``, ringed)wait (VB)" ('')and (CC)left (VBD). (.)
'' Closing quotation mark Never offered in an exercise
The closing quotation mark: the second mark of the pair in the example above. The corpus has none.
The same sentence, with the closing mark picked out:
She (PRP)whispered (VBD)" (``)wait (VB)" ('', ringed)and (CC)left (VBD). (.)
-LRB- Left bracket Never 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.
The (DT)recipe (NN)( (-LRB-, ringed)from (IN)my (PRP$)aunt (NN)) (-RRB-, ringed)needs (VBZ)saffron (NN). (.)
A parenthetical aside in the middle of a clause:
The (DT)ferry (NN)( (-LRB-, ringed)the (DT)last (JJ)one (CD)) (-RRB-)left (VBD)at (IN)noon (NN). (.)
-RRB- Right bracket Never 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:
The (DT)ferry (NN)( (-LRB-)the (DT)last (JJ)one (CD)) (-RRB-, ringed)left (VBD)at (IN)noon (NN). (.)
HYPH Hyphen Never offered in an exercise
A hyphen inside a word. The parser splits a hyphenated word at each hyphen, so well-known is three tokens: well, - and known. The words on either side keep their own tags (RB and VBN here).
The exercises still show the three tokens as one word, because there is no space between them. The stored sentence Two students were made co-captains. works the same way: co, - and captains appear as one word.
The (DT)well (RB)- (HYPH, ringed)known (VBN)author (NN)signed (VBD)copies (NNS). (.)
The (DT)twenty (CD)- (HYPH, ringed)year (NN)- (HYPH, ringed)old (JJ)bridge (NN)finally (RB)reopened (VBD). (.)
NFP Superfluous punctuation Never 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.
Good (JJ)luck (NN):-) (NFP, ringed)and (CC)see (VB)you (PRP)soon (RB). (.)
Meet (VB)me (PRP)at (IN)noon (NN)~ (NFP, ringed)bring (VB)lunch (NN). (.)
X Other
Other — anything that fits nowhere else. In practice the set is small: a foreign word, a detached affix, a list marker, an email or web address, and a token the parser cannot classify at all. The Universal Dependencies guidelines say to use X only when no other category fits, and this model follows that rule.
How the parser decides: by the fine tag. FW, LS, ADD and XX always map to X, so on the coarse scale they look the same. The corpus has two X tokens. Both are AFX, and an administrator set both by hand (see AFX).
Their (PRON)plan (NOUN)was (AUX),de (X, ringed)facto (X, ringed),a (DET)retreat (NOUN).
1 (X, ringed))Bring (VERB)a (DET)coat (NOUN).
FW Foreign word Rare — 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 the parser decides: not reliably. It knows a few Latin and French phrases and tags most other foreign words as names (NNP) or ordinary nouns. In tests, bon appétit and merci beaucoup were usually two proper nouns, and status quo was two ordinary nouns.
Spanish words get the same treatment. In They danced cumbia all night. the parser tags cumbia as a proper noun (NNP). In My grandmother makes arepas every Sunday. it tags arepas NN, a singular noun, although the word is plural. Neither is FW, and the Tags exercise expects the parser’s tag unless a teacher or an administrator has corrected it.
Their (PRP$)plan (NN)was (VBD),de (FW, ringed)facto (FW, ringed),a (DT)retreat (NN).
The (DT)dish (NN)is (VBZ)served (VBN)à (FW, ringed)la (NNP)carte (NN).
AFX Affix Only from a person’s 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 the parser 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 corpus has two AFX tokens, and the parser had tagged both NN. An administrator corrected them to AFX/X, and that is the only way the tag reaches an exercise. The parser had also tagged the hyphen as a plural noun (NNS); it was corrected to HYPH at the same time.
The parser’s own output for the corpus sentence:
Two (CD)students (NNS)were (VBD)made (VBN)co (NN, ringed)- (NNS)captains (NNS).
And the same sentence as it is stored, after correction:
Two (CD)students (NNS)were (VBD)made (VBN)co (AFX, ringed)- (HYPH)captains (NNS). (.)
LS List item marker Rare — 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 the parser decides: a digit or a letter at the very start, followed by a closing bracket: 1), b). With a period instead, the results differ. In 1. the digit is still LS, but the period is tagged as sentence-final punctuation. In b. the letter and the period stay one token, tagged as a name (NNP).
Before a sentence that starts with a list marker is saved, the app asks about it and offers to remove the marker. So the tag rarely reaches an exercise.
1 (LS, ringed))Bring (VB)a (DT)coat (NN).
b (LS, ringed))Bring (VB)a (DT)coat (NN)and (CC)a (DT)torch (NN).
ADD Email address Rare — 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 the parser 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.
Email (VB)me (PRP)at (IN)hello@example.com (ADD, ringed).
Visit (VB)https://example.com (ADD, ringed)for (IN)details (NNS).
XX Unknown Rare — needs unusual input
Unknown. The tagger uses it when it cannot classify a token at all: a stray character, a piece of computer code, or damaged text.
How the parser decides: it gives this tag very rarely, because it guesses that an unknown word is a name. Lorem ipsum dolor sit amet. comes back as five proper nouns, and in The password was xq7zt. the password is a proper noun too. What does produce XX is a stray symbol, such as the > of an arrow typed as -->. The corpus has none.
See (VB)the (DT)note (NN)--> (XX, ringed)below (RB).
_SP Space Never from whitespace, which is normalised
SPACE is not one of the seventeen categories, and _SP is its only tag. The parser gives it to extra whitespace, such as a double space or a line break, so that it can rebuild the original text exactly. Typed with two spaces, The gap was wide. gets an extra token: the second space, tagged _SP. A chip for a space would show nothing, so this entry has no chips.
In Grammify, whitespace never gets this tag. Before a sentence is parsed, the app trims its ends and turns every run of spaces, tabs or line breaks into one ordinary space. No extra whitespace is left to tag (see Sentence normalisation).
Very rarely, the parser gives _SP to an unusual character that is not a space at all. If a stored sentence had one, the Tags exercise would ask for it.
Quick check
- Give the coarse category and the fine tag of Wow, second and nine in Wow, the second train left at nine.
Answer
Wow isINTJ/UH: an interjection, outside the grammar of the sentence. The word nine isNUM/CD, a cardinal number: it counts. The word second is an ordinal: it puts the train in order instead of counting, so it is an adjective,ADJ/JJ. - Look at two sentences: Rents rose 8% last year. A coffee costs $3 here. Which fine tag does the parser give the % sign, and which the $ sign?
Answer
The % sign getsNN(coarseNOUN), because the parser tags the percent sign as a noun. SoNNis the answer the Tags exercise expects, unless a teacher or an administrator has corrected it. The $ sign gets a tag of its own,$(coarseSYM), because a currency sign comes before its number. - Which fine tag does the question mark get in Is the library open today? Will the Tags exercise ask you for it?
Answer
The tag is., for sentence-final punctuation. The full stop, the question mark and the exclamation mark all share it, because the tag names the mark’s job, ending the sentence, not its shape. The Tags exercise never asks for it: no exercise asks about punctuation. - A teacher saves the sentence We ate empanadas at the market. Will the Tags exercise expect
FW(foreign word) for empanadas?Answer
No. The parser rarely givesFW: it gives most foreign words an English tag, usually a name or an ordinary noun. Here it tags empanadasNNP, a proper noun, and the Tags exercise expects that tag unless the teacher or an administrator corrects 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. - Symbol
- A meaningful non-word character — $, x between numbers. Unevenly recognised; the percent sign is a noun to the parser. Tickets cost $12. The room is 3 x 4 metres.
- Affix
- A prefix or suffix split from its stem — the co of co-captains. It is
AFXonly when a person corrects the tag. Two students were made co-captains. The pre-war house survived. - Sentence normalisation
- The clean-up Grammify applies to a sentence before parsing it. Every run of spaces, tabs or line breaks becomes one space, and the ends are trimmed, so whitespace never becomes
_SPhere. Our bus is late. typed with two spaces is parsed with one. Call me tomorrow. typed with a line break inside is parsed with a space instead.
Practice on a real sentence
NUM/CD, and that is the answer the drill expects. The two as words also get different tags: the first is an adverb (ADV/RB), the second a preposition (ADP/IN).Loading the practice sentence…