如何根据相同单词对句子进行聚类?

这是我的样本数据:

maybe add a higher-level descriptionmin of spare daemonsdata in the appropriate orderthe compiled max daemonsan iovec to store the trailer sent after the filedata in the wrong orderan iovec to store the headers sent before the filereturn err maybe add a higher-level descif a user manually creates a data file

我想采用聚类方法,自动将这些数据根据句子中出现的相同单词分类,我的目标是这样的:

  1. add

    maybe add a higher-level description

    return err maybe add a higher-level desc

  2. damons

    min of spare daemons

    the compiled max daemons

  3. iovec

    an iovec to store the headers sent before the file

    an iovec to store the trailer sent after the file

  4. data

    data in the wrong order

    data in the appropriate order

    if a user manually creates a data file

能有人帮帮我吗?非常感谢!


回答:

听起来你想找出最常见的单词

这并不难做到(而且不是“聚类”,只是计数并按常见单词分组),你尝试过什么,你卡在哪里了?

Related Posts

使用LSTM在Python中预测未来值

这段代码可以预测指定股票的当前日期之前的值,但不能预测…

如何在gensim的word2vec模型中查找双词组的相似性

我有一个word2vec模型,假设我使用的是googl…

dask_xgboost.predict 可以工作但无法显示 – 数据必须是一维的

我试图使用 XGBoost 创建模型。 看起来我成功地…

ML Tuning – Cross Validation in Spark

我在https://spark.apache.org/…

如何在React JS中使用fetch从REST API获取预测

我正在开发一个应用程序,其中Flask REST AP…

如何分析ML.NET中多类分类预测得分数组?

我在ML.NET中创建了一个多类分类项目。该项目可以对…

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注