Data Man
Mr. Advance Four 03-20 11:08
Li Bai's affection for Du Fu is far less than Du Fu's affection for Li Bai? Bai Juyi is the fighter among the "big Vs" in the Tang poetry circle? In addition to poetry, Data Man tells you that we can also use data analysis to analyze Tang poetry to stimulate the text, and to find the relationships of those who are scattered between the lines.
Using CBDB database, open the door to analyze the relationship of poets in Tang Dynasty
Some time ago, with the popularity of Chinese Poetry Conference, the whole country set off a wave of reading Tang poems. When I was still in middle school, whenever I was in a bad mood, I relied on reading poems to get rid of it. As a lover of classical poetry, I slowly read more and more and realized that there are subtle relationships between poets of the Tang Dynasty.
For example, Du Fu was very fond of Li Bai, to the extent that he could not stop dreaming of seeing him: he dreamed of him frequently for three nights, and he loved to see him (Dreaming of Li Bai). And Li Bai confessed his love to Meng Haoran: I love Meng Haozi, his style is known all over the world ("Gift to Meng Haoran"). Meng Haoran's good friend is Wang Changling: several years with the pen and inkstones, this evening coverlet ("Send Wang Changling to Lingnan").
Out of curiosity, I tried for a while to make sense of their relationship. But there are two very tricky points in this case:
The number of poems in the whole of the Tang Dynasty is too large, with more than 40,000 poems in one ****.
There are too many aliases for poets, such as Du Fu: Zi Mei by character, Du Er by ranking, Du Gongbu by official position. It is very troublesome to organize.
In response to the first point, I now use a computer to do it, even if the number is higher.
The second point is a little more laborious, we use the Harvard University compiled by the China Biographical Database Project (hereinafter referred to as CBDB). CBDB records the biographical information of Chinese celebrities through the ages, and stored in a relational database.
CBDB consists of many tables, and each table records different information about the person. In our analysis, only two of these tables are used, the main information table of the person: BIOG_MAIN and the alias table of the person: ALTNAME_DATA. firstly, we query the person number, c_personid, from BIOG_MAIN, and then we query the aliases from ALTNAME_DATA with c_personid, as shown in the following figure:< /p>
In the figure, we can see that Du Fu has three aliases: Zi Mei, Du Er, Du Gongbu.
Of course there are many renames. For example, when we look up Wang Wei, we'll find a bunch of ones called Wang Wei.
This time, we have to use the birth and death dates to determine: whether the character is from the Tang Dynasty or not. This time, we have to query the database for the birth and death dates of the characters.
The Tang dynasty was founded in 618 and died in 907. The comparison immediately reveals that the second Wang Wei is the poet we are looking for, Wang Wei.
Check the aliases to verify this:
Seeing the familiar Wang Yuxing and Mozhi, yes, this is none other than Wang Wei's classmate.
Because CBDB collects so many historical figures, the renaming phenomenon is very serious. After some exploration, I finally set up the following strategy to rule out renaming:
If the character's birth and death dates are complete, then it is sufficient if the birth and death intervals intersect with the duration of the Tang dynasty. If such a poet exists, then it is straightforward to use that person as the author in the full Tang poem.
If the character has only a birth or death year, then the birth or death year must be within the duration of the Tang dynasty. Add such a person to the list of candidates.
If the character's birth and death years are unknown, then discard them.
After these three judgments:
If the list of candidates is empty, then there is no target candidate in the CBDB and the poet is discarded.
If there are more than one candidate, then it means that the exclusion of renames has failed and the poet is discarded.
This strategy is not perfect, and there are cases where some of the noted poets are discarded. For this reason I added them manually:
There are also some poets with awkward aliases that are common words in Tang poetry and need to be removed manually. As follows:
After this sifting, only 762 authors remain out of the original 2609 in all Tang poetry. That's enough, all the famous poets are in this list, next we only care about the relationship between these 762 poets.
Li Bai is not as sentimental as Du Fu, and Bai Juyi is the real "V"
Using the above list of poets and their aliases, we can search for references between poets in the whole of Tang poetry. The rule is: if there is a reference to the other poet in the title or the body of the poem, the citation relationship between the two poets is increased by 1. If a poem mentions the other poet more than once, it will be counted as only one citation.
After some computer work, a table of references was created.
First, let's check the citation relationship between Li Bai and Du Fu:
Nice, Du Fu wrote 12 poems related to Li Bai, while Li Bai only had 3 poems related to Du Fu. A friend like Li Bai does suck a little bit ......
From this chart, we can also see that our program is able to recognize the poet's aliases, for example, Du Fu's "Sending Li 12 Bai 20 Rhymes" and Li Bai's "Sending Du Erfu to the East Shimen of Lu County" do not directly mention each other's names.
In addition to this, I have ranked the referential relationships between poets, and the following shows the top thirty referential relationships:
As we can see, the number one ranked best friends in all of Tang poetry are definitely Lu Guimeng and Pi Rixiu. These two mentioned each other more than a hundred times, this is because Lu Guimeng and Pi Rixiu especially like to sing and harmonize, you write a song to send me, and I will return a song to give you, similar to the interaction between microblogging vloggers nowadays. The two of them sang and harmonized for many years, and finally compiled the first collection of sung and harmonized poems in Chinese literary history: Songling Jie. To honor their friendship, the two are often referred to as "Pilou" in literary history.
Tied for second place are Bai Juyi and Liu Yuxi, and Bai Juyi and Yuan Zhen. Bai Juyi and Liu Yuxi were born in the same year (772), and their paths in politics were marked by various relegations. Both lived long lives; Liu Yuxi died at the age of 71, while Bai Juyi lived to be 75. When he learned of Liu Yuxi's death, Bai Juyi wrote the following famous lines:
"The four seas are equally famous as Bai and Liu, and the century-old friendship is divided between the two silk mills. With the same poverty and illness retired idle days, a death and a life in the old man."
Bai Juyi and Yuan Zhen I do not want to write more, we only need to know that the two in the history of literature known as "Yuan Bai", you can imagine the intimate relationship between the two. From the top 30 references, Bai Juyi is definitely a star in the circle of friends of Tang poets, and a big V in the big V.
Social network of Tang poets' references
Only the list of references is a bit dry, and the next step is the main event of this article. I'm going to use ECharts to visualize the citation relationships between poets and eventually get a social network of poets.
Because there are 762 poets in our sample in one ****, in order to avoid drawing a too crowded graph to see, I will only graphically visualize the citation relationship of the first hundred, as follows:
The arrows indicate the citation relationship between the poets. For example, if Bai Juyi quotes Yuan Zhen, then there is an arrow of Bai Juyi pointing to Yuan Zhen, and Yuan Zhen quotes Bai Juyi, and accordingly there is an arrow of Yuan Zhen pointing to Bai Juyi.
The thickness of the arrows indicates the strength of the citation relationship between the poets. Bai Juyi quotes Yuan Zhen 167 times, while Yuan Zhen quotes Bai Juyi 88 times, so Bai Juyi's arrow pointing to Yuan Zhen should be thicker.
The figure clearly shows the two large circles of friends of poets in the Tang dynasty: the circle of friends of Du Fu-Li Bai and the circle of friends of Bai Juyi. That's right, they are the core poets of the Sheng Tang and Middle Tang periods, respectively.
It's crowded, even though only the top 100 citation relationships are drawn. Literary history divides Tang poetry into four stages according to time: the First Tang, the Sheng Tang, the Middle Tang, and the Late Tang. Next we'll draw the social network diagrams for each of these four stages.
Poets of the Early Tang
From the thickness of the arrows, the best-connected poets of the Early Tang are Song Zhiwen and Shen Quanqi. These two are the representatives of the court poets, and both of them defined the rules of near-poetry, such as meter, counterpoint, and so on. Roughly speaking, the rules of proximal poetry were invented by them. By the way, the two of them in the history of literature is also generally synthesized "Shen Song" Oh, it seems to be good friends, without the certification of the history of literature is not possible.
Sheng Tang poets
(Photo: For the sake of clarity of charting, the social network of the poets of Sheng Tang only draws the relationship between the number of references greater than or equal to 2.)
The core of the Shengtang poets is undoubtedly Li Bai and Du Fu, who were mentioned in the article "Li Du's articles are here, and the flame is ten thousand feet long". Once again, we see that Dufu's arrow pointing to Li Bai is much thicker than Li Bai's arrow pointing to Dufu. Moreover, the poets of the Tang Dynasty were clearly divided into two groups, one centered on Li Bai and Du Fu, and the other on Huangfu Ran and Liu Changqing. I don't know, any friends who know more about literary history, please enlighten me in the comments.
Middle Tang poets
(Photo caption: for the sake of charting clarity, the Middle Tang poets social network only draws the relationship between the number of references greater than or equal to 2.)
The social network of poets in the Middle Tang Dynasty is clearly characterized by the fact that the poets were tightly united around the "Literary Politburo" centered on Bai Juyi, Yuan Zhen, and Liu Yuxi, and they were in the same boat together, making a historic contribution to the great transition of Tang poetry from Romanticism to Realism.
Late Tang poets
The social network of the late Tang poets was rather scattered, with no obvious core. The most important of these were Li Shangyin and Du Mu, who have been recognized by literary history as "Little Li and Du".
When I wrote this article, I suddenly realized that even if a person doesn't know anything about Tang poetry, all he has to do is look at these social network graphs and he'll be able to see immediately which poets were at the core of his contemporaries, and which poets were the most influential. This is all very useful information.
And we can use computers to analyze the relationships of people in any era. China happens to have the most comprehensive historical documents, so if we can do a systematic analysis of these documents in a unified way, won't we be able to make a map of historical character relationships that change over time?
This was impossible in the past, but now with the development of computer technology and the digitization process of classical literature, it is gradually possible. This is of course a great deal of work and impossible for any individual to achieve. I wonder if it is possible to refer to the development process of linux, with open source, we come together to accomplish this thing.