Skip to main content

Wltr Phonetics é uma biblioteca de algoritmos fonéticos

Project description

Wltr Phonetics

PyPI

Build Status

WltrPhonetics é uma biblioteca Python para algoritmos fonéticos. Os seguintes algoritmos estão disponíveis:

  • Soundex
  • Metaphone
  • Refined Soundex
  • Fuzzy Soundex
  • Lein
  • Matching Rating Approach

Além disso, as seguintes métricas de distância:

  • Hamming
  • Levenshtein

Autor

👤 Walter Avelino

📝 Licença

Copyright © 2020 Walter Avelino.
Os projetos estão sob a licença MIT.

Instalação

O módulo está disponível no PyPI, basta instalar pelo pip pip install wltr-phonetics.

Utilização

>>> from wltr_phonetics import Soundex
>>> soundex = Soundex()
>>> soundex.phonetics('Walter')
'W436'
>>> soundex.phonetics('Waltie')
'W430'
>>> soundex.sounds_like('Walter', 'Waltie')
False

A mesma API se aplica a todos os algoritmos, por exemplo:

>>> from wltr_phonetics import Metaphone
>>> metaphone = Metaphone()
>>> metaphone.phonetics('discriminação')
'TSKRMNK'

Você também pode usar o método distance(word1, word2, metric='levenshtein') para encontrar a distância entre 2 representações fonéticas.

>>> from wltr_phonetics import RefinedSoundex
>>> rs = RefinedSoundex()
>>> rs.distance('Walter', 'Waltie')
1
>>> rs.distance('assign', 'assist', metric='hamming')
2

Créditos

O módulo foi amplamente baseado na implementação de algoritmos fonéticos encontrados em Talisman.js "Node NLP library".

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wltr-phonetics-1.0.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wltr_phonetics-1.0.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file wltr-phonetics-1.0.2.tar.gz.

File metadata

  • Download URL: wltr-phonetics-1.0.2.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for wltr-phonetics-1.0.2.tar.gz
Algorithm Hash digest
SHA256 51467a63a1bca417d269100afa21f3614e1900ecdea3ec2ef66dd3e108366317
MD5 b0eacc87da9bdd96f377b3df425e41dd
BLAKE2b-256 a07b48ff8c55490f1f5e64dea1a66e08fdede6130ddbbdea7c5c94796c3d8eac

See more details on using hashes here.

File details

Details for the file wltr_phonetics-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: wltr_phonetics-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for wltr_phonetics-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2ea0ddeaf723fa9905d46ac23bb64a6410582a7406978e9afa989dbf0ef8f00d
MD5 4404978eabcf8ac3f72fade716616f6e
BLAKE2b-256 0165eb77adac878e492bcef9660d65bdcbf7cf39af5ea9b614533de71f08f058

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page