Key Word in Context
Key Word In Context (KWIC) is the most common format for concordance lines. The term KWIC was first coined by Hans Peter Luhn. The system was based on a concept called keyword in titles which was first proposed for Manchester libraries in 1864 by Andrea Crestadoro.
A KWIC index is formed by sorting and aligning the words within an article title to allow each word (except the stop words) in titles to be searchable alphabetically in the index. It was a useful indexing method for technical manuals before computerized full text search became common.
For example, a search query including all of the words in an example definition ("KWIC is an acronym for Key Word In Context, the most common format for concordance lines") and the Wikipedia slogan in English ("the free encyclopedia"), searched against a Wikipedia page, might yield a KWIC index as follows. A KWIC index usually uses a wide layout to allow the display of maximum 'in context' information (not shown in the following example).
|KWIC is an||acronym for Key Word In Context, ...||page 1|
|... Key Word In Context, the most||common format for concordance lines.||page 1|
|... the most common format for||concordance lines.||page 1|
|... is an acronym for Key Word In||Context, the most common format ...||page 1|
|Wikipedia, The Free||Encyclopedia||page 0|
|... In Context, the most common||format for concordance lines.||page 1|
|Wikipedia, The||Free Encyclopedia||page 0|
|KWIC is an acronym for||Key Word In Context, the most ...||page 1|
|KWIC is an acronym for Key Word ...||page 1|
|... common format for concordance||lines.||page 1|
|... for Key Word In Context, the||most common format for concordance ...||page 1|
|Wikipedia, The Free Encyclopedia||page 0|
|KWIC is an acronym for Key||Word In Context, the most common ...||page 1|
A KWIC index is a special case of a permuted index. This term refers to the fact that it indexes all cyclic permutations of the headings. Books composed of many short sections with their own descriptive headings, most notably collections of manual pages, often ended with a permuted index section, allowing the reader to easily find a section by any word from its heading. This practice, also known as Key Word Out of Context (KWOC), is no longer common.
References in literature
Note: The first reference does not show the KWIC index unless you pay to view the paper. The second reference does not even list the paper at all.
- David L. Parnas uses a KWIC Index as an example on how to perform modular design in his paper On the Criteria To Be Used in Decomposing Systems into Modules, available as an ACM Classic Paper
- Christopher D. Manning and Hinrich Schütze describe a KWIC index and computer concordancing in section 1.4.5 of their book Foundations of Statistical Natural Language Processing. Cambridge, Mass: MIT Press, 1999. ISBN 9780262133609. They cite an article from H.P. Luhn from 1960, "Key word-in-context index for technical literature (kwic index)".
- According to Rev. Gerard O'Connor's Concordantia et Indices Missalium Romanorum, "Most of the concordances produced in recent times and with the aid of computer software use both the KWIC (keyword in context) and KWICn (keyword in center) formats, which lists the keyword, usually highlighted in bold text in a consistent position, within a limited amount of context text, i.e. three [or] four words of the text prior to the keyword and the same amount of text following. This format is extremely useful in that the keyword is easily identified together with its context. ... The Concordance of the Roman Missal is produced in both the KWIC and KWICn formats and is noteworthy in that each word form is listed as it appears in the text, that is, it is un-lemmatized."
- ptx, a Unix command-line utility producing a permuted index
- Concordance (publishing)
- Burrows–Wheeler transform
- Hans Peter Luhn
- Suffix tree
- Manning, C. D., Schütze, H.: "Foundations of Statistical Natural Language Processing", p. 35. The MIT Press, 1999
- "Advanced Indexing and Abstracting Practies". Atlantic Publishers & Distri. Retrieved 26 March 2019 – via Google Books.
- "Archived copy". Archived from the original on 2016-06-06. Retrieved 2016-06-17.CS1 maint: archived copy as title (link)
- "Outreach Guide". Friday, May 8, 2020
- "3. Theory of KWIC indexing". Infohost.nmt.edu. Retrieved 26 March 2019.