In
corpus linguistics
Corpus linguistics is the study of language, study of a language as that language is expressed in its text corpus (plural ''corpora''), its body of "real world" text. Corpus linguistics proposes that a reliable analysis of a language is more feas ...
, part-of-speech tagging (POS tagging or PoS tagging or POST), also called
grammatical
In linguistics, grammaticality is determined by the conformity to language usage as derived by the grammar of a particular variety (linguistics), speech variety. The notion of grammaticality rose alongside the theory of generative grammar, the go ...
tagging is the process of marking up a word in a text (corpus) as corresponding to a particular
part of speech, based on both its definition and its
context.
A simplified form of this is commonly taught to school-age children, in the identification of words as
nouns,
verbs,
adjectives,
adverbs, etc.
Once performed by hand, POS tagging is now done in the context of
computational linguistics
Computational linguistics is an Interdisciplinarity, interdisciplinary field concerned with the computational modelling of natural language, as well as the study of appropriate computational approaches to linguistic questions. In general, comput ...
, using
algorithms which associate discrete terms, as well as hidden parts of speech, by a set of descriptive tags. POS-tagging algorithms fall into two distinctive groups: rule-based and stochastic.
E. Brill's tagger, one of the first and most widely used English POS-taggers, employs rule-based algorithms.
Principle
Part-of-speech tagging is harder than just having a list of words and their parts of speech, because some words can represent more than one part of speech at different times, and because some parts of speech are complex. This is not rare—in
natural language
In neuropsychology, linguistics, and philosophy of language, a natural language or ordinary language is any language that has evolved naturally in humans through use and repetition without conscious planning or premeditation. Natural languages ...
s (as opposed to many
artificial languages), a large percentage of word-forms are ambiguous. For example, even "dogs", which is usually thought of as just a plural noun, can also be a verb:
: The sailor dogs the hatch.
Correct grammatical tagging will reflect that "dogs" is here used as a verb, not as the more common plural noun. Grammatical context is one way to determine this;
semantic analysis can also be used to infer that "sailor" and "hatch" implicate "dogs" as 1) in the nautical context and 2) an action applied to the object "hatch" (in this context, "dogs" is a
nautical term meaning "fastens (a watertight door) securely").
Tag sets
Schools commonly teach that there are 9
parts of speech in English:
noun,
verb,
article,
adjective,
preposition
Prepositions and postpositions, together called adpositions (or broadly, in traditional grammar, simply prepositions), are a class of words used to express spatial or temporal relations (''in'', ''under'', ''towards'', ''before'') or mark various ...
,
pronoun,
adverb,
conjunction, and
interjection. However, there are clearly many more categories and sub-categories. For nouns, the plural, possessive, and singular forms can be distinguished. In many languages words are also marked for their "
case
Case or CASE may refer to:
Containers
* Case (goods), a package of related merchandise
* Cartridge case or casing, a firearm cartridge component
* Bookcase, a piece of furniture used to store books
* Briefcase or attaché case, a narrow box to c ...
" (role as subject, object, etc.),
grammatical gender, and so on; while verbs are marked for
tense,
aspect, and other things. In some tagging systems, different
inflections of the same root word will get different parts of speech, resulting in a large number of tags. For example, NN for singular common nouns, NNS for plural common nouns, NP for singular proper nouns (see the
POS tags used in the Brown Corpus). Other tagging systems use a smaller number of tags and ignore fine differences or model them as
features
Feature may refer to:
Computing
* Feature (CAD), could be a hole, pocket, or notch
* Feature (computer vision), could be an edge, corner or blob
* Feature (software design) is an intentional distinguishing characteristic of a software item ...
somewhat independent from part-of-speech.
[Universal POS tags](_blank)
/ref>
In part-of-speech tagging by computer, it is typical to distinguish from 50 to 150 separate parts of speech for English. Work on stochastic
Stochastic (, ) refers to the property of being well described by a random probability distribution. Although stochasticity and randomness are distinct in that the former refers to a modeling approach and the latter refers to phenomena themselv ...
methods for tagging Koine Greek (DeRose 1990) has used over 1,000 parts of speech and found that about as many words were ambiguous
Ambiguity is the type of meaning (linguistics), meaning in which a phrase, statement or resolution is not explicitly defined, making several interpretations wikt:plausible#Adjective, plausible. A common aspect of ambiguity is uncertainty. It ...
in that language as in English. A morphosyntactic descriptor in the case of morphologically rich languages is commonly expressed using very short mnemonics, such as ''Ncmsan'' for Category=Noun, Type = common, Gender = masculine, Number = singular, Case = accusative, Animate = no.
The most popular "tag set" for POS tagging for American English is probably the Penn tag set, developed in the Penn Treebank project. It is largely similar to the earlier Brown Corpus and LOB Corpus tag sets, though much smaller. In Europe, tag sets from the Eagles Guidelines
Linguistic categories include
* Lexical category, a part of speech such as ''noun'', ''preposition'', etc.
* Syntactic category, a similar concept which can also include phrasal categories
* Grammatical category, a grammatical feature such as ''te ...
see wide use and include versions for multiple languages.
POS tagging work has been done in a variety of languages, and the set of POS tags used varies greatly with language. Tags usually are designed to include overt morphological distinctions, although this leads to inconsistencies such as case-marking for pronouns but not nouns in English, and much larger cross-language differences. The tag sets for heavily inflected languages such as Greek and Latin can be very large; tagging ''words'' in agglutinative languages such as Inuit languages may be virtually impossible. At the other extreme, Petrov et al. have proposed a "universal" tag set, with 12 categories (for example, no subtypes of nouns, verbs, punctuation, and so on). Whether a very small set of very broad tags or a much larger set of more precise ones is preferable, depends on the purpose at hand. Automatic tagging is easier on smaller tag-sets.
History
The Brown Corpus
Research on part-of-speech tagging has been closely tied to corpus linguistics
Corpus linguistics is the study of language, study of a language as that language is expressed in its text corpus (plural ''corpora''), its body of "real world" text. Corpus linguistics proposes that a reliable analysis of a language is more feas ...
. The first major corpus of English for computer analysis was the Brown Corpus developed at Brown University
Brown University is a private research university in Providence, Rhode Island. Brown is the seventh-oldest institution of higher education in the United States, founded in 1764 as the College in the English Colony of Rhode Island and Providenc ...
by Henry Kučera and W. Nelson Francis
W. Nelson Francis (October 23, 1910 – June 14, 2002) was an American author, linguist, and university professor. He served as a member of the faculties of Franklin & Marshall College and Brown University, where he specialized in Engl ...
, in the mid-1960s. It consists of about 1,000,000 words of running English prose text, made up of 500 samples from randomly chosen publications. Each sample is 2,000 or more words (ending at the first sentence-end after 2,000 words, so that the corpus contains only complete sentences).
The Brown Corpus was painstakingly "tagged" with part-of-speech markers over many years. A first approximation was done with a program by Greene and Rubin, which consisted of a huge handmade list of what categories could co-occur at all. For example, article then noun can occur, but article then verb (arguably) cannot. The program got about 70% correct. Its results were repeatedly reviewed and corrected by hand, and later users sent in errata so that by the late 70s the tagging was nearly perfect (allowing for some cases on which even human speakers might not agree).
This corpus has been used for innumerable studies of word-frequency and of part-of-speech and inspired the development of similar "tagged" corpora in many other languages. Statistics derived by analyzing it formed the basis for most later part-of-speech tagging systems, such as CLAWS (linguistics) and VOLSUNGA. However, by this time (2005) it has been superseded by larger corpora such as the 100 million word British National Corpus, even though larger corpora are rarely so thoroughly curated.
For some time, part-of-speech tagging was considered an inseparable part of natural language processing
Natural language processing (NLP) is an interdisciplinary subfield of linguistics, computer science, and artificial intelligence concerned with the interactions between computers and human language, in particular how to program computers to pro ...
, because there are certain cases where the correct part of speech cannot be decided without understanding the semantics or even the pragmatics of the context. This is extremely expensive, especially because analyzing the higher levels is much harder when multiple part-of-speech possibilities must be considered for each word.
Use of hidden Markov models
In the mid-1980s, researchers in Europe began to use hidden Markov models (HMMs) to disambiguate parts of speech, when working to tag the Lancaster-Oslo-Bergen Corpus
The Lancaster-Oslo/Bergen (LOB) Corpus is a million-word collection of British English texts which was compiled in the 1970s in collaboration between the University of Lancaster, the University of Oslo, and the Norwegian Computing Centre for the ...
of British English. HMMs involve counting cases (such as from the Brown Corpus) and making a table of the probabilities of certain sequences. For example, once you've seen an article such as 'the', perhaps the next word is a noun 40% of the time, an adjective 40%, and a number 20%. Knowing this, a program can decide that "can" in "the can" is far more likely to be a noun than a verb or a modal. The same method can, of course, be used to benefit from knowledge about the following words.
More advanced ("higher-order") HMMs learn the probabilities not only of pairs but triples or even larger sequences. So, for example, if you've just seen a noun followed by a verb, the next item may be very likely a preposition, article, or noun, but much less likely another verb.
When several ambiguous words occur together, the possibilities multiply. However, it is easy to enumerate every combination and to assign a relative probability to each one, by multiplying together the probabilities of each choice in turn. The combination with the highest probability is then chosen. The European group developed CLAWS, a tagging program that did exactly this and achieved accuracy in the 93–95% range.
It is worth remembering, as Eugene Charniak points out in ''Statistical techniques for natural language parsing'' (1997), that merely assigning the most common tag to each known word and the tag " proper noun" to all unknowns will approach 90% accuracy because many words are unambiguous, and many others only rarely represent their less-common parts of speech.
CLAWS pioneered the field of HMM-based part of speech tagging but was quite expensive since it enumerated all possibilities. It sometimes had to resort to backup methods when there were simply too many options (the Brown Corpus contains a case with 17 ambiguous words in a row, and there are words such as "still" that can represent as many as 7 distinct parts of speech (DeRose 1990, p. 82)).
HMMs underlie the functioning of stochastic taggers and are used in various algorithms one of the most widely used being the bi-directional inference algorithm.
Dynamic programming methods
In 1987, Steven DeRose
Stephen or Steven is a common English first name. It is particularly significant to Christians, as it belonged to Saint Stephen ( grc-gre, Στέφανος ), an early disciple and deacon who, according to the Book of Acts, was stoned to death; h ...
and Ken Church independently developed dynamic programming algorithms to solve the same problem in vastly less time. Their methods were similar to the Viterbi algorithm known for some time in other fields. DeRose used a table of pairs, while Church used a table of triples and a method of estimating the values for triples that were rare or nonexistent in the Brown Corpus (an actual measurement of triple probabilities would require a much larger corpus). Both methods achieved an accuracy of over 95%. DeRose's 1990 dissertation at Brown University
Brown University is a private research university in Providence, Rhode Island. Brown is the seventh-oldest institution of higher education in the United States, founded in 1764 as the College in the English Colony of Rhode Island and Providenc ...
included analyses of the specific error types, probabilities, and other related data, and replicated his work for Greek, where it proved similarly effective.
These findings were surprisingly disruptive to the field of natural language processing. The accuracy reported was higher than the typical accuracy of very sophisticated algorithms that integrated part of speech choice with many higher levels of linguistic analysis: syntax, morphology, semantics, and so on. CLAWS, DeRose's and Church's methods did fail for some of the known cases where semantics is required, but those proved negligibly rare. This convinced many in the field that part-of-speech tagging could usefully be separated from the other levels of processing; this, in turn, simplified the theory and practice of computerized language analysis and encouraged researchers to find ways to separate other pieces as well. Markov Models became the standard method for the part-of-speech assignment.
Unsupervised taggers
The methods already discussed involve working from a pre-existing corpus to learn tag probabilities. It is, however, also possible to bootstrap using "unsupervised" tagging. Unsupervised tagging techniques use an untagged corpus for their training data and produce the tagset by induction. That is, they observe patterns in word use, and derive part-of-speech categories themselves. For example, statistics readily reveal that "the", "a", and "an" occur in similar contexts, while "eat" occurs in very different ones. With sufficient iteration, similarity classes of words emerge that are remarkably similar to those human linguists would expect; and the differences themselves sometimes suggest valuable new insights.
These two categories can be further subdivided into rule-based, stochastic, and neural approaches.
Other taggers and methods
Some current major algorithms for part-of-speech tagging include the Viterbi algorithm, Brill tagger The Brill tagger is an inductive method for part-of-speech tagging. It was described and invented by Eric Brill in his 1993 PhD thesis. It can be summarized as an "error-driven transformation-based tagger". It is:
* a form of supervised learning, w ...
, Constraint Grammar, and the Baum-Welch algorithm (also known as the forward-backward algorithm). Hidden Markov model and visible Markov model taggers can both be implemented using the Viterbi algorithm. The rule-based Brill tagger is unusual in that it learns a set of rule patterns, and then applies those patterns rather than optimizing a statistical quantity. Unlike the Brill tagger where the rules are ordered sequentially, the POS and morphological tagging toolki
RDRPOSTagger
stores rule in the form of a ripple-down rules
Ripple-down rules (RDR) are a way of approaching knowledge acquisition. Knowledge acquisition refers to the transfer of knowledge from human experts to knowledge-based systems.
Introductory material
Ripple-down rules are an incremental approac ...
tree.
Many machine learning methods have also been applied to the problem of POS tagging. Methods such as SVM, maximum entropy classifier
In statistics, multinomial logistic regression is a classification method that generalizes logistic regression to multiclass problems, i.e. with more than two possible discrete outcomes. That is, it is a model that is used to predict the prob ...
, perceptron, and nearest-neighbor have all been tried, and most can achieve accuracy above 95%.
A direct comparison of several methods is reported (with references) at the ACL Wiki. This comparison uses the Penn tag set on some of the Penn Treebank data, so the results are directly comparable. However, many significant taggers are not included (perhaps because of the labor involved in reconfiguring them for this particular dataset). Thus, it should not be assumed that the results reported here are the best that can be achieved with a given approach; nor even the best that ''have'' been achieved with a given approach.
In 2014, a paper reporting using the structure regularization method
A structure is an arrangement and organization of interrelated elements in a material object or system, or the object or system so organized. Material structures include man-made objects such as buildings and machines and natural objects such as ...
for part-of-speech tagging, achieving 97.36% on a standard benchmark dataset.
Issues
While there is broad agreement about basic categories, several edge cases make it difficult to settle on a single "correct" set of tags, even in a particular language such as (say) English. For example, it is hard to say whether "fire" is an adjective or a noun in
the big green fire truck
A second important example is the use/mention distinction, as in the following example, where "blue" could be replaced by a word from any POS (the Brown Corpus tag set appends the suffix "-NC" in such cases):
the word "blue" has 4 letters.
Words in a language other than that of the "main" text are commonly tagged as "foreign". In the Brown Corpus this tag (-FW) is applied in addition to a tag for the role the foreign word is playing in context; some other corpora merely tag such cases as "foreign", which is slightly easier but much less useful for later syntactic analysis.
There are also many cases where POS categories and "words" do not map one to one, for example:
as far as
David's
gonna
don't
vice versa
first-cut
cannot
and/or
pre- and post-secondary
look (a word) up
In the last example, "look" and "up" combine to function as a single verbal unit, despite the possibility of other words coming between them. Some tag sets (such as Penn) break hyphenated words, contractions, and possessives into separate tokens, thus avoiding some but far from all such problems.
Many tag sets treat words such as "be", "have", and "do" as categories in their own right (as in the Brown Corpus), while a few treat them all as simply verbs (for example, the LOB Corpus and the Penn Treebank). These particular words have more forms than other English verbs, and occur in quite distinct grammatical contexts. As a POS tagger is being trained, collapsing them all into a single category "verb", makes it much harder to make use of those distinctions; depending on the particular methods being used, this can be a serious problem. For example, an HMM-based tagger, would only learn the overall probabilities for how "verbs" occur near other parts of speech, rather than learning distinct co-occurrence probabilities for "do", "have", "be", and other verbs. These English words have quite different distributions: one cannot just substitute other verbs into the same places where they occur; English grammar uses "have been singing" and other constructions using these special "verbs", but not free sequences of verbs in general. With distinct tags, an HMM can often predict the correct finer-grained tag, rather than being equally content with any "verb" in any slot. Similarly, with neural network approaches the weights for short-range collocations may conflate very different cases, making it harder to achieve comparable results (the information has to be discovered and encoded at other levels).
Some have argued that this benefit is moot because a program can merely check the spelling: "this 'verb' is a 'do' because of the spelling". However, this fails for erroneous spellings even though they can often be tagged accurately by HMMs.
See also
* Semantic net
* Sliding window based part-of-speech tagging
* Trigram tagger
* Word sense disambiguation
References
*Charniak, Eugene. 1997.
Statistical Techniques for Natural Language Parsing
. ''AI Magazine'' 18(4):33–44.
*Hans van Halteren, Jakub Zavrel, Walter Daelemans
Walter Daelemans (born June 3, 1960) is professor in computational linguistics at the University of Antwerp. He is also a research director of the Computational Linguistics and Psycholinguistics Research Center (CLiPS).
Daelemans holds a Ph.D. f ...
. 2001. Improving Accuracy in NLP Through Combination of Machine Learning Systems. ''Computational Linguistics''. 27(2): 199–229
PDF
*DeRose, Steven J. 1990. "Stochastic Methods for Resolution of Grammatical Category Ambiguity in Inflected and Uninflected Languages." Ph.D. Dissertation. Providence, RI: Brown University Department of Cognitive and Linguistic Sciences. Electronic Edition available a
* D.Q. Nguyen, D.Q. Nguyen, D.D. Pham and S.B. Pham (2016). "A Robust Transformation-Based Learning Approach Using Ripple Down Rules for Part-Of-Speech Tagging." ''AI Communications'', vol. 29, no. 3, pages 409–422
[.pdf]
{{Natural Language Processing
Corpus linguistics
Tasks of natural language processing
Markov models
Word-sense disambiguation