0

我有以下文本,我想提取三元组,以便生成知识图 (KG)。

text = “Dr. Gao concluded that a long-term systematic migrant worker shortage began to appear in the Chinese
migrant labor market around 2005, which greatly increased the growth rate of migrant workers’ wages,
resulted in the increase of food prices, and pushed up the increase in consumer price index, making the
average level of inflation probably 100 to 200 basis points higher.”

我的目的是自动检测影响“通货膨胀”的因素之间的关系

预期的输出应该是捕捉这种关系的三元组:

• {migrant worker shortage, increase, migrant workers’ wages}
• {migrant workers’ wages, increase, food prices}
• {food prices, push up, consumer price index}
• {food prices, make higher, inflation}

然后我想指定类似的术语push up是 的同义词,increase而通货膨胀是 的同义词consumer price index

基于上面的示例,然后我想删除“重复项”——上面的最后两个要点本质上是相同的,所以不需要两者。

有人可以在python中进行计算吗?

4

0 回答 0