Digital Zhang Gang: A Summary
By Weiting Guo and Nora Van den Bosch
A Diary with Digital Tools
On February 5, 2021, we presented “The Elites in China: New Approaches, New Methods” at the IrAsia seminar. In our presentation, we discussed how to use digital tools to explore a Chinese local elite’s diary, which covers over 50 years of local history and the everyday life experiences of ordinary people. The diarist, Zhang Gang (1888–1942), was a member of the lower gentry who had wide connections with various actors in local society. Through the precious records of Zhang Gang’s diary, we explore not only the life history of a local elite but also the patterns and the structure of everyday life in Chinese local society.
Diaries are not a new source in historical exploration. Yet it provides a unique perspective for the inquiries into the matter of life history, social history, or any aspect of the microhistorical studies that has influenced scholars with different agendas and approaches. In our current project, we explore the possibility of studying a diary through digital tools, which, we believe, will not only help us probe the structure of the text but also enable us to raise new questions regarding the world beyond the text. Moreover, with an array of experiments with digital tools, we intend to develop new methods that can eventually influence the agendas of relevant studies for the years to come. Here, we would like to introduce some of the major goals of exploring Zhang Gang’s diary through digital tools. They include—but are not limited to—the following three broad dimensions:
(1) Rethinking the “diary”: Diary is a text through which one or multiple individuals keep a daily record of events or any sort of information. Many historians of China use diaries of intellectuals and public figures to explore various dimensions of culture, society, and politics. Yet, as we observe from Zhang Gang’s incredible accounts as well as his text(s), diary is not merely a repository of records and information. Instead, it serves as a platform for parallel texts — as well as the authors and agents behind these texts — to co-exist and correlate with one another. In this sense, it is possible to explore a world beyond the textual world of a diary. In our current project, we intend to use digital tools to explore such complex dynamics between texts within and without the diary’s world.
(2) Experiments with texts: Using the corpus and subcorpus we establish from Zhang Gang’s diary, we have developed several experiments particularly through the ways of splitting texts, connecting paragraphs, reorganizing datasets, and linking the corpus with out-of-the-diary datasets. Thanks to the precious resources and the promising team members of the ENP China project, we are able to build an intra-dataset platform through our existing tools and dataset packages.
(3) Finding new questions: Digital tools may not present anything “new.” Yet, in many ways, they help us decode the texts through visualized and non-visualized manners, and hence allow us to bring a new set of questions for various projects. In the process, we find ample possibilities to explore new dimensions of the diary or the entities it describes. The charts and the tables also guide us to the questions that we have never thought of.
We are, however, aware of the potential limits of the diary. Diary as a self-produced record has its specific audiences, and the memories and narratives represented in the texts were inevitably distorted and manipulated by the diarists and the editors who compiled the diaries. For a brief discussion of the limits of Zhang Gang’s diary, see Weiting’s earlier article. Here, we would like to quote Weiting’s comments regarding the strengths and the limits of this diary:
“To a great extent, the Zhang Gang Diary provides a great platform that offers insight into both Zhang’s and his contemporaries’ living worlds. The diary is most clearly the expression of one man’s personal views and experiences, but it also has value in offering a reflection of the consciousness and lived experiences of people in that era.” 
Moreover, as we mentioned above, diaries serve as a platform for parallel texts to co-exist and correlate with one another. In our current project, we would like to connect the texts between Zhang Gang’s diary and other texts — including diaries, newspapers, letters, and various sources —and explore the interconnectivity between the texts, the authors, and their audiences.
In the rest of the blog, we will introduce the ways we turned Zhang Gang’s diary into datasets and subdatasets. We will briefly discuss the structure of the dataset, and show an example of what can be done with it. The preliminary outcome of this project will be published as a journal article.
As the result of text splitting and date extraction, we created a collection of 15.488 diary entries (stored in a CSV file). Each row contains a diary text entry and is added with two types of metadata: one is the date from the Chinese lunisolar calendar, which can be described by the fields ‘Period’, ‘nianhao’, ‘year_number’, ‘l(unar)_month’, ‘intercal(ary)’ and ‘l(unar)_day’; the other is the equivalent of these dates in the Gregorian calendar,which, unlike the former, could not be collected directly from every text entry and was hence generated by a ‘home-made’ converter for the Qing (1636–1911) and the Republican (1911-1949) dates.
The figure above shows the basic structure of storing data: one row is one diary entry. However, we made another version of the dataset in which entries are split at the level of sentences. It is that version we use to conduct analysis, as it allows us to filter the content in the entries, not just select the documents.
Usage of the Dataset
Since the dairy has been transformed into a chronological dataset, we can track predefined keywords or word patterns over time. In general, we use a set of keywords and word patterns as ‘proxy data’ for analysing changes in Zhang Gang’s writing habits (word usage, expressions), activities (family visits, going to the local theatre), and/or interactions with individuals or organizations. Here, we will give an example to illustrate how this is done: the recording of different time markers in the opening of the diary entries.
Time markers, such as the 24-hour unit, Chinese time division, weekdays, xun 旬, months, etc, are not an objective way of recording daily life. Rather, they carry social or cultural meaning that embed life events in some larger framework(s), whether through the cycles such as workweek and festivities or through the reign names such as Guangxu and Xuantong. Throughout his diary, Zhang Gang consistently used the lunisolar calendar as the main timeframe, even in the Republican period when it was no longer employed by the political regimes. However, he sometimes added other time signifiers at the start of his entries. From our observations, he used weekdays, the Gregorian dates (阳历), the heavenly stems and earthly branches (天干地支), jianchu shi’er shen (建除十二神) etc. As a result, to better comprehend the roles and functions of these usages, we analyze the appearance and frequency of these time markers and link them with the dynamics within Zhang Gang’s local world and the transformation of Chinese society during the turn of the centuries.
To keep it simple, we will only focus on the adoption of weekdays and Gregorian days as part of the diary entry opening. Combined with close reading, we use a set of regular expressions to capture the relevant language patterns in the texts. We then create a graph that places the relevant diary entries on a timeline. The resulting figure below shows two trend lines, the red representing the number of documents containing a weekday and the blue referring to the documents with Gregorian dates. The grey transparent bars in the background are the total numbers of diary entries for each year, enabling us to observe if any missing observations can be attributed to the absence of records, such as the case of the year 1935 that suddenly forms a ‘dipping point’ on both lines.
To the surprise of – well – no one, we observe that the adoption of both timeframes happens after 1911 with the official use of the Gregorian calendar. Nevertheless, it is worth noting that the timeframes did not start to appear at the same time. The weekdays appeared in the entries in 1916, three years after the introduction of the Western dates, and were used more frequently. Such change of writing habits was partly due to the new teaching job Zhang Gang obtained in 1916 — a position at a Western-style school where weekdays formed the school routine and hence structured his daily routines and everyday life. Motivated by the need to keep track of the school schedule, Zhang Gang started to use weekdays to permeate his writings and, more importantly, use it as a prominent feature of the diary text entries even after he retired.
The example of the calendar shows how frequencies of timeframes and word patterns can provide insight into the many dynamics between Zhang Gang’s writings, his life, and his local world. Like many of his contemporaries, Zhang Gang’s experiences were shaped by the grand societal and political transformations of modern China. Yet, his ways of using these time markers, as well as adjusting daily routines in order to adapt to specific timeframes, were closely associated with his own experiences and social activities.
To sum up, in our project of digital Zhang Gang, we not only detect the patterns and structures of various phrases but also place these phrases in the broader contexts of Zhang Gang’s world. The digital tools show us the complex layers of Zhang Gang’s writing and life experiences, guiding us to raise new questions regarding the interconnectivity between the texts, the authors, and their audiences. The abundant sources of Zhang Gang’s diary also provide us ample possibilities of exploring the worlds of local elites and ordinary people, revealing the various dimensions of social, cultural, and intellectual history of modern China.
 Weiting Guo, “Living with Disputes: Zhang Gang Diary (1888–1942) and the Life of a Community Mediator in Late Qing and Republican China,” Journal of the Canadian Historical Association 24, no. 2 (2013), 223–224.