Skip to main content

Utility to assist with string comparisons.

Project description

String Comparison

Text normalization for string comparison in Python.

This maps a Unicode code point key represented as an integer to a corresponding ASCII character mapping. In some cases such as Hebrew niqqud & cantillation, we remove the character altogether or replace certain punctuation with a space.

In addition, some characters are removed prior to normalization. For example, Unicode control chars.

Requirements

This project requires Python 3.7+

Installation

To install with pip

pip install string_comparison

Usage

import string_comparison
normalized = string_comparison.normalize("é")
assert normalized == "e"

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

string_comparison-1.1.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

string_comparison-1.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file string_comparison-1.1.0.tar.gz.

File metadata

  • Download URL: string_comparison-1.1.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7

File hashes

Hashes for string_comparison-1.1.0.tar.gz
Algorithm Hash digest
SHA256 09aa25595472cb2ba3adbaf0d642541d7854f6b90619c01b2a7a3381b01a8bac
MD5 be7c07814e438fbfc7a8660cf487b060
BLAKE2b-256 775cee3dc2f0db3573f930852a1485e38a924def848bcf853bc95ca0cd757793

See more details on using hashes here.

File details

Details for the file string_comparison-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: string_comparison-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7

File hashes

Hashes for string_comparison-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46cda70eaafcf1bdc43c081f0eddcd2d2985efe137e7f71e530fc0c6440b2401
MD5 293b5ce21c430cd0fb4d12ddd28121f9
BLAKE2b-256 bb234338a943d6de7bc7c2dde669c08803e214eeeec12de9ca6a32b4592fe436

See more details on using hashes here.

Supported by

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