1

What does this number parameter in Soundex function mean?

Code:

import fuzzy
soundex = fuzzy.Soundex(6)
shaik moeed
  • 5,300
  • 1
  • 18
  • 54
P.Hazarika
  • 11
  • 2

1 Answers1

1

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.

Selcuk
  • 57,004
  • 12
  • 102
  • 110
  • What effect does it have on the scoring if we have less or more character in the result? – P.Hazarika Jul 26 '19 at 05:14
  • Not sure for this specific case. It is a balance between false negatives and positives. I would stick to the standard value. – Selcuk Jul 26 '19 at 05:16