【发布时间】:2021-07-07 22:53:37
【问题描述】:
我需要一个 python 包,它可以根据提供的关键字从文本中获取相关句子。
例如,下面是 J.J Oppenheimer 的维基百科页面 -
Early life
Childhood and education
J. Robert Oppenheimer was born in New York City on April 22, 1904,[note 1][7] to Julius Oppenheimer, a wealthy Jewish textile importer who had immigrated to the United States from Germany in 1888, and Ella Friedman, a painter.
Julius came to the United States with no money, no baccalaureate studies, and no knowledge of the English language. He got a job in a textile company and within a decade was an executive with the company. Ella was from Baltimore.[8] The Oppenheimer were non-observant Ashkenazi Jews.[9]
The first atomic bomb was successfully detonated on July 16, 1945, in the Trinity test in New Mexico.
Oppenheimer later remarked that it brought to mind words from the Bhagavad Gita: "Now I am become Death, the destroyer of worlds.
如果我传递的字符串是 - “JJ Oppenheimer 出生日期”,它应该返回“J. Robert Oppenheimer 于 4 月 22 日出生在纽约市, 1904"
如果我通过的字符串是 - “JJ Openheimer Trinity test”,它应该返回“第一颗原子弹于 1945 年 7 月 16 日在新墨西哥州的 Trinity 试验中成功引爆”
我尝试了很多搜索,但没有什么比我想要的更接近,而且我对 NLP 矢量化技术知之甚少。如果有人知道(或存在)请推荐一些软件包,那就太好了。
【问题讨论】: