一些算法来识别文本数据中的模式

数据挖掘 机器学习 数据挖掘
2022-03-05 19:02:04

我的项目中有几句话如下(大约25000),

sentence1 = 'Must be able to multi-task in a fast-paced, deadline-driven environment'
sentence2 = 'Strong organisational skills and proactive approach'
sentence3 = 'in this role you will design develop and revise application simulations in alignment with product implementation timelines'
sentence4= 'ensures appropriate cross-referencing between documents within and across qms chapters/topics'

从这些句子中,我试图确定这个人期望什么功能,或者想知道这个人必须做什么。我需要识别这些关键字。我可以使用任何 ML 技术或任何其他方法来确定关键字,

例如在

sentence1 = [multi-task, fast paced, deadline-driven environment]
senetence3 = [design develop and revise application simulations]

我试图在 POS 的帮助下识别这些词,但这并不是很有用。是否有任何算法或想法或方法可以检测到此类关键字?

1个回答

由于您似乎没有任何带注释的数据,因此您能做的最好的可能是:

  1. 可选的第一步:删除停用词(有很多这样的列表可用,例如https://pythonspot.com/nltk-stop-words/
  2. 计算词汇表中每个单词的逆文档频率。这旨在根据单词的使用频率来衡量单词的重要性,因为在较少的句子中使用的单词使其对这些句子更重要。
  3. 计算句子中每个单词的 TF-IDF,然后根据单词的 TF-IDF 权重对单词进行排序。一般来说,最重要的应该是最相关的。或者,您可以决定选择前 N 个单词作为关键字。