Ban-Ma zilei 班馬字類 is a critial book analyzing the correct use of characters in the history books Shiji 史記 by Sima Qian 司馬遷 (145-c. 86 BCE; in the title abbreviated to Ma 馬), and Hanshu 漢書 by Ban Gu 班固 (32-92 CE). The author was Lou Ji 婁機 (1133-1211), courtesy name Yanfa 彥發, from Jiaxing 嘉興 (today in Zhejiang). The chronological order of the two authors is turned around for linguistic reasons.
The book of 5 juan was finished in 1181, and enriched by prefaces written by Lou Yao 樓鑰 (1137-1213) and Hong Mai 洪邁 (1123-1202). The more than 1,800 lemmata are arranged according to the four tone pitches. Each entry consists of a semantic and phonological analysis of the character, as well as commentaries, particularly in cases where characters are borrowed for other words (character type jiajie 假借).
In 1264, Li Zengbo 李曾伯 (1198-1268), courtesy name Changru 長孺, style Kezhai 可齋, added a batch of 1,239 additional characters (buyi 補遺) which were inserted into their proper place in editions from that time on. Yet among these additional are many errors, like the words bing 稟 (derived from 禾 "grain") and 禀 (derived from 示 "demonstrate") which are often used wrongly.
A facsimile of a Yuan-period 元 (1279-1368) print was published in the series Shewen zijiu 涉聞梓舊. The enlarged version is also found in the series Biexiazhai congshu 別下齋叢書. An "original", brief version can be found in the Houzhibuzuzhai congshu 後知不足齋叢書.