In corpus linguistics a key word is a word which occurs in a text more often than we would expect to occur by chance alone. Key words are calculated by carrying out a statistical test (e.g., loglinear or chi-squared) which compares the word frequencies in a text against their expected frequencies derived in a much larger corpus, which acts as a reference for general language use. Keyness is then the quality a word or phrase has of being "key" in its context. Combinations of nouns with parts of speech that human readers would not likely notice, such as prepositions, time adverbs, and pronouns can be a relevant part of keyness. Even separate pronouns can constitute keywords.
Compare this with collocation, the quality linking two words or phrases usually assumed to be within a given span of each other. Keyness is a textual feature, not a language feature (so a word has keyness in a certain textual context but may well not have keyness in other contexts, whereas a node and collocate are often found together in texts of the same genre so collocation is to a considerable extent a language phenomenon). The set of keywords found in a given text share keyness, they are co-key. Words typically found in the same texts as a key word are called associates.
In politics, sociology and critical discourse analysis, the key reference for keywords was Raymond Williams (1976), but Williams was resolutely Marxist, and Critical Discourse Analysis has tended to perpetuate this political meaning of the term: keywords are part of ideologies and studying them is part of social criticism. Cultural studies has tended to develop along similar lines. This stands in stark contrast to present day linguistics which is wary of political analysis, and has tended to aspire to non-political objectivity. The development of technology, new techniques and methodology relating to massive corpora have all consolidated this trend.
There are, however, numerous political dimensions that come into play when keywords are studied in relation to cultures, societies and their histories. The Lublin Ethnolinguistics School studies Polish and European keywords in this fashion. Anna Wierzbicka (1997), probably the best known cultural linguist writing in English today, studies languages as parts of cultures evolving in society and history. And it becomes impossible to ignore politics when keywords migrate from one culture to another. Underhill and Gianninoto demonstrate the way political terms like, "citizen" and "individual" are integrated into the Chinese worldview over the course of the 19th and 20th century. They argue that this is part of a complex readjustment of conceptual clusters related to "the people". Keywords like "citizen" generate various translations in Chinese, and are part of an ongoing adaptation to global concepts of individual rights and responsibilities. Understanding keywords in this light becomes crucial for understanding how the politics of China evolves as Communism emerges and as the free market and citizens' rights develop. Underhill and Gianninoto argue that this is part of the complex ways ideological worldviews interact with the language as an ongoing means of perceiving and understanding the world.
Barbara Cassin studies keywords in a more traditional manner, striving to define the words specific to individual cultures, in order to demonstrate that many of our keywords are partially "untranslatable" into their "equivalents. The Greeks may need four words to cover all the meanings English-speakers have in mind when speaking of "love". Similarly, the French find that "liberté" suffices, while English-speakers attribute different associations to "liberty" and "freedom": "freedom of speech" or "freedom of movement", but "the Statue of Liberty".
Keywords are identified by software that compares a word-list of the text with a word-list based on a larger reference corpus. Software such as e.g. WordSmith, lists keywords and phrases and allows plotting their occurrence as they appear in texts.