Skip to main content

Fonetika

Russian, English, Sweden, Estonian and Finnish Phonetic algorithm based on Soundex/Metaphone.

Package has both implemented phoneme transformation into letter-number sequence and distance engine for comparison of phonetic sequences (based on Levenstein and Hamming distances).

Furthermore, both Russian phonetic algorithms supports preprocessing for specific phoneme cases.

Quick start

  1. Install this package via pip
pip install fonetika
  1. Import Soundex algorithm.

Package supports a lot of opportunities, it's possible to cut a result sequence (like in the original Soundex version) or also code vowels.

from fonetika.soundex import RussianSoundex

soundex = RussianSoundex(delete_first_letter=True)
soundex.transform('ёлочка')
...

J070530

soundex = RussianSoundex(delete_first_letter=True, code_vowels=True)
soundex.transform('ёлочка')
...

JA7A53A

A structure of the library is scalable, RussianSoundex class inherits basic class Soundex (original for English language). In order to extend our algorithm, you need just inherit own class from Soundex and override methods.

  1. Import Soundex distance for usage of string comparision
from fonetika.distance import PhoneticsInnerLanguageDistance

soundex = RussianSoundex(delete_first_letter=True)
phon_distance = PhoneticsInnerLanguageDistance(soundex)
phon_distance.distance('ёлочка', 'йолочка')
...

0
  1. You can also calculate distance between words of two languages. It would be useful for working with one language family group.
from fonetika.distance import PhoneticsBetweenLanguagesDistance

m1 = FinnishMetaphone(reduce_word=False)
m2 = EstonianMetaphone(reduce_word=False)
phon_distance = PhoneticsBetweenLanguagesDistance(m1, m2)
phon_distance.distance('yö', 'öö')
...

1

Metadata

Release files for fonetika 1.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fonetika 1.5.1
File Size Uploaded Provenance Actions
fonetika-1.5.1.tar.gz 9.5 kB Without provenance Details for fonetika-1.5.1.tar.gz

Release files / fonetika-1.5.1.tar.gz

Download URL fonetika-1.5.1.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0e1d004611056dde07da41e59a971acc5bc2e919c523188e8e1b17ffea3063df
BLAKE2b-256 checksum
How to use checksums
767ec983a54e8f5cc723113e9f68d1f636c625fadd300f003818706e7223350d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/59.6.0 requests-toolbelt/0.8.0 tqdm/4.64.0 CPython/3.6.1

Security for fonetika 1.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.5.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page