Example #1
0
 'refined_soundex':
 RefinedSoundex().encode,
 'refined_soundex_vowels':
 RefinedSoundex(retain_vowels=True).encode,
 'refined_soundex_0pad_ml6':
 RefinedSoundex(zero_pad=True, max_length=6).encode,
 'reth_schek_phonetik':
 RethSchek().encode,
 'roger_root':
 RogerRoot().encode,
 'roger_root_nopad_ml8':
 RogerRoot(max_length=8, zero_pad=False).encode,
 'russell_index':
 russell.encode,
 'russell_index_num_to_alpha': (
     lambda _: russell._to_alpha(russell.encode(_))  # noqa: SF01
 ),
 'russell_index_alpha':
 russell.encode_alpha,
 'sfinxbis':
 lambda _: ', '.join(sfinxbis.encode(_)),
 'sfinxbis_ml6':
 lambda _: ', '.join(sfinxbis_6.encode(_)),
 'sound_d':
 SoundD().encode,
 'sound_d_ml8':
 SoundD(max_length=8).encode,
 'soundex':
 Soundex().encode,
 'soundex_reverse':
 Soundex(reverse=True).encode,
Example #2
0
    Soundex,
    SoundexBR,
    SpanishMetaphone,
    StatisticsCanada,
)

from . import EXTREME_TEST, _corpus_file, _fuzz, _random_char

russell = RussellIndex()
koelner = Koelner()
spfc = SPFC()

algorithms = {
    'russell_index': russell.encode,
    'russell_index_num_to_alpha': lambda _: russell._to_alpha(  # noqa: SF01
        russell.encode(_)
    ),
    'russell_index_alpha': russell.encode_alpha,
    'soundex': Soundex().encode,
    'reverse_soundex': Soundex(reverse=True).encode,
    'soundex_0pad_ml6': Soundex(zero_pad=True, max_length=6).encode,
    'soundex_special': Soundex(var='special').encode,
    'soundex_census': Soundex(var='Census').encode,
    'refined_soundex': RefinedSoundex().encode,
    'refined_soundex_vowels': RefinedSoundex(retain_vowels=True).encode,
    'refined_soundex_0pad_ml6': RefinedSoundex(
        zero_pad=True, max_length=6
    ).encode,
    'daitch_mokotoff_soundex': DaitchMokotoff().encode,
    'koelner_phonetik': koelner.encode,
    'koelner_phonetik_num_to_alpha': lambda _: koelner._to_alpha(  # noqa: SF01