|
发表于 2022-8-30 11:12
来自手机
|
显示全部楼层
老张家大婶子 发表于 2022-8-30 09:39
嗯,做一个对照表,那以后VLOOKUP跟XLOOKUP都可以了,谢谢,我先去整去
凑了一个
create temp table aa as select rowid old_rowid,物料名称 字符串 from 分词排序后相似匹配不同项 where 物料名称!='' group by 物料名称;create temp table bb as select 商品名称 标准化字符串 from 分词排序后相似匹配不同项 where 商品名称!='' group by 商品名称;cli_jiebafc~aa~字符串;cli_split_data~aa_fc~~~分词结果;create temp table dd as select * from aa_fcsplit order by 分词结果 desc;create temp table ee as select id,字符串,group_concat(分词结果,'~') 排序后分词结果 from dd group by id;create temp table ff as select id,字符串,排序后分词结果 from aa join ee using(字符串);select * from ff;cli_jiebafc~bb~标准化字符串;cli_split_data~bb_fc~~~分词结果;create temp table dd2 as select * from bb_fcsplit order by 分词结果 desc;create temp table ee2 as select id,标准化字符串,group_concat(分词结果,'~') 排序后分词结果2 from dd2 group by id;create temp table ff2 as select id,标准化字符串,排序后分词结果2 from bb join ee2 using(标准化字符串);select * from ff2;create temp table hh as select *,user_func('levenshtein',ff.排序后分词结果,ff2.排序后分词结果2) 相似度 from ff,ff2;select id,字符串 物料名称,iif(min(相似度)<5,标准化字符串,'') 商品名称,min(相似度),标准化字符串 from hh group by id;select * from 分词排序后相似匹配不同项; |
-
|