[英]Tried understand the Soundex algorithm in Python
What does this number parameter in Soundex
function mean? Soundex
函数中的这个数字参数是什么意思?
Code:代码:
import fuzzy
soundex = fuzzy.Soundex(6)
From the source code it looks like it is the output size:从源代码看起来它是输出大小:
cdef class Soundex:
cdef int size
cdef char *map
def __init__(self, size):
self.size = size
...
if written == self.size:
break
Soundex, by default, generates 4-character codes but you seem to be able to change that in this implementation.默认情况下,Soundex 生成 4 个字符的代码,但您似乎可以在此实现中更改它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.