Classic Chinese Novels - Using Distance Reading to Understand Complex Narratives
· Revealing new insights into character relationships and narrative roles...
Social Network Analysis - Requiring Accurate Data Extracted from the Novels
· Challenges in classic Chinese novels
· Challenges in data extraction
Dream of the Red Chamber
Original novel text upload
Break into dialogue units with context
Speaker and Listener Extraction
prompt = f"\nQ: I will give you a dialogue sentence and a passage of context. Please repeat the dialogue sentence, then based on the context, identify the speaker, the primary listener(s), and the secondary listener(s) in the specified dialogue sentence. Dialogue sentence: {talk}. Context: {context}. Please provide your answer in the format: 'Dialogue sentence: [dialogue], Speaker: [speaker], Primary Listener(s): [primary listener(s)], Secondary Listener(s): [secondary listener(s)]'. Note: 1. Use commas (",") to separate the dialogue sentence, speaker, primary listener(s), and secondary listener(s); 2. If there are multiple speakers or multiple primary/secondary listeners, separate them using "、"; 3. Do not insert any line breaks in your answer; 4. Resolve pronoun references carefully and avoid vague references like "you", "I", "he", etc.; 5. Do not include any explanation or analysis in your answer — treat it like a fill-in-the-blank question. The more concise, the better; 6. If the speaker, primary listener(s), or secondary listener(s) cannot be identified, respond with 'None'. \nA:"
⇢ Add to Database
Resolve Co-references
prompt = f"\nQ:This is a fill-in-the-blank question with an answer of 0 or 1. Please determine: In the book '{chinese_book_name}', are '{entity}' and '{main_entity}' the same character? If yes, return 1; if not, return 0. Do not consider literary implications. No explanation or analysis is needed." \nA:"
⇢ Add to Database
Upload & Cut Dialogues
Refine annotations: click to switch roles
Correct extraction errors
Important intermediary characters identified
Social dynamics revealed
AI + Human
Improve the speed of data processing, thus generate the result faster.
Use social network analysis algorithm to build a final network, which can directly serve for the literary analysis.
flora20@sjtu.edu.cn
https://yutong-yang.github.io/