Sql与模糊逻辑字符串匹配 [英] Sql and Fuzzy Logic String Matching

查看:120
本文介绍了Sql与模糊逻辑字符串匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我正在使用sqlite来存储跟踪电视节目信息的节目的数据。我在将用户信息与官方剧集标题匹配时遇到问题。用户信息可能拼写错误或完全不正确。我需要一种方法来将最佳匹配返回给最终用户可能部分错误的标题名称。 Aka,我不能做一个直接的短语匹配系统。



基本上是SQL的初学者,我不知道怎么做不正确的模糊逻辑匹配信息。我知道你可以做类似和通配符,但如何使用字符串?或者我是否将标题拆分为单词然后搜索?任何帮助将不胜感激!



谢谢!

Hello,

I am using sqlite to store data for a program that tracks TV show info. I am having problems matching the users info to the official episode titles. The users information could be misspelled or completely incorrect. I need a way to return the best match to the end users potentially partially incorrect title names. Aka, I can't do a straight out phrase matching system.

Being basically a beginner at SQL, I am not sure how to do a fuzzy logic match with incorrect info. I know you can do like and wildcards but how can that work with a string? Or do I do split the title into words and then search that way? Any help would be greatly appreciated!

Thanks!

推荐答案

首先,它会很好了解模糊集和模糊逻辑的基础知识。我想说,先决条件是对经典,非模糊集理论和逻辑的理解。



我希望你能阅读和理解这些文章或许这些文章中的一些参考文献,至少要理解这些领域的重要性:

http://en.wikipedia.org/wiki/Fuzzy_set [ ^ ],

http://en.wikipedia.org/wiki/Fuzzy_logic [ ^ ]。



如今,基于模糊数学的软件正在增长,包括搜索算法:

http ://en.wikipedia.org/wiki/Approximate_string_matching [ ^ ],

http ://en.wikipedia.org/wiki/Levenshtein_distance [ ^ ]。



参见: http://ntz-develop.blogspot.com/2011/03/fuzzy-string-search.html [ ^ ]。



你可以得到一个这些CodeProject文章中基于 Levenshtein距离(见上文)的模糊匹配思想:

http://www.codeproject.com/Articles/162790/Fuzzy-String-Matching-with-Edit-Distance [ ^ ],

http://www.codeproject.com/Articles/36869/Fuzzy-Search [ ^ ]。



您可以找到更多:http://bit.ly/17Nyzzj [ ^ ]。



我不希望在论坛上提出快速问题并获得快速答案,以及简短的食谱配方和即用型解决方案。需要非常认真的教育,即使它可以是自我教育,仍然是教育。



-SA
To start with, it would be good to understand the basics of fuzzy sets and fuzzy logic. I would say, the prerequisites for that would be good understanding of "classical", non-fuzzy set theory and logic.

I hope you can read and understand those articles and perhaps some of the references from these articles, at least to understand how non-trivial these fields are:
http://en.wikipedia.org/wiki/Fuzzy_set[^],
http://en.wikipedia.org/wiki/Fuzzy_logic[^].

These days, software based on fuzzy mathematics is growing, including search algorithms:
http://en.wikipedia.org/wiki/Approximate_string_matching[^],
http://en.wikipedia.org/wiki/Levenshtein_distance[^].

See also: http://ntz-develop.blogspot.com/2011/03/fuzzy-string-search.html[^].

You can get an idea of fuzzy matching based on Levenshtein distance (see above) from these CodeProject articles:
http://www.codeproject.com/Articles/162790/Fuzzy-String-Matching-with-Edit-Distance[^],
http://www.codeproject.com/Articles/36869/Fuzzy-Search[^].

You can find a lot more: http://bit.ly/17Nyzzj[^].

I would not hope for asking quick questions and getting quick answers on forums, as well as short cookbook recipes and ready-to-use solutions. Pretty serious education is required, even if it could be self-education, still education.

—SA

似乎我只需要搜索vb中的数据,因为我已经被告知,我不能用SQL做到这一点。
It seems I will just have to search through the data in vb since I've been informed, ever so precisely, that I cannot do it in SQL.


这篇关于Sql与模糊逻辑字符串匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆