natural language processing this article is about language processing by computers for the processing of language by the human brain see language processing in the brain an automated online assistant providing customer service on a web page an example of an application where natural language processing is a major component natural language processing nlp is a subfield of computer science information engineering and artificial intelligence concerned with the interactions between computers and human natural languages in particular how to program computers to process and analyze large amounts of natural language data challenges in natural language processing frequently involve speech recognition natural language understanding and natural language generation history the history of natural language processing generally started in the 1950s although work can be found from earlier periods in 1950 alan turing published an article titled intelligence which proposed what is now called the turing test as a criterion of intelligence the georgetown experiment in 1954 involved fully automatic translation of more than sixty russian sentences into english the authors claimed that within three or five years machine translation would be a solved problem however real progress was much slower and after the alpac report in 1966 which found that tenyearlong research had failed to fulfill the expectations funding for machine translation was dramatically reduced little further research in machine translation was conducted until the late 1980s when the first statistical machine translation systems were developed some notably successful natural language processing systems developed in the 1960s were shrdlu a natural language system working in restricted blocks worlds with restricted vocabularies and eliza a simulation of a rogerian psychotherapist written by joseph weizenbaum between 1964 and 1966 using almost no information about human thought or emotion eliza sometimes provided a startlingly humanlike interaction when the patient exceeded the very small knowledge base eliza might provide a generic response for example responding to my head hurts with why do you say your head hurts during the 1970s many programmers began to write conceptual ontologies which structured realworld information into computerunderstandable data examples are margie schank 1975 sam cullingford 1978 pam wilensky 1978 talespin meehan 1976 qualm lehnert 1977 politics carbonell 1979 and plot units lehnert 1981 during this time many chatterbots were written including parry racter and jabberwacky up to the 1980s most natural language processing systems were based on complex sets of handwritten rules starting in the late 1980s however there was a revolution in natural language processing with the introduction of machine learning algorithms for language processing this was due to both the steady increase in computational power see moores law and the gradual lessening of the dominance of chomskyan theories of linguistics eg transformational grammar whose theoretical underpinnings discouraged the sort of corpus linguistics that underlies the machinelearning approach to language processing some of the earliestused machine learning algorithms such as decision trees produced systems of hard ifthen rules similar to existing handwritten rules however partofspeech tagging introduced the use of hidden markov models to natural language processing and increasingly research has focused on statistical models which make soft probabilistic decisions based on attaching realvalued weights to the features making up the input data the cache language models upon which many speech recognition systems now rely are examples of such statistical models such models are generally more robust when given unfamiliar input especially input that contains errors as is very common for realworld data and produce more reliable results when integrated into a larger system comprising multiple subtasks many of the notable early successes occurred in the field of machine translation due especially to work at ibm research where successively more complicated statistical models were developed these systems were able to take advantage of existing multilingual textual corpora that had been produced by the parliament of canada and the european union as a result of laws calling for the translation of all governmental proceedings into all official languages of the corresponding systems of government however most other systems depended on corpora specifically developed for the tasks implemented by these systems which was and often continues to be a major limitation in the success of these systems as a result a great deal of research has gone into methods of more effectively learning from limited amounts of data recent research has increasingly focused on unsupervised and semisupervised learning algorithms such algorithms are able to learn from data that has not been handannotated with the desired answers or using a combination of annotated and nonannotated data generally this task is much more difficult than supervised learning and typically produces less accurate results for a given amount of input data however there is an enormous amount of nonannotated data available including among other things the entire content of the world wide web which can often make up for the inferior results if the algorithm used has a low enough time complexity to be practical in the 2010s representation learning and deep neural networkstyle machine learning methods became widespread in natural language processing due in part to a flurry of results showing that such techniques parsing and many others popular techniques include the use of word embeddings to capture semantic properties of words and an increase in endtoend learning of a higherlevel task eg question answering instead of relying on a pipeline of separate intermediate tasks eg partofspeech tagging and dependency parsing in some areas this shift has entailed substantial changes in how nlp systems are designed such that deep neural networkbased approaches may be viewed as a new paradigm distinct from statistical natural language processing for instance the term neural machine translation nmt emphasizes the fact that deep learningbased approaches to machine translation directly learn sequencetosequence transformations obviating the need for intermediate steps such as word alignment and language modeling that were used in statistical machine translation smt rulebased vs statistical nlp in the early days many languageprocessing systems were designed by handcoding a set of rules eg by writing grammars or devising heuristic rules for stemming however this is rarely robust to natural language variation since the socalled statistical revolution in the late 1980s and mid 1990s much natural language processing research has relied heavily on machine learning the machinelearning paradigm calls instead for using statistical inference to automatically learn such rules through the analysis of large corpora of typical realworld examples a corpus plural corpora is a set of documents possibly with human or computer annotations many different classes of machinelearning algorithms have been applied to naturallanguageprocessing tasks these algorithms take as input a large set of features that are generated from the input data some of the earliestused algorithms such as decision trees produced systems of hard ifthen rules similar to the systems of handwritten rules that were then common increasingly however research has focused on statistical models which make soft probabilistic decisions based on attaching realvalued weights to each input feature such models have the advantage that they can express the relative certainty of many different possible answers rather than only one producing more reliable results when such a model is included as a component of a larger system systems based on machinelearning algorithms have many advantages over handproduced rules the learning procedures used during machine learning automatically focus on the most common cases whereas when writing rules by hand it is often not at all obvious where the effort should be directed automatic learning procedures can make use of statisticalinference algorithms to produce models that are robust to unfamiliar input eg containing words or structures that have not been seen before and to erroneous input eg with misspelled words or words accidentally omitted generally handling such input gracefully with handwritten rulesor more generally creating systems of handwritten rules that make soft decisionsis extremely difficult errorprone and timeconsuming systems based on automatically learning the rules can be made more accurate simply by supplying more input data however systems based on handwritten rules can only be made more accurate by increasing the complexity of the rules which is a much more difficult task in particular there is a limit to the complexity of systems based on handcrafted rules beyond which the systems become more and more unmanageable however creating more data to input to machinelearning systems simply requires a corresponding increase in the number of manhours worked generally without significant increases in the complexity of the annotation process major evaluations and tasks the following is a list of some of the most commonly researched tasks in natural language processing note that some of these tasks have direct realworld applications while others more commonly serve as subtasks that are used to aid in solving larger tasks though natural language processing tasks are closely intertwined they are frequently subdivided into categories for convenience a coarse division is given below syntax grammar induction generate a formal grammar that describes a languages syntax lemmatization morphological segmentation separate words into individual morphemes and identify the class of the morphemes the difficulty of this task depends greatly on the complexity of the morphology ie the structure of words of the language being considered english has fairly simple morphology especially inflectional morphology and thus it is often possible to ignore this task entirely and simply model all possible forms of a word eg open opens opened opening as separate words in languages such as turkish or meitei a highly agglutinated indian language however such an approach is not possible as each dictionary entry has thousands of possible word forms partofspeech tagging given a sentence determine the part of speech for each word many words especially common ones can serve as multiple parts of speech for example book can be a noun the book on the table or verb to book a flight set can be a noun verb or adjective and out can be any of at least five different parts of speech some languages have more such ambiguity than others languages with little inflectional morphology such as english are particularly prone to such ambiguity chinese is prone to such ambiguity because it is a tonal language during verbalization such inflection is not readily conveyed via the entities employed within the orthography to convey intended meaning parsing see also stochastic grammar determine the parse tree grammatical analysis of a given sentence the grammar for natural languages is ambiguous and typical sentences have multiple possible analyses in fact perhaps surprisingly for a typical sentence there may be thousands of potential parses most of which will seem completely nonsensical to a human there are two primary types of parsing dependency parsing and constituency parsing dependency parsing focuses on the relationships between words in a sentence marking things like primary objects and predicates whereas constituency parsing focuses on building out the parse tree using a probabilistic contextfree grammar pcfg sentence breaking also known as sentence boundary disambiguation given a chunk of text find the sentence boundaries sentence boundaries are often marked by periods or other punctuation marks but these same characters can serve other purposes eg marking abbreviations stemming word segmentation separate a chunk of continuous text into separate words for a language like english this is fairly trivial since words are usually separated by spaces however some written languages like chinese japanese and thai do not mark word boundaries in such a fashion and in those languages text segmentation is a significant task requiring knowledge of the vocabulary and morphology of words in the language sometimes this process is also used in cases like bag of words bow creation in data mining terminology extraction the goal of terminology extraction is to automatically extract relevant terms from a given corpus semantics lexical semantics what is the computational meaning of individual words in context machine translation automatically translate text from one human language to another this is one of the most difficult problems and is a member of a class of problems colloquially termed aicomplete ie requiring all of the different types of knowledge that humans possess grammar semantics facts about the real world etc in order to solve properly named entity recognition ner given a stream of text determine which items in the text map to proper names such as people or places and what the type of each such name is eg person location organization note that although capitalization can aid in recognizing named entities in languages such as english this information cannot aid in determining the type of named entity and in any case is often inaccurate or insufficient for example the first word of a sentence is also capitalized and named entities often span several words only some of which are capitalized furthermore many other languages in nonwestern scripts eg chinese or arabic do not have any capitalization at all and even languages with capitalization may not consistently use it to distinguish names for example german capitalizes all nouns regardless of whether they are names and french and spanish do not capitalize names that serve as adjectives natural language generation convert information from computer databases or semantic intents into readable human language natural language understanding convert chunks of text into more formal representations such as firstorder logic structures that are easier for computer programs to manipulate natural language understanding involves the identification of the intended semantic from the multiple possible semantics which can be derived from a natural language expression which usually takes the form of organized notations of natural language concepts introduction and creation of language metamodel and ontology are efficient however empirical solutions an explicit formalization of natural language semantics without confusions with implicit assumptions such as closedworld assumption cwa vs openworld assumption or subjective yesno vs objective truefalse is expected for the construction of a basis of semantics formalization optical character recognition ocr given an image representing printed text determine the corresponding text question answering given a humanlanguage question determine its answer typical questions have a specific right answer such as what is the capital of canada but sometimes openended questions are also considered such as what is the meaning of life recent works have looked at even more complex questions recognizing textual entailment given two text fragments determine if one being true entails the other entails the others negation or allows the other to be either true or false relationship extraction given a chunk of text identify the relationships among named entities eg who is married to whom sentiment analysis see also multimodal sentiment analysis extract subjective information usually from a set of documents often using online reviews to determine polarity about specific objects it is especially useful for identifying trends of public opinion in the social media for the purpose of marketing topic segmentation and recognition given a chunk of text separate it into segments each of which is devoted to a topic and identify the topic of the segment word sense disambiguation many words have more than one meaning we have to select the meaning which makes the most sense in context for this problem we are typically given a list of words and associated word senses eg from a dictionary or from an online resource such as wordnet discourse automatic summarization produce a readable summary of a chunk of text often used to provide summaries of text of a known type such as articles in the financial section of a newspaper coreference resolution given a sentence or larger chunk of text determine which words mentions refer to the same objects entities anaphora resolution is a specific example of this task and is specifically concerned with matching up pronouns with the nouns or names to which they refer the more general task of coreference resolution also includes identifying socalled bridging relationships involving referring expressions for example in a sentence such as he entered johns house through the front door the front door is a referring expression and the bridging relationship to be identified is the fact that the door being referred to is the front door of johns house rather than of some other structure that might also be referred to discourse analysis this rubric includes a number of related tasks one task is identifying the discourse structure of connected text ie the nature of the discourse relationships between sentences eg elaboration explanation contrast another possible task is recognizing and classifying the speech acts in a chunk of text eg yesno question content question statement assertion etc speech speech recognition given a sound clip of a person or people speaking determine the textual representation of the speech this is the opposite of text to speech and is one of the extremely difficult problems colloquially termed aicomplete see above in natural speech there are hardly any pauses between successive words and thus speech segmentation is a necessary subtask of speech recognition see below note also that in most spoken languages the sounds representing successive letters blend into each other in a process termed coarticulation so the conversion of the analog signal to discrete characters can be a very difficult process speech segmentation given a sound clip of a person or people speaking separate it into words a subtask of speech recognition and typically grouped with it texttospeech given a text transform those units and produce a spoken representation texttospeech can be used to aid the visually impaired automated essay scoring biomedical text mining compound term processing computational linguistics computerassisted reviewing controlled natural language deep learning deep linguistic processing foreign language reading aid foreign language writing aid information extraction information retrieval language technology latent dirichlet allocation lda latent semantic indexing list of natural language processing toolkits nativelanguage identification natural language programming natural language search query expansion reification linguistics semantic folding speech processing spoken dialogue system textproofing text simplification thought vector truecasing question answering word2vec bates m 1995 models of natural language understanding proceedings of the national academy of sciences of the united states of america 92 22 99779982 doi101073pnas92229977 pmc40721 steven bird ewan klein and edward loper 2009 natural language processing with python oreilly media isbn9780596516499 daniel jurafsky and james h martin 2008 speech and language processing 2nd edition pearson prentice hall isbn9780131873216 mohamed zakaria kurdi 2016 natural language processing and computational linguistics speech morphology and syntax volume 1 istewiley isbn9781848218482 mohamed zakaria kurdi 2017 natural language processing and computational linguistics semantics discourse and applications volume 2 istewiley isbn9781848219212 christopher d manning prabhakar raghavan and hinrich schtze 2008 introduction to information retrieval cambridge university press isbn9780521865715 official html and pdf versions available without charge christopher d manning and hinrich schtze 1999 foundations of statistical natural language processing the mit press isbn9780262133609 david m w powers and christopher c r turk 1989 machine learning of natural language springerverlag isbn9780387195575 wikimedia commons has media related to natural language processing vtenatural language processinggeneral terms natural language understanding text corpus speech corpus stopwords bagofwords aicomplete ngram bigram trigram text analysis text segmentation partofspeech tagging text chunking compound term processing collocation extraction stemming lemmatisation namedentity recognition coreference resolution sentiment analysis concept mining parsing wordsense disambiguation ontology learning terminology extraction truecasing automatic summarization multidocument summarization sentence extraction text simplification machine translation computerassisted examplebased rulebased automatic identificationand data capture speech recognition speech synthesis optical character recognition natural language generation topic model pachinko allocation latent dirichlet allocation latent semantic analysis computerassistedreviewing automated essay scoring concordancer grammar checker predictive text spell checker syntax guessing natural languageuser interface automated online assistant chatbot interactive fiction question answering voice user interface authority control lccn sh88002425 ndl 00562347 