简体   繁体   English

POWER BI/EXCEL/VBA - 基于包含单词列表的行分类

[英]POWER BI/EXCEL/VBA - Row Classification based on a list of contained words

i'm trying to recreate a parser, inside different applications (just to find out a good and light way to do it) that, with a list of given values try to classify a row.我正在尝试在不同的应用程序中重新创建一个解析器(只是为了找到一种好的和轻便的方法),使用给定值的列表尝试对一行进行分类。 Here it is an example:这是一个例子:

Table1: contains items that have to be classified:表1:包含必须分类的项目:

Code代码 Description描述
1 1 this is a common row that belong to Jake这是属于 Jake 的常见行
2 2 this is a special row that belong to Thomas这是属于 Thomas 的特殊行

Table 2: contains Keywords that have to be searched inside Table1 [Description]表 2:包含必须在表 1 中搜索的关键字 [描述]

Keywords关键词 Category类别
common, Jake常见的,杰克 Common Jake Row普通杰克街
special, belong, row, Thomas特别,属于,行,托马斯 Special Thomas Row特别托马斯街

The result that i want to obtain is:我想要获得的结果是:

Code代码 Description描述 Category类别
1 1 this is a common row that belong to Jake这是属于 Jake 的常见行 Common Jake Row普通杰克街
2 2 this is a special row that belong to Thomas这是属于 Thomas 的特殊行 Special Thoams Row特别汤姆斯街

Is there a way to have this in VBA or Excel or PowerBI?有没有办法在 VBA 或 Excel 或 PowerBI 中有这个?

Thanks in advance提前致谢

Just do a fuzzy join in Power Query and tweak the threshold.只需在 Power Query 中进行模糊连接并调整阈值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM