【发布时间】:2016-12-07 23:23:39
【问题描述】:
我想通过以下方式匹配字符串并获得分数,
string 1: 4556677, string 2: 2556677, score: 0
string 1: 123345873009, string 2: 123345873112, score: 9
string 1: 22334567, string 2: 22334500, score: 6
所以分数代表常见的前n位数字,从左到右。
我有一个包含 100K 字符串 1 和 30M 字符串 2 的列表,我想过滤掉所有分数大于“x”的对(字符串 1 和 2)。
是否有可用的算法来完成这项任务,而不是残酷的强制顺序匹配?我有存储在 apache hive/hbase 中的表,并且想在 spark 或 java mapreduce 中实现该方法。非常感谢任何帮助。
【问题讨论】:
标签: machine-learning pattern-matching string-matching