edu.stanford.nlp.trees
Class EnglishGrammaticalRelations

java.lang.Object
  extended by edu.stanford.nlp.trees.EnglishGrammaticalRelations

public class EnglishGrammaticalRelations
extends Object

EnglishGrammaticalRelations is a set of GrammaticalRelation objects for the English language. These relations are commonly called Stanford Dependencies (SD).

Grammatical relations can either be shown in their basic form, where each input token receives a relation, or "collapsed" which does certain normalizations which group words or turns them into relations. See EnglishGrammaticalStructure. What is presented here mainly shows the basic form, though there is some mixture. The "collapsed" grammatical relations primarily differ as follows:

This set of English grammatical relations is not intended to be exhaustive or immutable. It's just where we're at now.

See GrammaticalRelation for details of fields and matching.

If using LexicalizedParser, it should be run with the -retainTmpSubcategories option and one of the -splitTMP options (e.g., -splitTMP 1) in order to get the temporal NP dependencies maximally right!

Implementation note: To add a new grammatical relation:

Author:
Bill MacCartney, Marie-Catherine de Marneffe, Christopher Manning, Galen Andrew (refactoring English-specific stuff)
See Also:
GrammaticalStructure, GrammaticalRelation, EnglishGrammaticalStructure

Nested Class Summary
static class EnglishGrammaticalRelations.AbbreviationModifierGRAnnotation
           
static class EnglishGrammaticalRelations.AdjectivalComplementGRAnnotation
           
static class EnglishGrammaticalRelations.AdjectivalModifierGRAnnotation
           
static class EnglishGrammaticalRelations.AdvClauseModifierGRAnnotation
           
static class EnglishGrammaticalRelations.AdverbialModifierGRAnnotation
           
static class EnglishGrammaticalRelations.AgentGRAnnotation
           
static class EnglishGrammaticalRelations.AppositionalModifierGRAnnotation
           
static class EnglishGrammaticalRelations.ArgumentGRAnnotation
           
static class EnglishGrammaticalRelations.AttributiveGRAnnotation
           
static class EnglishGrammaticalRelations.AuxModifierGRAnnotation
           
static class EnglishGrammaticalRelations.AuxPassiveGRAnnotation
           
static class EnglishGrammaticalRelations.ClausalComplementGRAnnotation
           
static class EnglishGrammaticalRelations.ClausalPassiveSubjectGRAnnotation
           
static class EnglishGrammaticalRelations.ClausalSubjectGRAnnotation
           
static class EnglishGrammaticalRelations.ComplementGRAnnotation
           
static class EnglishGrammaticalRelations.ComplementizerGRAnnotation
           
static class EnglishGrammaticalRelations.ConjunctGRAnnotation
           
static class EnglishGrammaticalRelations.ControllingSubjectGRAnnotation
           
static class EnglishGrammaticalRelations.CoordinationGRAnnotation
           
static class EnglishGrammaticalRelations.CopulaGRAnnotation
           
static class EnglishGrammaticalRelations.DeterminerGRAnnotation
           
static class EnglishGrammaticalRelations.DirectObjectGRAnnotation
           
static class EnglishGrammaticalRelations.ExpletiveGRAnnotation
           
static class EnglishGrammaticalRelations.IndirectObjectGRAnnotation
           
static class EnglishGrammaticalRelations.InfinitivalModifierGRAnnotation
           
static class EnglishGrammaticalRelations.MarkerGRAnnotation
           
static class EnglishGrammaticalRelations.ModifierGRAnnotation
           
static class EnglishGrammaticalRelations.MultiWordExpressionGRAnnotation
           
static class EnglishGrammaticalRelations.NegationModifierGRAnnotation
           
static class EnglishGrammaticalRelations.NominalPassiveSubjectGRAnnotation
           
static class EnglishGrammaticalRelations.NominalSubjectGRAnnotation
           
static class EnglishGrammaticalRelations.NounCompoundModifierGRAnnotation
           
static class EnglishGrammaticalRelations.NpAdverbialModifierGRAnnotation
           
static class EnglishGrammaticalRelations.NumberModifierGRAnnotation
           
static class EnglishGrammaticalRelations.NumericModifierGRAnnotation
           
static class EnglishGrammaticalRelations.ObjectGRAnnotation
           
static class EnglishGrammaticalRelations.ParataxisGRAnnotation
           
static class EnglishGrammaticalRelations.ParticipialModifierGRAnnotation
           
static class EnglishGrammaticalRelations.PhrasalVerbParticleGRAnnotation
           
static class EnglishGrammaticalRelations.PossessionModifierGRAnnotation
           
static class EnglishGrammaticalRelations.PossessiveModifierGRAnnotation
           
static class EnglishGrammaticalRelations.PreconjunctGRAnnotation
           
static class EnglishGrammaticalRelations.PredeterminerGRAnnotation
           
static class EnglishGrammaticalRelations.PredicateGRAnnotation
           
static class EnglishGrammaticalRelations.PrepositionalComplementGRAnnotation
           
static class EnglishGrammaticalRelations.PrepositionalModifierGRAnnotation
           
static class EnglishGrammaticalRelations.PrepositionalObjectGRAnnotation
           
static class EnglishGrammaticalRelations.PunctuationGRAnnotation
           
static class EnglishGrammaticalRelations.PurposeClauseModifierGRAnnotation
           
static class EnglishGrammaticalRelations.QuantifierModifierGRAnnotation
           
static class EnglishGrammaticalRelations.ReferentGRAnnotation
           
static class EnglishGrammaticalRelations.RelativeClauseModifierGRAnnotation
           
static class EnglishGrammaticalRelations.RelativeGRAnnotation
           
static class EnglishGrammaticalRelations.SemanticDependentGRAnnotation
           
static class EnglishGrammaticalRelations.SubjectGRAnnotation
           
static class EnglishGrammaticalRelations.TemporalModifierGRAnnotation
           
static class EnglishGrammaticalRelations.XClausalComplementGRAnnotation
           
 
Field Summary
static GrammaticalRelation ABBREVIATION_MODIFIER
          The "abbreviation modifier" grammatical relation.
static GrammaticalRelation ADJECTIVAL_COMPLEMENT
          The "adjectival complement" grammatical relation.
static GrammaticalRelation ADJECTIVAL_MODIFIER
          The "adjectival modifier" grammatical relation.
static GrammaticalRelation ADV_CLAUSE_MODIFIER
          The "adverbial clause modifier" grammatical relation.
static GrammaticalRelation ADVERBIAL_MODIFIER
          The "adverbial modifier" grammatical relation.
static GrammaticalRelation AGENT
          The "agent" grammatical relation.
static GrammaticalRelation APPOSITIONAL_MODIFIER
          The "appositional modifier" grammatical relation.
static GrammaticalRelation ARGUMENT
          The "argument" grammatical relation.
static GrammaticalRelation ATTRIBUTIVE
          The "attributive" grammatical relation.
static GrammaticalRelation AUX_MODIFIER
          The "auxiliary" grammatical relation.
static GrammaticalRelation AUX_PASSIVE_MODIFIER
          The "passive auxiliary" grammatical relation.
static GrammaticalRelation CLAUSAL_COMPLEMENT
          The "clausal complement" grammatical relation.
static GrammaticalRelation CLAUSAL_PASSIVE_SUBJECT
          The "clausal passive subject" grammatical relation.
static GrammaticalRelation CLAUSAL_SUBJECT
          The "clausal subject" grammatical relation.
static GrammaticalRelation COMPLEMENT
          The "complement" grammatical relation.
static GrammaticalRelation COMPLEMENTIZER
          The "complementizer" grammatical relation.
static GrammaticalRelation CONJUNCT
          The "conjunct" grammatical relation.
static GrammaticalRelation CONTROLLING_SUBJECT
          The "controlling subject" grammatical relation.
static GrammaticalRelation COORDINATION
          The "coordination" grammatical relation.
static GrammaticalRelation COPULA
          The "copula" grammatical relation.
static GrammaticalRelation DETERMINER
          The "determiner" grammatical relation.
static GrammaticalRelation DIRECT_OBJECT
          The "direct object" grammatical relation.
static GrammaticalRelation EXPLETIVE
          The "expletive" grammatical relation.
static GrammaticalRelation INDIRECT_OBJECT
          The "indirect object" grammatical relation.
static GrammaticalRelation INFINITIVAL_MODIFIER
          The "infinitival modifier" grammatical relation.
static GrammaticalRelation MARKER
          The "marker" grammatical relation.
static GrammaticalRelation MODIFIER
          The "modifier" grammatical relation.
static GrammaticalRelation MULTI_WORD_EXPRESSION
          The "multi-word expression" grammatical relation.
static GrammaticalRelation NEGATION_MODIFIER
          The "negation modifier" grammatical relation.
static GrammaticalRelation NOMINAL_PASSIVE_SUBJECT
          The "nominal passive subject" grammatical relation.
static GrammaticalRelation NOMINAL_SUBJECT
          The "nominal subject" grammatical relation.
static GrammaticalRelation NOUN_COMPOUND_MODIFIER
          The "noun compound modifier" grammatical relation.
static GrammaticalRelation NP_ADVERBIAL_MODIFIER
          The "noun phrase as adverbial modifier" grammatical relation.
static GrammaticalRelation NUMBER_MODIFIER
          The "compound number modifier" grammatical relation.
static GrammaticalRelation NUMERIC_MODIFIER
          The "numeric modifier" grammatical relation.
static GrammaticalRelation OBJECT
          The "object" grammatical relation.
static GrammaticalRelation PARATAXIS
          The "parataxis" grammatical relation.
static GrammaticalRelation PARTICIPIAL_MODIFIER
          The "participial modifier" grammatical relation.
static GrammaticalRelation PHRASAL_VERB_PARTICLE
          The "phrasal verb particle" grammatical relation.
static GrammaticalRelation POSSESSION_MODIFIER
          The "possession" grammatical relation between the possessum and the possessor.
static GrammaticalRelation POSSESSIVE_MODIFIER
          The "possessive" grammatical relation.
static GrammaticalRelation PRECONJUNCT
          The "preconjunct" grammatical relation.
static GrammaticalRelation PREDETERMINER
          The "predeterminer" grammatical relation.
static GrammaticalRelation PREDICATE
          The "predicate" grammatical relation.
static GrammaticalRelation PREPOSITIONAL_COMPLEMENT
          The "prepositional complement" grammatical relation.
static GrammaticalRelation PREPOSITIONAL_MODIFIER
          The "prepositional modifier" grammatical relation.
static GrammaticalRelation PREPOSITIONAL_OBJECT
          The "prepositional object" grammatical relation.
static GrammaticalRelation PUNCTUATION
          The "punctuation" grammatical relation.
static GrammaticalRelation PURPOSE_CLAUSE_MODIFIER
          The "purpose clause modifier" grammatical relation.
static GrammaticalRelation QUANTIFIER_MODIFIER
          The "quantifier phrase modifier" grammatical relation.
static GrammaticalRelation REFERENT
          The "referent" grammatical relation.
static GrammaticalRelation RELATIVE
          The "relative" grammatical relation.
static GrammaticalRelation RELATIVE_CLAUSE_MODIFIER
          The "relative clause modifier" grammatical relation.
static GrammaticalRelation SEMANTIC_DEPENDENT
          The "semantic dependent" grammatical relation has been introduced as a supertype for the controlling subject relation.
static GrammaticalRelation SUBJECT
          The "subject" grammatical relation.
static GrammaticalRelation TEMPORAL_MODIFIER
          The "temporal modifier" grammatical relation.
static ReadWriteLock valuesLock
           
static GrammaticalRelation XCLAUSAL_COMPLEMENT
          An open clausal complement (xcomp) of a VP or an ADJP is a clausal complement without its own subject, whose reference is determined by an external subject.
 
Method Summary
static GrammaticalRelation getConj(String conjunctionString)
          The "conj" grammatical relation.
static Collection<GrammaticalRelation> getConjs()
           
static GrammaticalRelation getPrep(String prepositionString)
          The "prep" grammatical relation.
static GrammaticalRelation getPrepC(String prepositionString)
          The "prepc" grammatical relation.
static Collection<GrammaticalRelation> getPreps()
           
static Collection<GrammaticalRelation> getPrepsC()
           
static void main(String[] args)
          Prints out the English grammatical relations hierarchy.
static GrammaticalRelation valueOf(Object o)
          Returns an EnglishGrammaticalRelation based on the argument.
static GrammaticalRelation valueOf(String s)
          Returns the EnglishGrammaticalRelation having the given string representation (e.g.
static List<GrammaticalRelation> values()
           
static List<GrammaticalRelation> values(boolean threadSafe)
           
static Lock valuesLock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREDICATE

public static final GrammaticalRelation PREDICATE
The "predicate" grammatical relation. The predicate of a clause is the main VP of that clause; the predicate of a subject is the predicate of the clause to which the subject belongs.

Example:
"Reagan died" → pred(Reagan, died)


AUX_MODIFIER

public static final GrammaticalRelation AUX_MODIFIER
The "auxiliary" grammatical relation. An auxiliary of a clause is a non-main verb of the clause.

Example:
"Reagan has died" → aux(died, has)


AUX_PASSIVE_MODIFIER

public static final GrammaticalRelation AUX_PASSIVE_MODIFIER
The "passive auxiliary" grammatical relation. A passive auxiliary of a clause is a non-main verb of the clause which contains the passive information.

Example:
"Kennedy has been killed" → auxpass(killed, been)


COPULA

public static final GrammaticalRelation COPULA
The "copula" grammatical relation. A copula is the relation between the complement of a copular verb and the copular verb.

Examples:
"Bill is big" → cop(big, is)
"Bill is an honest man" → cop(man, is)


CONJUNCT

public static final GrammaticalRelation CONJUNCT
The "conjunct" grammatical relation. A conjunct is the relation between two elements connected by a conjunction word. We treat conjunctions asymmetrically: The head of the relation is the first conjunct and other conjunctions depend on it via the conj relation.

Example:
"Bill is big and honest" → conj(big, honest)

Note:Modified in 2010 to exclude the case of a CC/CONJP first in its phrase: it has to conjoin things.


COORDINATION

public static final GrammaticalRelation COORDINATION
The "coordination" grammatical relation. A coordination is the relation between an element and a conjunction.

Example:
"Bill is big and honest." → cc(big, and)


PUNCTUATION

public static final GrammaticalRelation PUNCTUATION
The "punctuation" grammatical relation. This is used for any piece of punctuation in a clause, if punctuation is being retained in the typed dependencies.

Example:
"Go home!" → punct(Go, !)


ARGUMENT

public static final GrammaticalRelation ARGUMENT
The "argument" grammatical relation. An argument of a VP is a subject or complement of that VP; an argument of a clause is an argument of the VP which is the predicate of that clause.

Example:
"Clinton defeated Dole" → arg(defeated, Clinton), arg(defeated, Dole)


SUBJECT

public static final GrammaticalRelation SUBJECT
The "subject" grammatical relation. The subject of a VP is the noun or clause that performs or experiences the VP; the subject of a clause is the subject of the VP which is the predicate of that clause.

Examples:
"Clinton defeated Dole" → subj(defeated, Clinton)
"What she said is untrue" → subj(is, What she said)


NOMINAL_SUBJECT

public static final GrammaticalRelation NOMINAL_SUBJECT
The "nominal subject" grammatical relation. A nominal subject is a subject which is an noun phrase.

Example:
"Clinton defeated Dole" → nsubj(defeated, Clinton)


NOMINAL_PASSIVE_SUBJECT

public static final GrammaticalRelation NOMINAL_PASSIVE_SUBJECT
The "nominal passive subject" grammatical relation. A nominal passive subject is a subject of a passive which is an noun phrase.

Example:
"Dole was defeated by Clinton" → nsubjpass(defeated, Dole)

This pattern recognizes basic (non-coordinated) examples. The coordinated examples are currently handled by correctDependencies() in EnglishGrammaticalStructure. This seemed more accurate than any tregex expression we could come up with.


CLAUSAL_SUBJECT

public static final GrammaticalRelation CLAUSAL_SUBJECT
The "clausal subject" grammatical relation. A clausal subject is a subject which is a clause.

Examples: (subject is "what she said" in both examples)
"What she said makes sense" → csubj(makes, said)
"What she said is untrue" → csubj(untrue, said)


CLAUSAL_PASSIVE_SUBJECT

public static final GrammaticalRelation CLAUSAL_PASSIVE_SUBJECT
The "clausal passive subject" grammatical relation. A clausal passive subject is a subject of a passive verb which is a clause.

Example: (subject is "that she lied")
"That she lied was suspected by everyone" → csubjpass(suspected, lied)


COMPLEMENT

public static final GrammaticalRelation COMPLEMENT
The "complement" grammatical relation. A complement of a VP is any object (direct or indirect) of that VP, or a clause or adjectival phrase which functions like an object; a complement of a clause is an complement of the VP which is the predicate of that clause.

Examples:
"She gave me a raise" → comp(gave, me), comp(gave, a raise)
"I like to swim" → comp(like, to swim)


OBJECT

public static final GrammaticalRelation OBJECT
The "object" grammatical relation. An object of a VP is any direct object or indirect object of that VP; an object of a clause is an object of the VP which is the predicate of that clause.

Examples:
"She gave me a raise" → obj(gave, me), obj(gave, raise)


DIRECT_OBJECT

public static final GrammaticalRelation DIRECT_OBJECT
The "direct object" grammatical relation. The direct object of a VP is the noun phrase which is the (accusative) object of the verb; the direct object of a clause is the direct object of the VP which is the predicate of that clause.

Example:
"She gave me a raise" → dobj(gave, raise)


INDIRECT_OBJECT

public static final GrammaticalRelation INDIRECT_OBJECT
The "indirect object" grammatical relation. The indirect object of a VP is the noun phrase which is the (dative) object of the verb; the indirect object of a clause is the indirect object of the VP which is the predicate of that clause.

Example:
"She gave me a raise" → iobj(gave, me)


PREPOSITIONAL_OBJECT

public static final GrammaticalRelation PREPOSITIONAL_OBJECT
The "prepositional object" grammatical relation. The object of a preposition is the head of a noun phrase following the preposition, or the adverbs "here" and "there". (The preposition in turn may be modifying a noun, verb, etc.) We here define cases of VBG quasi-prepositions like "including", "concerning", etc. as instances of pobj (unlike the Penn Treebank).

Example:
"I sat on the chair" → pobj(on, chair)

(The preposition can be called a FW for pace, versus, etc. It can also be called a CC - but we don't currently handle that and would need to distinguish from conjoined PPs. Jan 2010 update: We now insist that the NP must follow the preposition. This prevents a preceding NP measure phrase being matched as a pobj. We do allow a preposition tagged RB followed by an NP pobj, as happens in the Penn Treebank for adverbial uses of PP like "up 19%")


PREPOSITIONAL_COMPLEMENT

public static final GrammaticalRelation PREPOSITIONAL_COMPLEMENT
The "prepositional complement" grammatical relation. This is used when the complement of a preposition is a clause or an adverbial or prepositional phrase. The prepositional complement of a preposition is the head of the sentence following the preposition, or the preposition head of the PP.

Examples:
"We have no useful information on whether users are at risk" &arr; pcomp(on, are)
"They heard about you missing classes." &arr; pcomp(about, missing)
It is warmer in Greece than in Italy &arr; pcomp(than, in)


ATTRIBUTIVE

public static final GrammaticalRelation ATTRIBUTIVE
The "attributive" grammatical relation. The attributive is the complement of a verb such as "to be, to seem, to appear".

These mainly occur in questions. Arguably they shouldn't and we should treat the question WHNP and WHADJP as predicates (as we do for ADJP and NP complements (NP-PRD and ADJP-PRD), but we at present don't produce this.


CLAUSAL_COMPLEMENT

public static final GrammaticalRelation CLAUSAL_COMPLEMENT
The "clausal complement" grammatical relation. A clausal complement of a verb or adjective is a dependent clause with an internal subject which functions like an object of the verb, or adjective. Clausal complements for nouns are limited to complement clauses with a subset of nouns like "fact" or "report". We analyze them the same (parallel to the analysis of this class as "content clauses" in Huddleston and Pullum 2002). Clausal complements are usually finite (though there are occasional exceptions including remnant English subjunctives, and we also classify the complement of causative "have" (She had him arrested) in this category.

Example:
"He says that you like to swim" → ccomp(says, like)
"I am certain that he did it" → ccomp(certain, did)
"I admire the fact that you are honest" → ccomp(fact, honest)


XCLAUSAL_COMPLEMENT

public static final GrammaticalRelation XCLAUSAL_COMPLEMENT
An open clausal complement (xcomp) of a VP or an ADJP is a clausal complement without its own subject, whose reference is determined by an external subject. These complements are always non-finite. The name xcomp is borrowed from Lexical-Functional Grammar. (Mainly "TO-clause" are recognized, but also some VBG like "stop eating")

Examples:
"I like to swim" → xcomp(like, swim)
"I am ready to leave" → xcomp(ready, leave)


COMPLEMENTIZER

public static final GrammaticalRelation COMPLEMENTIZER
The "complementizer" grammatical relation. A complementizer of a clausal complement is the word introducing it.

Example:
"He says that you like to swim" → complm(like, that)


MARKER

public static final GrammaticalRelation MARKER
The "marker" grammatical relation. A marker of an adverbial clausal complement is the word introducing it.

Example:
"U.S. forces have been engaged in intense fighting after insurgents launched simultaneous attacks" → mark(launched, after)


RELATIVE

public static final GrammaticalRelation RELATIVE
The "relative" grammatical relation. A relative of a relative clause is the head word of the WH-phrase introducing it.

Examples:
"I saw the man that you love" → rel(love, that)
"I saw the man whose wife you love" → rel(love, wife)

Note that this is designed to *not* match cases when there is no overt subject NP. They are instead matched by the nsubj rule. Effectively this gives us an HPSG-like relative clause analysis, where subject relatives are analyzed as regular subject structures. And "why" (WHADVP) cases are treated as advmod not as rel.


REFERENT

public static final GrammaticalRelation REFERENT
The "referent" grammatical relation. A referent of the Wh-word of a NP is the relative word introducing the relative clause modifying the NP.

Example:
"I saw the book which you bought" → ref(book, which)
"I saw the book the cover of which you designed" → ref(book, which)


EXPLETIVE

public static final GrammaticalRelation EXPLETIVE
The "expletive" grammatical relation. This relation captures an existential there.

Example:
"There is a statue in the corner" → expl(is, there)


ADJECTIVAL_COMPLEMENT

public static final GrammaticalRelation ADJECTIVAL_COMPLEMENT
The "adjectival complement" grammatical relation. An adjectival complement of a VP is an adjectival phrase which functions as the complement (like an object of the verb); an adjectival complement of a clause is the adjectival complement of the VP which is the predicate of that clause.

Example:
"She looks very beautiful" → acomp(looks, beautiful)


MODIFIER

public static final GrammaticalRelation MODIFIER
The "modifier" grammatical relation. A modifier of a VP is any constituent that serves to modify the meaning of the VP (but is not an ARGUMENT of that VP); a modifier of a clause is an modifier of the VP which is the predicate of that clause.

Examples:
"Last night, I swam in the pool" → mod(swam, in the pool), mod(swam, last night)


ADV_CLAUSE_MODIFIER

public static final GrammaticalRelation ADV_CLAUSE_MODIFIER
The "adverbial clause modifier" grammatical relation. An adverbial clause modifier of a VP is a clause modifying the verb (temporal clauses, consequences, conditional clauses, etc.).

Examples:
"The accident happened as the night was falling" → advcl(happened, falling)
"If you know who did it, you should tell the teacher" → advcl(tell, know)


PURPOSE_CLAUSE_MODIFIER

public static final GrammaticalRelation PURPOSE_CLAUSE_MODIFIER
The "purpose clause modifier" grammatical relation. A purpose clause modifier of a VP is a clause headed by "(in order) to" specifying a purpose. Note: at present we only recognize ones that have "in order to" or are fronted. Otherwise we can't use our surface representations distinguish these from xcomp's. We can also recognize "to" clauses introduced by "be VBN".

Example:
"He talked to the president in order to secure the account" → purpcl(talked, secure)


RELATIVE_CLAUSE_MODIFIER

public static final GrammaticalRelation RELATIVE_CLAUSE_MODIFIER
The "relative clause modifier" grammatical relation. A relative clause modifier of an NP is a relative clause modifying the NP. The link points from the head noun of the NP to the head of the relative clause, normally a verb.

Examples:
"I saw the man you love" → rcmod(man, love)
"I saw the book which you bought" → rcmod(book, bought)


ADJECTIVAL_MODIFIER

public static final GrammaticalRelation ADJECTIVAL_MODIFIER
The "adjectival modifier" grammatical relation. An adjectival modifier of an NP is any adjectival phrase that serves to modify the meaning of the NP.

Example:
"Sam eats red meat" → amod(meat, red)

The relation amod is also used for multiword country adjectives, despite their questionable treebank representation.

Example:
"the West German economy" → amod(German, West), amod(economy, German)


NUMERIC_MODIFIER

public static final GrammaticalRelation NUMERIC_MODIFIER
The "numeric modifier" grammatical relation. A numeric modifier of an NP is any number phrase that serves to modify the meaning of the NP.

Example:
"Sam eats 3 sheep" → num(sheep, 3)


NUMBER_MODIFIER

public static final GrammaticalRelation NUMBER_MODIFIER
The "compound number modifier" grammatical relation. A compound number modifier is a part of a number phrase or currency amount.

Example:
"I lost $ 3.2 billion" → number($, billion)


QUANTIFIER_MODIFIER

public static final GrammaticalRelation QUANTIFIER_MODIFIER
The "quantifier phrase modifier" grammatical relation. A quantifier modifier is an element modifying the head of a QP constituent.

Example:
"About 200 people came to the party" → quantmod(200, About)


NOUN_COMPOUND_MODIFIER

public static final GrammaticalRelation NOUN_COMPOUND_MODIFIER
The "noun compound modifier" grammatical relation. A noun compound modifier of an NP is any noun that serves to modify the head noun. Note that this has all nouns modify the rightmost a la Penn headship rules. There is no intelligent noun compound analysis.

Example:
"Oil price futures" → nn(futures, oil), nn(futures, price)


APPOSITIONAL_MODIFIER

public static final GrammaticalRelation APPOSITIONAL_MODIFIER
The "appositional modifier" grammatical relation. An appositional modifier of an NP is an NP that serves to modify the meaning of the NP. It includes parenthesized examples

Examples:
"Sam, my brother, eats red meat" → appos(Sam, brother)
"Bill (John's cousin)" → appos(Bill, cousin)


ABBREVIATION_MODIFIER

public static final GrammaticalRelation ABBREVIATION_MODIFIER
The "abbreviation modifier" grammatical relation. An abbreviation modifier of an NP is a parenthesized NP that serves to abbreviate the NP (or to define an abbreviation). Abbreviations are recognized either by being deemed proper nouns or by matching a regex pattern.

Example:
"The Australian Broadcasting Corporation (ABC)" → abbrev(Corporation, ABC)


PARTICIPIAL_MODIFIER

public static final GrammaticalRelation PARTICIPIAL_MODIFIER
The "participial modifier" grammatical relation. A participial modifier of an NP or VP (or S) is a VP[part] that serves to modify the meaning of the NP or VP.

Examples:
"truffles picked during the spring are tasty" → partmod(truffles, picked)
"Bill picked Fred for the team demonstrating his incompetence" → partmod(picked, demonstrating)


INFINITIVAL_MODIFIER

public static final GrammaticalRelation INFINITIVAL_MODIFIER
The "infinitival modifier" grammatical relation. An infinitival modifier of an NP is an S/VP that serves to modify the meaning of the NP.

Example:
"points to establish are ..." → infmod(points, establish)


ADVERBIAL_MODIFIER

public static final GrammaticalRelation ADVERBIAL_MODIFIER
The "adverbial modifier" grammatical relation. An adverbial modifier of a word is a (non-clausal) RB or ADVP that serves to modify the meaning of the word.

Examples:
"genetically modified food" → advmod(modified, genetically)
"less often" → advmod(often, less)


NEGATION_MODIFIER

public static final GrammaticalRelation NEGATION_MODIFIER
The "negation modifier" grammatical relation. The negation modifier is the relation between a negation word and the word it modifies.

Examples:
"Bill is not a scientist" → neg(scientist, not)
"Bill doesn't drive" → neg(drive, n't)


NP_ADVERBIAL_MODIFIER

public static final GrammaticalRelation NP_ADVERBIAL_MODIFIER
The "noun phrase as adverbial modifier" grammatical relation. This relation captures various places where something syntactically a noun phrase is used as an adverbial modifier in a sentence. These usages include: A temporal modifier (tmod) is a subclass of npadvmod which is distinguished as a separate relation.


TEMPORAL_MODIFIER

public static final GrammaticalRelation TEMPORAL_MODIFIER
The "temporal modifier" grammatical relation. A temporal modifier of a VP or an ADJP is any constituent that serves to modify the meaning of the VP or the ADJP by specifying a time; a temporal modifier of a clause is an temporal modifier of the VP which is the predicate of that clause.

Example:
"Last night, I swam in the pool" → tmod(swam, night)


MULTI_WORD_EXPRESSION

public static final GrammaticalRelation MULTI_WORD_EXPRESSION
The "multi-word expression" grammatical relation. This covers various multi-word constructions for which it would seem pointless or arbitrary to claim grammatical relations between words: as well as, rather than, instead of, but also; such as, because of, all but, in addition to ....

Examples:
"dogs as well as cats" → mwe(well, as)
mwe(well, as)

"fewer than 700 bottles" → mwe(than, fewer)


DETERMINER

public static final GrammaticalRelation DETERMINER
The "determiner" grammatical relation.

Examples:
"The man is here" → det(man,the)
"Which man do you prefer?" → det(man,which)


PREDETERMINER

public static final GrammaticalRelation PREDETERMINER
The "predeterminer" grammatical relation.

Example:
"All the boys are here" → predet(boys,all)


PRECONJUNCT

public static final GrammaticalRelation PRECONJUNCT
The "preconjunct" grammatical relation.

Example:
"Both the boys and the girls are here" → preconj(boys,both)


POSSESSION_MODIFIER

public static final GrammaticalRelation POSSESSION_MODIFIER
The "possession" grammatical relation between the possessum and the possessor.

Examples:
"their offices" → poss(offices, their)
"Bill 's clothes" → poss(clothes, Bill)


POSSESSIVE_MODIFIER

public static final GrammaticalRelation POSSESSIVE_MODIFIER
The "possessive" grammatical relation. This is the relation given to 's (or ' with plurals).

Example:
"John's book" → possessive(John, 's)


PREPOSITIONAL_MODIFIER

public static final GrammaticalRelation PREPOSITIONAL_MODIFIER
The "prepositional modifier" grammatical relation. A prepositional modifier of a verb, adjective, or noun is any prepositional phrase that serves to modify the meaning of the verb, adjective, or noun. We also generate prep modifiers of PPs to account for treebank (PP PP PP) constructions (from 1984 through 2002).

Examples:
"I saw a cat in a hat" → prep(cat, in)
"I saw a cat with a telescope" → prep(saw, with)
"He is responsible for meals" → prep(responsible, for)


PHRASAL_VERB_PARTICLE

public static final GrammaticalRelation PHRASAL_VERB_PARTICLE
The "phrasal verb particle" grammatical relation. The "phrasal verb particle" relation identifies phrasal verb.

Example:
"They shut down the station." → prt(shut, down)


PARATAXIS

public static final GrammaticalRelation PARATAXIS
The "parataxis" grammatical relation. Relation between the main verb of a sentence and other sentential elements, such as a sentential parenthetical, a sentence after a ":" or a ";" etc.

Examples:
"The guy, John said, left early in the morning." → parataxis(left,said)
"


SEMANTIC_DEPENDENT

public static final GrammaticalRelation SEMANTIC_DEPENDENT
The "semantic dependent" grammatical relation has been introduced as a supertype for the controlling subject relation.


CONTROLLING_SUBJECT

public static final GrammaticalRelation CONTROLLING_SUBJECT
The "controlling subject" grammatical relation.

A controlling subject is the relation between the head of an xcomp and the external subject of that clause.

Example:
"Tom likes to eat fish" → xsubj(eat, Tom)


AGENT

public static final GrammaticalRelation AGENT
The "agent" grammatical relation. The agent of a passive VP is the complement introduced by "by" and doing the action.

Example:
"The man has been killed by the police" → agent(killed, police)


valuesLock

public static final ReadWriteLock valuesLock
Method Detail

values

public static List<GrammaticalRelation> values()

values

public static List<GrammaticalRelation> values(boolean threadSafe)

valuesLock

public static Lock valuesLock()

getConjs

public static Collection<GrammaticalRelation> getConjs()

getConj

public static GrammaticalRelation getConj(String conjunctionString)
The "conj" grammatical relation. Used to collapse conjunct relations. They will be turned into conj_word, where "word" is a conjunction. NOTE: Because these relations lack associated GrammaticalRelationAnnotations, they cannot be arcs of a TreeGraphNode.

Parameters:
conjunctionString - The conjunction to make a GrammaticalRelation out of
Returns:
A grammatical relation for this conjunction

getPreps

public static Collection<GrammaticalRelation> getPreps()

getPrepsC

public static Collection<GrammaticalRelation> getPrepsC()

getPrep

public static GrammaticalRelation getPrep(String prepositionString)
The "prep" grammatical relation. Used to collapse prepositions.

They will be turned into prep_word, where "word" is a preposition NOTE: Because these relations lack associated GrammaticalRelationAnnotations, they cannot be arcs of a TreeGraphNode.

Parameters:
prepositionString - The preposition to make a GrammaticalRelation out of
Returns:
A grammatical relation for this preposition

getPrepC

public static GrammaticalRelation getPrepC(String prepositionString)
The "prepc" grammatical relation. Used to collapse preposition complements.

They will be turned into prep_word, where "word" is a preposition NOTE: Because these relations lack associated GrammaticalRelationAnnotations, they cannot be arcs of a TreeGraphNode.

Parameters:
prepositionString - The preposition to make a GrammaticalRelation out of
Returns:
A grammatical relation for this preposition

valueOf

public static GrammaticalRelation valueOf(String s)
Returns the EnglishGrammaticalRelation having the given string representation (e.g. "nsubj"), or null if no such is found.

Parameters:
s - The short name of the GrammaticalRelation
Returns:
The EnglishGrammaticalRelation with that name

valueOf

public static GrammaticalRelation valueOf(Object o)
Returns an EnglishGrammaticalRelation based on the argument. It works if passed a GrammaticalRelation or the String representation of one (e.g. "nsubj"). It returns null for other classes or if no string match is found.

Parameters:
o - A GrammaticalRelation or String
Returns:
The EnglishGrammaticalRelation with that name

main

public static void main(String[] args)
Prints out the English grammatical relations hierarchy. See EnglishGrammaticalStructure for a main method that will print the grammatical relations of a sentence or tree.

Parameters:
args - Args are ignored.


Stanford NLP Group