Package smile.nlp.pos
Enum Class PennTreebankPOS
- All Implemented Interfaces:
Serializable
,Comparable<PennTreebankPOS>
,Constable
The Penn Treebank Tag set.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPunctuation $Coordinating conjunction.Cardinal number.Punctuation ) ] }Punctuation ' or ''Punctuation ; : ...Punctuation ,Punctuation -Determiner.Existential there.Foreign word.Preposition or subordinating conjunction.Adjective.Adjective, comparative.Adjective, superlative.List item marker.Modal verb.Noun, singular or mass.Proper noun, singular.Proper noun, plural.Noun, plural.Punctuation ( [ {Punctuation ` or ``Predeterminer.Possessive ending.Punctuation #Personal pronoun.Possessive pronoun.Adverb.Adverb, comparative.Adverb, superlative.Particle.Sentence-break punctuation .Symbol.to.Interjection.Verb, base form.Verb, past tense.Verb, gerund or present participle.Verb, past participle.Verb, non-3rd person singular present.Verb, 3rd person singular present.Wh-determiner.Wh-pronoun.Possessive wh-pronoun.Wh-adverb. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PennTreebankPOS
Returns an enum value from a string.static PennTreebankPOS
Returns the enum constant of this class with the specified name.static PennTreebankPOS[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CC
Coordinating conjunction. This category includes and, but, nor, or, yet (as in Yet it's cheap, cheap yet good), as well as the mathematical operators plus, minus, less, times (in the sense of "multiplied by") and over (in the sense of "divided by"), when they are spelled out. FOR in the sense of "because" is a coordinating conjunction (CC) rather than a subordinating conjunction (IN) -He asked to be transferred, for/CC he was unhappy.
SO in the sense of "so that," on the other hand, is a subordinating conjunction (IN).
-
CD
Cardinal number. -
DT
Determiner. This category includes the articles a(n), every, no and the, the indefinite determiners another, any and some, each, either (as in either way), neither (as in neither decision), that, these, this and those, and instances of all and both when they do not precede a determiner or possessive pronoun (as in all roads or both times). (Instances of all or both that do precede a determiner or possessive pronoun are tagged as predeterminers (PDT).) Since any noun phrase can contain at most one determiner, the fact that such can occur together with a determiner (as in the only such case) means that it should be tagged as an adjective (JJ), unless it precedes a determiner, as in such a good time, in which case it is a predeterminer (PDT). -
EX
Existential there. Existential there is the unstressed there that triggers inversion of the inflected verb and the logical subject of a sentence. Examples:There/EX was a party in progress.
There/EX ensued a melee.
-
FW
Foreign word. -
IN
Preposition or subordinating conjunction. We make no explicit distinction between prepositions and subordinating conjunctions. (The distinction is not lost, however -- a preposition is an IN that precedes a noun phrase or a prepositional phrase, and a subordinate conjunction is an IN that precedes a clause.) The preposition to has its own special tag TO. -
JJ
Adjective. Hypenated compounds that are used as modifiers, like happy-go-lucky, one-of-a-kind and run-of-the-mill, are tagged as JJ. Ordinal numbers are tagged as JJ, as are compounds of the form n-th x-est, like fourth-largest. -
JJR
Adjective, comparative. Adjectives with the comparative ending -er and a comparative meaning. Adjectives with a comparative meaning but without the comparative ending -er, like superior, should simply be tagged as JJ. Adjectives with the ending -er but without a strictly comparative meaning, like further in further details, should also simply be tagged as JJ. -
JJS
Adjective, superlative. Adjectives with the superlative ending -est. Adjectives with a superlative meaning but without the superlative ending -est, like first, last or unsurpassed, should simply be tagged as JJ. -
LS
List item marker. This category includes letters and numerals when they are used to identify items in a list. -
MD
Modal verb. This category includes all verbs that don't take an -s ending in the third-person singular present: can, could, (dare), may, might, must, ought, shall, should, will, would. -
NN
Noun, singular or mass. -
NNS
Noun, plural. -
NNP
Proper noun, singular. -
NNPS
Proper noun, plural. -
PDT
Predeterminer. This category includes the following determinerlike elements when they precede an article or possessive pronoun. Examples:all/PDT his marbles
nary/PDT a soul
both/PDT the girls
quite/PDT a mess
half/PDT his time
rather/PDT a nuisance
many/PDT a moon
such/PDT a good time
-
POS
Possessive ending. The possessive ending on nouns ending in 's or ' is split off by the tagging algorithm and tagged as if it were a separate word. Examples:JohnINP 's/POS idea
the parents/NNS '/POS distress
-
PRP
Personal pronoun. This category includes the personal pronouns proper, without regard for case distinctions (I, me, you, he, him, etc.), the reflexive pronouns ending in -selfor -selves, and the nominal possessive pronouns mine, yours, his, hers, ours and theirs. The adjectival possessive forms my, your, his, her, its, our and their, on the other hand, are tagged PP$. -
PRP$
Possessive pronoun. This category includes the adjectival possessive forms my, your, his, her, ids, one's, our and their. The nominal possessive pronouns mine, yours, his, hers, ours and theirs are tagged as personal pronouns (PP). -
RB
Adverb. This category includes most words that end in -ly as well as degree words like quite, too and very, posthead modifiers like enough and indeed (as in good enough, very well indeeed), and negative markers like not, n't, and never. -
RBR
Adverb, comparative. Adverbs with the comparative ending -er but without a strictly comparative meaning, like later in "We can always come by later", should simply be tagged as RB. -
RBS
Adverb, superlative. -
RP
Particle. This category includes a number of mostly monosyllabic words that also double as directional adverbs and prepositions. -
SYM
Symbol. This includes / [ = *, #, etc. This tag should be used for mathematical, scientific and technical symbols or expressions that aren't words of English. It should not be used for any and all technical expressions. For instance, the names of chemicals, units of measurements (including abbreviations thereof) and the like should be tagged as nouns. -
TO
to. -
UH
Interjection. This category includes my (as in My, what a gorgeous day), oh, please, see (as in See, it's like this), ah, well and yes, among others. -
VB
Verb, base form. This tag subsumes imperatives, infinitives and subjunctives. -
VBD
Verb, past tense. This category includes the conditional form of the verb to be. Examples:If I were/VBD rich, ...
If I were/VBD to win the lottery, ...
-
VBG
Verb, gerund or present participle. -
VBN
Verb, past participle. -
VBP
Verb, non-3rd person singular present. -
VBZ
Verb, 3rd person singular present. -
WDT
Wh-determiner. This category includes which, as well as that when it is used as a relative pronoun. -
WP
Wh-pronoun. This category includes what, who and whom. -
WP$
Possessive wh-pronoun. This category includes the wh-word whose. -
WRB
Wh-adverb. This category includes how, where, why, etc. When in a temporal sense is tagged WRB. In the sense of "if," on the other hand, it is a subordinating conjunction (IN). Examples:When/WRB he finally arrived, I was on my way out.
I like it when/IN you make dinner for me.
-
$
Punctuation $ -
SENT
Sentence-break punctuation . ? ! -
POUND
Punctuation # -
DASH
Punctuation - -
COMMA
Punctuation , -
COLON
Punctuation ; : ... -
OPENING_PARENTHESIS
Punctuation ( [ { -
CLOSING_PARENTHESIS
Punctuation ) ] } -
OPENING_QUOTATION
Punctuation ` or `` -
CLOSING_QUOTATION
Punctuation ' or ''
-
-
Field Details
-
open
public final boolean openTrue if the POS is an open class.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
Returns an enum value from a string. Note that valueOf cannot be overridden, so we have to use this workaround for converting custom strings to enum values without using valueOf method.- Parameters:
value
- the string value.- Returns:
- the enum value.
-