Yunhai jingyuan

The (c. 780) Yunhai jingyuan 韻海鏡源 Ocean of Rhymes, Mirror of Sources Chinese dictionary, which was compiled by the Tang dynasty official and calligrapher Yan Zhengqing (709–785), was the first phonologically arranged rime dictionary of words rather than characters. Although the Yunhai jingyuan is a lost work, several later dictionaries, such as the (1711) Peiwen Yunfu, followed its system of collating entries by the tone and rime of the last character in a term.

Title
The title Yunhai jingyuan compounds four words (translation equivalents from Wenlin 2015):
 * yùn 韻 "rime; rime-class; tone; agreeable sound; charm; appeal; final; syllable final"
 * hǎi 海 "sea; ocean; big lake; huge group (of people/things); great capacity"
 * jìng 鏡 "mirror; lens; glass"
 * yuán 源 "source (of a river); fountainhead; source; cause; origin"

English translations include:
 * Mirror-origin of the Sea of Rhymes
 * Mirror of the Ocean of Rhymes
 * Mirror-source of the Ocean of Rhymes
 * Mirror & Origin of the Ocean of Rhymes
 * The Sources of Rhyme Ocean

Text
The Yunhai jingyuan included 26,911 character head entries and comprised 360 volumes (juǎn 卷 "roll; volume"). By any standards, it was a very large dictionary, and "by the standards of the time it must have been simply gigantic". For more than two centuries, the Yunhai jingyuan remained the most inclusive Chinese dictionary, until the (1039) Jiyun with 53,525 character entries.

Compared with two contemporary 100-volume dictionaries, the Guiyuan zhucong 桂苑珠叢 by Zhuge Ying 諸葛潁 (539–615) and the 100-volume Zihai 字海 compiled under the direction of Empress Wu Zetian (r. 690–705), the Yunhai jingyuan was an "even more miraculous lexicographical work".

Chinese dictionaries are traditionally dichotomized between zìdiǎn 字典 "character dictionaries" and cídiǎn 辭典 "word dictionaries". In the history of Chinese lexicography, the Yunhai jingyuan was the earliest hybrid of a word dictionary and a rime dictionary. Earlier rime dictionaries that only included characters include (c. 230) Shenglei and the (601) Qieyun, which was revised as the (720) Tangyun 唐韻.

In 773, during the reign of Emperor Daizong of Tang (r. 762–779). Yan Zhengqing assembled a group of over 50 scholars with diverse backgrounds to compile the Yunhai jingyuan at his residence in Huzhou. They included several of his literary friends, the Daoist poet Zhang Zhihe, the Chan Buddhist monk Jiaoran 皎然, and Lu Yu, author of The Classic of Tea. In the same year, the Yunhailou 韻海樓 "Ocean of Rhymes Building" was constructed as the depository for its namesake Yunhai jingyuan. The building was restored in 1666, and is presently a municipal library and cultural center in Huzhou, Zhejiang prefecture.

Yan Zhengqing's reference work included not only single-syllable words but also multi-character compounds, and even some chengyu "set phrases". This type of specialized dictionary was intended for the composition of poems, retrieving literary quotations, and finding appropriate words for antithetical couplets.

The word or phrase entries in the Yunhai jingyuan were phonologically arranged by the 106 rime groups of the Pingshui (lit. 平水 "level water") system, which is based on the traditional four tones: ping "level", shang "rising", qu "departing", and ru "entering". Note that the term rime is used, as opposed to common rhyme, in the linguistic sense of syllable rime or Chinese rime table. A dictionary user looks up a word by the tone and rime of the final character, which presumes that the user already knows, or can guess, how to pronounce the character. For speakers of alphabetic languages who are familiar with easy dictionary lookup, using a Chinese dictionary based on the Yunhai jingyuan system is very user-unfriendly.

Three later dictionaries of literary allusions followed the 106-rime arrangement of the Yunhai jingyuan. First were the Yuan dynasty (c. 1280) Yunfu qunyu 韻府群玉 "Assembly of Jade Tablets, a Word-Store arranged by Rhymes" compiled by Yin Shifu 陰時夫 and the Ming dynasty (1592) Wuche yunrui 五車韻瑞 "Five Cartloads of Rhyme-inscribed Jade Tablets" by Ling Zhilong 淩稚隆. Ultimately the Qing dynasty (1711) Peiwen yunfu "Word-store arranged by Rhymes, from the Hall of the Admiration of Literature" expanded entries and corrected errors in previous rime dictionaries, resulting in 212 volumes with 10,257 head entries arranged by the 106 Pingshui rime categories.

The (1728) Pianzi leipian 駢字類編 "Classified Collection of Phrases and Literary Allusions" dictionary was the first dictionary to abandon the traditional Yunhai jingyuan system of indexing words by their last character's rime and tone, and it indexed words by their first character. Most subsequent Chinese word dictionaries were internally arranged by the graphic radical of the first character in a word.