Tang leihan 唐類函 "Container of Tang-period encyclopaedias" was compiled during the late Ming period 明 (1368-1644) by Yu Anqi 俞安期 (1574-1654), alternative personal name Ci 策, courtesy name Xianchang 羨長 or Gonglin 公臨, from Wujiang 吳江, Jiangsu. His collected writings are called Liuliu ji 翏翏集. Apart from the Tang leihan, he compiled several encyclopaedic anthologies of poetry and literary writings, namely Shijuan leihan 詩雋類函, Leiyuan qiongying 類苑瓊英, and Qijuan leihan 啟雋類函.
His Tang leihan has a total volume of 200 juan. It represents a collection of fragments of Tang-period 唐 (618-907) encylopaedias (leishu 類書) and aims at reconstructing the complete knowledge of that period. Yu took the most complete book from the Tang period, Yiwen leiju 藝文類聚, as the core text, and enlarged it by quotations from surviving books like Beitang shuchao 北堂書鈔, Chuxueji 初學記 and Baishi liutie 白氏六帖, and fragments from Tang-period leishu-type books that had not survived in complete form The result is divided into 43 chapters and 161 sub-chapters covering the usual fields of Chinese encyclopaedias. In some cases, Yu copied whole chapters, e.g., from Du You's 杜佑 (735-812) Tongdian 通典 or Han E's 韓鄂 (c. 900) Suihua jili 歲華紀麗. The structure of each lemma followed a strict principle, beginning with a definition (shiming 釋名), followed by narrative texts (gushi 故實), hints at the context or opposites (shidui 事對), and ending with quotations from literature (shige wenfu 詩歌文賦). In all quotations, the Yiwen leiju occupies the first place. The book was first printed in 1618 by the Deju Hall 德聚堂.