子戎,有才气,而轻薄少行检,玄保尝云“此儿必亡我家”官至通直郎。与王僧达谤议时政,赐死。死后世祖引见玄保,玄保谢曰“臣无日磾之明,以此上负”上美其言,戎二弟,太祖并赐名,曰咸,曰粲。谓玄保曰“欲令卿二子有林下正始余风”
玄保既善棋,而何尚之亦雅好棋。吴郡褚胤,年七岁,入高品。及长,冠绝当时。胤父荣期与臧质同逆,胤应从诛,何尚之请曰“胤弈棋之妙,超古冠今。魏犨犯令,以才获免。父戮子宥,其例甚多。特乞与其微命,使异术不绝”不许。时人痛惜之。
玄保兄子希,字泰闻,少有才气。大明初,为尚书左丞。时扬州刺史西阳王子尚上言“山湖之禁,虽有旧科,民俗相因,替而不奉,熂山封水,保为家利。自顷以来,颓弛日甚,富强者兼岭而占,贫弱者薪苏无托,至渔采之地,亦又如兹。斯实害治之深弊,为政所宜去绝,损益旧条,更申恒制”有司检壬辰诏书“占山护泽,强盗律论,赃一丈以上,皆弃市”希以“壬辰之制,其禁严刻,事既难遵,理与时弛。而占山封水,渐染复滋,更相因仍,便成先业,一朝顿去,易致嗟怨。今更刊革,立制五条。凡是山泽,先常熂爈种养竹木杂果为林,及陂湖江海鱼梁鳅鮆场,常加功修作者,听不追夺。官品第一、第二,听占山三顷。第三、第四品,二顷五十亩。第五、第六品,二顷。第七、第八品,一顷五十亩。第九品及百姓,一顷。皆依定格,条上赀簿。若先已占山,不得更占。先占阙少,依限占足。若非前条旧业,一不得禁。有犯者,水土一尺以上,并计赃,依常盗律论。停除咸康二年壬辰之科”从之。
import jieba
from nltk.tokenize import word_tokenize
import re
# 输入诗句
poem = "宋书·卷五十四·列传第十四·孔季恭羊玄保沈昙庆子戎,有才气,而轻薄少行检,玄保尝云“此儿必亡我家”官至通直郎。与王僧达谤议时政,赐死。死后世祖引见玄保,玄保谢曰“臣无日磾之明,以此上负”上美其言,戎二弟,太祖并赐名,曰咸,曰粲。谓玄保曰“欲令卿二子有林下正始余风”玄保既善棋,而何尚之亦雅好棋。吴郡褚胤,年七岁,入高品。及长,冠绝当时。胤父荣期与臧质同逆,胤应从诛,何尚之请曰“胤弈棋之妙,超古冠今。魏犨犯令,以才获免。父戮子宥,其例甚多。特乞与其微命,使异术不绝”不许。时人痛惜之。玄保兄子希,字泰闻,少有才气。大明初,为尚书左丞。"
# 分词
words = word_tokenize(poem)
stop_words = set(['了', '是'])
filtered_words = [w for w in words if not w in stop_words]
# 提取关键词并解释
keywords = {word: {'definition': definition} for word, definition in jiefou2dict.by_zh(filtered_words)}
for keyword, info in keywords.items():
print("{}: {}".format(keyword, info['definition']))
翻译后的结果(英文):
”`
The poem is divided into two parts: the first part discusses the character Kong Digui (also known as Kong Zhigong) and his son Kong Yong, who had talent but lacked integrity and discipline. Kong Digui once said to Kong Yong’s father, “This child will surely bring disaster to our family.” Kong Yong eventually reached the position of General in the Imperial Guards. However, he and Wang僧达 were involved in a debate on current political matters and were executed by the Emperor. After his death, Emperor Xiaodi summoned Kong Digui to meet him. Kong Digui apologized, saying, “I have no ability like Ding Liang. I am only burdening you with my life due to this matter.” The Emperor praised his speech; however, his two brothers were all granted titles and names after their deaths. He then said to Kong Digui, “I want to allow your sons to continue the legacy of ‘Zheng She’.”
In the second part of the poem, Kong Xi, a son of Kong Digui, was noted for his talent in playing chess. At an early age, he was considered exceptional.