如何使用jaro

编程入门 行业动态 更新时间:2024-10-07 14:22:34
本文介绍了如何使用jaro-winkler查找表中最接近的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的数据库中有一个jaro-winkler算法的实现.我没有写这个功能.该函数比较两个值并给出匹配的可能性.

I have an implementation of the jaro-winkler algorithm in my database. I did not write this function. The function compares two values and gives the probability of match.

所以jaro(string1,string2,matchnoofchars)将返回结果.

So jaro(string1, string2, matchnoofchars) will return a result.

我不想比较两个字符串,而是要发送一个具有matchnoofchars的字符串,然后获得概率高于95%的结果集.

Instead of comparing two strings, I want to send one string with a matchnoofchars and then get a result set with the probability higher than 95%.

例如,当前函数能够为jaro("Philadelphia","Philadelphlaa",9)返回97.62%

For example the current function is able to return 97.62% for jaro("Philadelphia","Philadelphlaa",9)

我希望调整此功能,以便能够为费城"的输入找到费城".为此,我需要进行哪些更改?

I wish to tweak this function so that I am able to find "Philadelphia" for an input of "Philadelphlaa". What kind of changes do I need to make for this to happen?

我正在使用Oracle 9i.

I am using Oracle 9i.

推荐答案

DECLARE CURSOR citynames IS SELECT city FROM table_loc_master where statecode = 'PQ'; CURSOR leasecity IS SELECT city FROM table_loc where State = 'PQ' MINUS SELECT to_char(city) city FROM table_loc_master where statecode = 'PQ'; xProb NUMBER(10,8); BEGIN FOR x_rec IN leasecity LOOP FOR y_rec IN citynames LOOP xProb := jwrun(x_rec.city,y_rec.city,length(y_rec.city)); If xProb > 0.97 Then DBMS_OUTPUT.PUT_LINE('Source : ' || x_rec.city || ' Target: ' || y_rec.city ); End if; END LOOP; END LOOP; END;

更多推荐

如何使用jaro

本文发布于:2023-11-29 09:19:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1645982.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   jaro

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!