Skip to main content

A module for decomposing strings in the latin alphabet to the ascii subset.

Project description

Decompose

This module provides a method for decomposing strings containing latin diacretics, ligatures, and other unusual latin letters into their appropriate ascii counterparts generally for the purpose of data for submission into systems requiring the usage of the ascii subset.

Example

from decompose import decompose

decompose('Málaga') # returns 'Malaga'

Comments

decompose.decompose() depends upon unicodedata.normalize() for most of its heavy lifting. However, it also contains a lookup table (decompose.charmap) for those unicode characters that are not necessarily handled by normalize(). Any letter not handled by either normalize or charmap will be silently dropped.

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

decompose-mrobison-0.0.1.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file decompose-mrobison-0.0.1.tar.gz.

File metadata

  • Download URL: decompose-mrobison-0.0.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.5

File hashes

Hashes for decompose-mrobison-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d8dd2dda02d6d4ffbefe74168ed4d0b0ef65a3bc8fa3621250f960b2e39d0635
MD5 b357ce06883c4fab0353498a80098717
BLAKE2b-256 8f4956cc529c3a5d79c91379bbc2b349aeec5db2118ca6829af627e856d398ad

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