Yunjing 韻鏡 "Mirror of rhymes" is one of the oldest Chinese rhyme indices. The compiler of the Yunjing is not known, yet it must have been compiled in the 10th century. The Yunjing can be compared with the treatise Qiyin lüe 七音略, which is a fascicle (36-37) of Zheng Qiao's 鄭樵 (1104-1162) history book Tongzhi 通志.
The Southern Song-period 南宋 (1127-1279) scholar Zhang Lin 张麟 wrote a preface to the Yunjing is which he says that the original title of the Yunjing was Zhiwei yunjing 指微韻鏡 "Pinpointing mirror of rhymes". Zheng Qiao, author of the Qiyin lüe, calls it Qiyin yunjian 七音韻鑒 "Mirror of rhymes of the seven types of articulations". The word jian 鑒 might have been used to avoid the word jing 鏡, which is homophoneous to jing 敬, part of the name of Zhao Jing 趙敬, grandfather to Emperor Taizu 宋太祖 (r. 960-975), the founder of the Song dynasty.
Chinese characters were categorized according 206 rhyme groups corresponding to syllable endings which are further divided into four categories according to the openness of the mouth. The first grade is a very open syllable (yideng kaikou 一等開口), the fourth grade a closed syllable (sideng hekou 四等合口). The openness of the mouth (hu 呼) is influenced by the presence of an interstitional semivowel /ω/.
There are, additionally to the 206 rhyme groups, 16 so-called she rhymes 攝 modelled after the pattern of the syllables in the Indian Siddhaṃ alphabet. The 36 initial consonants of middle Chinese are represented by one character each.
The Yunjing, nevertheless, unifies several initials (幫 /p/ with 非 /pĭ/, 端 /t/ with 知 /ţ/, 精 /ts/ with 照 /tɕ/) and comes only to 23 consonant initials. The reason for this method is that the light labials (qing chunyin 輕唇音) 非 /pĭ/ have one grade of openness (hekou sandeng 合口三等), and the heavy labials (zhong chunqin 重唇音) 幫 /p/ do not know this grade. The two other groups of syllables are combined for the same reason. There are some inconsistencies in the use of the open-mouth and closed-mouth system, and, to complicate matters further, there is also a category of open-closed syllables (kaihe 開合). This category might refer to syllables including the vowels /o/ and /ɔ/.
In each table of the Yunjing, the syllables are divided into "inner turning" or "turning inwards" (neizhuan 內轉) and "outer turning" or "turning outwards" (waizhuan 外轉). It is still not clear what these terms exactly mean, but it seems to be clear that it has something to do with the openness of the syllable. There are waizhuan syllables with a singular series of less openly spoken words (erdeng 二等), while the neizhuan syllables have no such singular series.
If not counting the different tone pitches (shengdiao 聲調), the 206 rhyme groups of the Guangyun can be reduced to 61. Yet the Yunjing has only 43 rhyme group tables. This is because each table in the Yunjing has only 16 rows, corresponding to a theoretical amount of 688 endings. The syllables of the 61 rhyme groups of the Guangyun are thus dispersed among the many rows for open and closed syllables that are provided in the Yunjing, but not in the Guangyun. All words of the rhyme group 冬, for instance, are open-mouth (yideng 一等) syllables, together with 宋 and 沃, while words of the rhyme group 鐘 belong to the closed-mouth (sandeng 三等) category, together with 腫, 用 and 燭.
A decisive difference to the Guangyun is that the rhyme groups 蒸 /ĭəŋ/, 登 /əŋ/, 職 /ĭək/ and 德 /ək/ of the Yunjing are shifted to the end of the book. This might be an influence of the topolects Minnan and Hakka, in which the respective rhyme groups include a /-t/ or /-n/, while the Qieyun rhymes 切韻 from the Tang period (corresponding to those in the Guangyun), as well as Cantonese, include the finals /-ŋ/ and /-k/.
Example from the beginning of the Yunjing. The table, spread over two pages, shows the words/characters of the rhyme group /-uŋ/. The large-block rows are the divisions into the four tone pichtes, 東 being the syllables with the ending /-uŋ˥/, 董 those with the ending /-uŋ˧˥/, 送 those with the ending /-uŋ˥˩/, and 屋 those with the ending /-uk/. In the large-block columns the syllables are arranged according to the initial consonant, the labials (chunyin 唇音) to the right, the linguals (sheyin 舌音) next, followed by velars (yayin 牙音), dentals (chiyin 歯音), gutturals (houyin 喉音), and the linguo-dentals to the left (sheyin-chi 舌音歯, s.l. shechiyin 舌歯音). Each consonant group is further divided into unvoiced (qing 清) and voiced (zhuo 濁), less voiced (ciqing 次清) and mixed (qingzhuo 清濁) consonants. The tone pitches are also further divided into four groups for which scholars have not still found a satisfying explanation but which might be related to the "openness" of the vowel (in the example, the groups 鏃縬粥蹙， 瘯珿俶鼀 and 速縮叔肅 occupy all four grades).
The Yunjing has managed to group all different syllables of Chinese in only 43 tables. This simplification reflects the phonetic change from middle Chinese to early modern Chinese, when a lot of sounds became obsolete. Although the Yunjing never specifically points at the she rhymes, the 43 tables correspond to 43 different she syllables, not only in the phonetic quality, but also in the arrangement of the order.
The 43 tables include 3,695 characters which represent homophonous words (xiaoyun 小韻 "small rhymes"). Some 60 to 70 characters appear more than one time because of two facts: these were either put into a place into the rhyme grid where the pronunciation is in fact different, or in such places, where the pronunciation is very close. The Yunjing thus only known 3,675 real groups of homophones.
During the Chunyou reign-period 淳祐 (1241-1252), the Yunjing came to Japan, where two copies were preserved. This was a very happy incident because any copy was lost in China. Around 1900, Li Chunzhai 黎蒓齋 managed to get back a facsimile of a Japanese copy to China. One Japanese copy was an edition of 1564, the so-called facsimile edition of the Song period according to the Yōraku edition 覆宋永祿本, which was obtained by Li Chunzhai and included in the series Guyi congshu. Another copy, the so-called Kanyō edition 寬永本, was printed in 1641. A facsimile of this came to the Peking University 北京大學 and was reproduced in 1955 by the Guji Press 古籍出版社.
There is a critical commentary on the Yunjing written by Li Xinkui 李新魁 (1935-1997), the Yunjing jiaozheng 韻鏡校證, published in 1982 by the Zhonghua Book Company 中華書局.