Understanding Literary Texts by LLMs: A Case Study of Ancient Chinese Poetry