Soundex,数字作为String参数 [英] Soundex with numbers as String parameter

查看:193
本文介绍了Soundex,数字作为String参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您知道一些解释为什么为什么 SOUNDEX 不能将NUMBERS作为字符串使用吗?

Do you know some explanation why SOUNDEX does not work with NUMBERS as string?

这些查询工作正常:

select 1 from dual
where soundex('for you') = soundex('for u')
;

select 1 from dual
where soundex('for you') = soundex('for you')
;

但这不是:

select 1 from dual
where soundex('6000') = soundex('6000')
;
select 1 from dual
where soundex('5') = soundex('5')
;

我正在阅读文档 http://docs. oracle.com/cd/E11882_01/server.112/e26088/functions167.htm#SQLRF06109 ,但没有提及一些有用的信息.

I was reading documentation http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions167.htm#SQLRF06109 but does not mention some useful about it.

推荐答案

soundex算法是专门为根据名称的发声方式而不是所使用的确切拼写而匹配名称的.它的工作原理基本上是将字母字符串映射到主要包含其辅音的短字符串. soundex算法将完全忽略数字(例如,从字符串中删除数字).

The soundex algorithm was specifically developed to match names based on how they sound rather than the exact spelling used. It works basically by mapping strings of letters to short strings containing primarily their consonant sounds. Numeric digits will be completely ignored (e.g. stripped from the string) by the soundex algorithm.

您将需要一种不同的策略来对数字字符串进行近似匹配.

You will need a different strategy for doing approximate matching on strings of digits.

这篇关于Soundex,数字作为String参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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