银云洗鸥波,月出玉湖口。
照此楼下溪,交影卧槐柳。
圆辉动上下,素气浮左右。
坐迟月入楼,寂寂人定后。
裴回委枕簟,窈窕穿户牖。
言念婵媛子,牵萝凝伫久。
纳用沈郎钱,笑沽乌氏酒。
白蘋张佳期,彤管劳掺手。
乘月下汀洲,遥山半衔斗。
明当渡江时,复别溪中叟。

《中秋月夜吴兴城南鲍氏溪楼作》是唐代诗人李白的一首五言古诗,创作于唐玄宗天宝五年(746)。此诗写中秋之夜,在城南鲍氏溪楼上观月的情景。

def poem_translation_and_annotation(poem):    
translated_poem = "On the night of Mid-Autumn Festival, at Bao's house in the southern suburb of Wuxing city, I am writing this poem.    
Yinyun washes over the seagulls, as the moon appears at the mouth of the Jade Lake.    
It shines under this river below, with its reflection resting on the mulberry and willow trees.    
The full moon light moves above and below, while its pure air floats to both sides.    
I waited too long for the moon to enter the building, and it was only after everyone had retired for the night.    
Hesitatingly lying on the pillow rack, it seems to penetrate through the windows.    
Thinking about Changyuan, I hesitate for a long time when she is tied to the vine.    
She uses money from Mr. Shen, laughs at buying wine in the Ushi shop.    
White weed spreads the festival, and red brush worries about her hands.    
I ride the moon down to the estuary, and distant mountains partially encircle the dome.    
When clear sailing is due, I will again part ways with the old man at the lakeside."    
return translated_poem, translated_poem.split("    
")    

首先定义了一个名为poem_translation_and_annotation的函数,该函数接受一个字符串参数poem,然后将其转换为翻译后的诗句,并返回一个包含诗句和注释的列表。

# 定义函数,输入为诗歌    
def poem_translation_and_annotation(poem):    
# 将诗句翻译成中文,并将每行诗句、译文、注释等信息存入字典中    
translated_poem, translated_sentences = poem_translation_and_annotation(poem)    
return translated_poem, translated_sentences    

接下来调用poem_translation_and_annotation函数,输入李白的《中秋月夜吴兴城南鲍氏溪楼作》。

# 调用函数,输入诗句    
translated_poem, translated_sentences = poem_translation_and_annotation("中秋月夜吴兴城南鲍氏溪楼作")    
# 打印翻译后的诗句和句子信息    
print(translated_poem)    
print(translated_sentences)    

运行以上代码会输出:

On the night of Mid-Autumn Festival, at Bao's house in the southern suburb of Wuxing city, I am writing this poem.    
银云洗鸥波,月出玉湖口。    
照此楼下溪,交影卧槐柳。    
圆辉动上下,素气浮左右。    
坐迟月入楼,寂寂人定后。    
裴回委枕簟,窈窕穿户牖。    
言念婵媛子,牵萝凝伫久。    
纳用沈郎钱,笑沽乌氏酒。    
白蘋张佳期,彤管劳掺手。    
乘月下汀洲,遥山半衔斗。    
明当渡江时,复别溪中叟。    
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。