In software development, a dictionary is somewhat similiar to the books which you use to look up the meaning of words. In a physical book dictionary, you look for information indexed on the word that you want to know more about. In a program's dictionary, you are storing and retrieving information keyed on a word (or other short sequence of letters, numbers, etc), such as in a lookup of CGI variables, or in organizing a hash table.

Dictionary is the term that Python uses for the data structure known elsewhere as an associative array or hash.

A dictionary is similar to an array, and the syntax for using dictionaries is similar to that for arrays. There are two basic differences between an array and a dictionary:

  1. The keys of an array are whole numbers, whereas the keys of a dictionary may be of any immutable type -- most commonly strings, but floats, complex numbers, tuples, or even types are possible.
  2. The entries of a dictionary are not ordered. That is to say, there is no first (or zeroth) entry, and there is no succession from a given entry to a next entry. To iterate over the entries, one must use a method such as keys() to create an array from the dictionary, or (in Python 2.1) use an iterator.

To write a dictionary literal, use curly braces:

color = {"banana": "yellow", "cherry": "red", "orange": "orange"}

To look a key up in a dictionary, use square brackets:

print color["banana"]

Python dictionaries differ from Perl hashes in one major respect: whereas the keys of a Perl hash must be of scalar type, a Python dictionary's keys may be of any immutable type. Therefore, tuples and the like can be used as hash keys.

”The Meaning of Everything”, by Simon Winchester
The Oxford English Dictionary – a 70-year gestation

Shakespeare starting writing his plays in 1580 and had no dictionary for most of his career. He made up words, some still in use today : baby-eyes, dwindle, laughable, pell-mell. He had reference books such as biographies, atlases, even a thesaurus, but no dictionary as we know it today.

There was also a lexical tool for which the name, “dictionary”, was invented in 1538. This book, edited by Sir Thomas Elyot, was actually a Latin/English translating dictionary . Twenty years later John Withals produced a vocabulary book with Latin/English words classified in like groups : birds, quadrupeds, musical instruments, etc.

Finally, in 1604, a schoolmaster, Robert Cawdrey, published a slim 120-page volume of English words borrowed from classic languages which was arranged in an alphabetical table with an attempt to present a definition for each word. This was more a list of synonyms than a true dictionary, but it was a start. It dealt mainly with seldom used, difficult words, ignoring the commonplace words of everyday speech. It was, however, the first reference book that dealt solely with the English language current at that time. For more than fifty years dictionaries continued to be published in this vein, listing difficult, polysyllable words better suited for academic circles than the general population.

In 1656, however, Thomas Blout’s “Glossographia” acknowledged the complexity of attempting to produce a definitive account of the English language, of bringing together in one work the multitude of ever-changing words which make up our speech. Thomas Blout, a barrister by profession and a linguist by affection, might be called the father of lexicography. One of his followers was John Phillips, producing a 11,000-word dictionary which borrowed heavily from Blout’s work. His work was expanded until, ten years after his death, his sixth and final edition was published in 1706 with 38,000 words purported to be the “Universal English Dictionary”.

Another 50-year leap forward, please, and we come to the name of Samuel Johnson and his 2-volume work that set the standard for all future English dictionaries. The emphasis here is on the word “English”. Across the Channel, the French and the Italians had also been producing dictionaries of their respective languages with one important difference. The Latin-based Continental languages were and still are under the control of official government committees to insure the linguistic purity of the tongue, to guard against infiltration of foreign words.

Admittedly, languages such as French and Italian contain loanwords but they are always treated as bastard stepchildren at best. English dictionaries, like the English language, are forever changing. Their role is not to prescribe how words are to be used but to define them and to describe, or register, the origin and changes in any individual word. As Johnson wrote in the preface of his original work, the English language is “. . . copious without order, and energetic without rules . . . “. His work remained in print over 100 years and drew on three sources that are still in use today to determine what is to be included in a dictionary. These are words to be found in existing dictionaries, words heard in conversation, and words used in literature of all types : fiction, factual, textbooks, newspapers, etc.

Across the Atlantic, Noah Webster published his “American Dictionary of the English Language” in 1828. It proved to be almost as popular in England as Johnson’s various editions. These two dictionaries, Johnson’s and Webster’s, each finally containing between 70,000 and 80,000 words, while good, did not satisfy the learned, leisured class, people who collectively felt that the language was much more complex than it appeared to be.

In 1842 the Philogical Society was established in London to “investigate the Structure, the Affinity and the History of Languages”. For 15 years the members busied themselves with short-term studies of various aspects of the language. By 1857 it was generally recognized within the Society that current dictionaries were not adequate. Johnson, for instance, had researched only 250 years of literature, and then only certain catagories had been consulted. Webster had not included vulgarisms and dialects. Obsolete words had disappeared, word families were haphazardly included, and histories of words were brief and incomplete. Research had been scanty on the meanings and senses of words, synonyms were not apparent, and all previous dictionaries appeared to be redundant.

Clearly, an entirely new dictionary would have to be researched and produced. The Society felt it was the logical vehicle for this endeavor. A dictionary that did not depend on previous dictionaries for its material. A complete dictionary of the totality of the English language. The meaning of everything.

The national mood at this time, the Victorian era, was one of supreme self-confidence and great ambition. It was envisaged that the work proposed would be completed in a maximum of ten years. It was not until 1928, seventy years later, that the finished project came off the press. It consisted of ten volumes containing 15,490 pages of single-spaced text, covering 414,825 headwords and 1,827,306 quotations formed from 227,779,589 letters and numbers requiring 178 miles of type.

The project was headed by a succession of three different editors-in-chief who directed the work of countless thousands of volunteer readers around the world. The account of how the dictionary came to be known as the “Oxford English Dictionary” is a story in itself. The personalities of the principals involved is a history of the changing times while the work was in process. And, finally, the story of the mechanics of classifying the material is of special interest.

How does one, without access to a database, keep track of all pertinent information relevant to 414,825 words? How can all the research paperwork be stored in such a way that is is readily available? How is it sorted as it arrives by bagfuls of half-sheet “slips” of paper? Could one, perhaps, create a system of , well, “nodes”? The word in its E2 meaning was unknown in 1928, but the editors of the OED devised a system that was very similar.

The Meaning of Everything, 266 pp., Oxford University Press, ISBN 0-19-860702-4

Dic"tion*a*ry (?), n.; pl. Dictionaries (#). [Cf. F. dictionnaire. See Diction.]

1.

A book containing the words of a language, arranged alphabetically, with explanations of their meanings; a lexicon; a vocabulary; a wordbook.

I applied myself to the perusal of our writers; and noting whatever might be of use to ascertain or illustrate any word or phrase, accumulated in time the materials of a dictionary. Johnson.

2.

Hence, a book containing the words belonging to any system or province of knowledge, arranged alphabetically; as, a dictionary of medicine or of botany; a biographical dictionary.

 

© Webster 1913.

Log in or registerto write something here or to contact authors.