我正在开发一个简单的Twitter机器人,需要在搜索结果中删除类似的推文。 如何在数组中删除类似的结果?我可以使用下划线和字符串相似性模块执行此操作吗? 我正在清理结果,如下例所示。
const tweets = [
"32 Things You're Doing Wrong With Your Website Design https://t.co/**** #Webdesign #WebsiteDesign… https://t.co/***",
"How to Deal With Image Heavy Website Design https://t.co/*** #WebDesign #WebsiteDesign #PageLoadSpeed https://t.co/***",
"How to Score a Perfect 100% on Google PageSpeed #Insights https://t.co/*** #Google #PageSpeed #Webdesign https://t.co/***",
"How to Score a Perfect 100% on Google #PageSpeed Insights https://t.co/*** #Google #WebDesign https://t.co/***",
"How to Score a Perfect 100% on #Google PageSpeed Insights https://t.co/*** #PageSpeed #WebApp https://t.co/***",
"Hello Web Design launches today! Learn design fundamentals and shortcuts aimed at non-designers.… https://t.co/***",
"How to Deal With Image Heavy Website Design https://t.co/*** #WebDesign #WebsiteDesign #PageLoadSpeed https://t.co/***",
"#Drupal 8’s new upgrade path is a major reason organizations should consider migrating sooner rather than later”… https://t.co/***",
];