如何根据相邻关键字在文本中的位置将它们组合成多字关键字java

发布于 2025-01-11 12:04:11 字数 562 浏览 0 评论 0原文

我有一个使用 TextRank 算法的关键字列表,并且我有所有单词的列表,我想将 kaywords 组合成一个多单词关键字,具体取决于它们在用 java 标记的所有单词列表中的位置。 例如:

Keywords :[ management ,activities ,such ,accounting ,risk ,project ,performance]

所有单词标记化的列表:

[ "A", "cloud", "service", "for", "managing", "business", "activities", "such", "accounting",",", "procurement", "project", "management",",","risk", "management"," performance","."]

多关键字的结果:

[ "risk management" ,"activities such accounting","project","management performance"]

I have a list f keywords i used TextRank algorithme, and i have list of all words tokinized ,i want to combine kaywords into a multi-word keyword depending on their position in the list of all words tokenized with java.
For exemple :

Keywords :[ management ,activities ,such ,accounting ,risk ,project ,performance]

list of all words tokenized :

[ "A", "cloud", "service", "for", "managing", "business", "activities", "such", "accounting",",", "procurement", "project", "management",",","risk", "management"," performance","."]

Result of multi-Keywords :

[ "risk management" ,"activities such accounting","project","management performance"]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清晨说晚安 2025-01-18 12:04:11

您想要的结果(“多字关键字”)是短语。我们有一个针对多种 textrank 算法的 Python 实现,默认情况下可以处理该问题 - 位于 https://github.com /DerwenAI/pytextrank/

The results that you want ("multi-word keyword") are phrases. We have a Python implementation, for multiple textrank algorithms, which handles that by default – at https://github.com/DerwenAI/pytextrank/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文