A grammar checker, in
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
terms, is a
program, or part of a program, that attempts to verify written text for
grammatical correctness. Grammar checkers are most often implemented as a feature of a larger program, such as a
word processor A word processor (WP) is a device or computer program that provides for input, editing, formatting, and output of text, often with some additional features.
Early word processors were stand-alone devices dedicated to the function, but current word ...
, but are also available as a stand-alone
application that can be activated from within programs that work with editable text.
The implementation of a grammar checker makes use of
natural language processing
Natural language processing (NLP) is a subfield of computer science and especially artificial intelligence. It is primarily concerned with providing computers with the ability to process data encoded in natural language and is thus closely related ...
.
History
The earliest "grammar checkers" were programs that checked for punctuation and style inconsistencies, rather than a complete range of possible grammatical errors. The first system was called
Writer's Workbench, and was a set of writing tools included with
Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
systems as far back as the 1970s. The whole ''Writer's Workbench'' package included several separate tools to check for various writing problems. The "diction" tool checked for wordy, trite, clichéd or misused phrases in a text. The tool would output a list of questionable phrases, and provide suggestions for improving the writing. The "style" tool analyzed the writing style of a given text. It performed a number of readability tests on the text and output the results, and gave some statistical information about the sentences of the text.
Aspen Software of
Albuquerque, New Mexico
Albuquerque ( ; ), also known as ABQ, Burque, the Duke City, and in the past 'the Q', is the List of municipalities in New Mexico, most populous city in the U.S. state of New Mexico, and the county seat of Bernalillo County, New Mexico, Bernal ...
released the earliest version of a diction and style checker for personal computers, ''
Grammatik'', in 1981. ''Grammatik'' was first available for a
Radio Shack
RadioShack (formerly written as Radio Shack) is an American electronics retailer that was established in 1921 as an amateur radio mail-order business. Its parent company was purchased by Tandy Corporation in 1962, which shifted its focus from ma ...
-
TRS-80
The TRS-80 Micro Computer System (TRS-80, later renamed the Model I to distinguish it from successors) is a desktop microcomputer developed by American company Tandy Corporation and sold through their Radio Shack stores. Launched in 1977, it is ...
, and soon had versions for
CP/M
CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
and the
IBM PC
The IBM Personal Computer (model 5150, commonly known as the IBM PC) is the first microcomputer released in the List of IBM Personal Computer models, IBM PC model line and the basis for the IBM PC compatible ''de facto'' standard. Released on ...
.
Reference Software International of San Francisco, California, acquired ''Grammatik'' in 1985. Development of ''Grammatik'' continued, and it became an actual grammar checker that could detect writing errors beyond simple style checking.
Other early diction and style checking programs included ''Punctuation & Style'', ''Correct Grammar'', ''RightWriter'' and ''PowerEdit''. While all the earliest programs started out as simple diction and style checkers, all eventually added various levels of language processing, and developed some level of true grammar checking capability.
Until 1992, grammar checkers were sold as add-on programs. There were a large number of different word processing programs available at that time, with
WordPerfect
WordPerfect (WP) is a word processing application, now owned by Alludo, with a long history on multiple personal computer platforms. At the height of its popularity in the 1980s and early 1990s, it was the market leader of word processors, disp ...
and
Microsoft Word
Microsoft Word is a word processor program, word processing program developed by Microsoft. It was first released on October 25, 1983, under the name Multi-Tool Word for Xenix systems. Subsequent versions were later written for several other platf ...
the top two in market share. In 1992,
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
decided to add grammar checking as a feature of Word, and licensed CorrecText, a grammar checker from
Houghton Mifflin
The asterisk ( ), from Late Latin , from Ancient Greek , , "little star", is a typographical symbol. It is so called because it resembles a conventional image of a heraldic star.
Computer scientists and mathematicians often vocalize it as ...
that had not yet been marketed as a standalone product. WordPerfect answered Microsoft's move by acquiring Reference Software, and the direct descendant of ''Grammatik'' is still included with WordPerfect.
As of 2019, grammar checkers are built into systems like
Google Docs
Google Docs is an online word processor and part of the free, web-based Google Docs Editors suite offered by Google. Google Docs is accessible via a web browser as a web-based application and is also available as a mobile app on Android and iO ...
and Sapling.ai, browser extensions like
Grammarly
Grammarly is an American English language writing assistant software tool. It reviews the spelling, grammar, and tone of a piece of writing as well as identifying possible instances of plagiarism. It can also suggest style and tonal recommenda ...
and
Qordoba, desktop applications like
Ginger
Ginger (''Zingiber officinale'') is a flowering plant whose rhizome, ginger root or ginger, is widely used as a spice and a folk medicine. It is an herbaceous perennial that grows annual pseudostems (false stems made of the rolled bases of l ...
,
free and open-source
Free and open-source software (FOSS) is software available under a Software license, license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term ...
software like
LanguageTool
LanguageTool is a Free and open-source software, free and open-source grammar checker, grammar, Writing style, style, and spell checker, and all its features are available for download. The LanguageTool website connects to a Proprietary software, ...
, and text editor plugins like those available from WebSpellChecker Software.
Technical issues
The earliest writing style programs checked for wordy,
trite
''Trite'' is a genus of jumping spiders first described by Eugène Simon in 1885. Most of the 18 described species occur in Australia and New Zealand, with several spread over islands of Oceania, one species even reaching Rapa in French Polyne ...
,
cliché
A cliché ( or ; ) is a saying, idea, or element of an artistic work that has become overused to the point of losing its original meaning, novelty, or literal and figurative language, figurative or artistic power, even to the point of now being b ...
d, or misused phrases in a text. This process was based on simple
pattern matching
In computer science, pattern matching is the act of checking a given sequence of tokens for the presence of the constituents of some pattern. In contrast to pattern recognition, the match usually must be exact: "either it will or will not be a ...
. The heart of the program was a list of many hundreds or thousands of phrases that are considered poor writing by many experts. The list of questionable phrases included alternative wording for each phrase. The checking program would simply break text into sentences, check for any matches in the phrase dictionary, flag suspect phrases and show an alternative. These programs could also perform some mechanical checks. For example, they would typically flag doubled words, doubled punctuation, some
capitalization
Capitalization ( North American spelling; also British spelling in Oxford) or capitalisation (Commonwealth English; all other meanings) is writing a word with its first letter as a capital letter (uppercase letter) and the remaining letters in ...
errors, and other simple mechanical mistakes.
True grammar checking is more complex. While a
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
has a very specific syntax and grammar, this is not so for
natural language
A natural language or ordinary language is a language that occurs naturally in a human community by a process of use, repetition, and change. It can take different forms, typically either a spoken language or a sign language. Natural languages ...
s. One can write a somewhat complete
formal grammar
A formal grammar is a set of Terminal and nonterminal symbols, symbols and the Production (computer science), production rules for rewriting some of them into every possible string of a formal language over an Alphabet (formal languages), alphabe ...
for a natural language, but there are usually so many exceptions in real usage that a formal grammar is of minimal help in writing a grammar checker. One of the most important parts of a natural language grammar checker is a
dictionary
A dictionary is a listing of lexemes from the lexicon of one or more specific languages, often arranged Alphabetical order, alphabetically (or by Semitic root, consonantal root for Semitic languages or radical-and-stroke sorting, radical an ...
of all the words in the language, along with the part of speech of each word. The fact that a natural word may be used as any one of several parts of speech (such as "free" being used as an adjective, adverb, noun, or verb) greatly increases the complexity of any grammar checker.
A grammar checker will find each sentence in a text, look up each word in the dictionary, and then attempt to
parse
Parsing, syntax analysis, or syntactic analysis is a process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar by breaking it into parts. The term ''pa ...
the sentence into a form that matches a grammar. Using various rules, the program can then detect various errors, such as agreement in
tense, number,
word order
In linguistics, word order (also known as linear order) is the order of the syntactic constituents of a language. Word order typology studies it from a cross-linguistic perspective, and examines how languages employ different orders. Correlatio ...
, and so on. It is also possible to detect some stylistic problems with the text. For example, some popular style guides such as
The Elements of Style
''The Elements of Style'' (also called ''Strunk & White)'' is a style guide for formal grammar used in American English writing. The first publishing was written by William Strunk Jr. in 1918, and published by Harcourt in 1920, comprising eight ...
deprecate excessive use of the
passive voice
A passive voice construction is a grammatical voice construction that is found in many languages. In a clause with passive voice, the grammatical subject expresses the ''theme'' or ''patient'' of the main verb – that is, the person or thing ...
. Grammar checkers may attempt to identify passive sentences and suggest an active-voice alternative.
The software elements required for grammar checking are closely related to some of the development issues that need to be addressed for
speech recognition
Speech recognition is an interdisciplinary subfield of computer science and computational linguistics that develops methodologies and technologies that enable the recognition and translation of spoken language into text by computers. It is also ...
software. In voice recognition, parsing can be used to help predict which word is most likely intended, based on part of speech and position in the sentence. In grammar checking, the parsing is used to detect words that fail to follow accepted grammar usage.
Recently, research has focused on developing algorithms which can recognize grammar errors based on the
context
In semiotics, linguistics, sociology and anthropology, context refers to those objects or entities which surround a ''focal event'', in these disciplines typically a communicative event, of some kind. Context is "a frame that surrounds the event ...
of the surrounding words.
Criticism
Grammar checkers are considered as a type of
foreign language writing aid
A foreign language writing aid is a computer program or any other instrument that assists a non-native language user (also referred to as a foreign language learner) in writing decently in their target language. Assistive operations can be classifi ...
which non-native speakers can use to proofread their writings as such programs endeavor to identify syntactical errors.
However, as with other computerized writing aids such as
spell checker
In software, a spell checker (or spelling checker or spell check) is a software feature that checks for misspellings in a text. Spell-checking features are often embedded in software or services, such as a word processor, email client, electronic ...
s, popular grammar checkers are often criticized when they fail to spot errors and incorrectly flag correct text as erroneous. The linguist
Geoffrey K. Pullum argued in 2007 that they were generally so inaccurate as to do more harm than good: "for the most part, accepting the advice of a computer grammar checker on your prose will make it much worse, sometimes hilariously incoherent."
See also
*
Spell checker
In software, a spell checker (or spelling checker or spell check) is a software feature that checks for misspellings in a text. Spell-checking features are often embedded in software or services, such as a word processor, email client, electronic ...
*
Link grammar
Link grammar (LG) is a theory of syntax by Davy Temperley and Daniel Sleator which builds relations between pairs of words, rather than constructing constituents in a phrase structure hierarchy. Link grammar is similar to dependency grammar, but ...
References
{{DEFAULTSORT:Grammar Checker
Text editor features
Natural language processing