Skip to main content

Local spelling

Developed by Fast Data Science, https://fastdatascience.com

Source code at https://github.com/fastdatascience/localspelling

Python library for localising spelling between British and American conventions, conserving case.

Please note this library converts only spelling variants such as US “honour” vs UK “honor”.

It does not localise vocabulary such as “pavement” vs “sidewalk” or “aubergine” vs “eggplant”.

It also does not localise spellings where there is more than one correct conversion, such as US “program”, which corresponds to both “programme” and “program” in British spelling.

Requirements

Python 3.6 and above

Installation

pip install localspelling

Usage examples

Example 1

from localspelling import convert_spelling
convert_spelling("it has been an honor", "gb")

outputs ‘it has been an honour’

Example 2: you can retrieve the dictionary used for the single words (this won’t match wildcards like ‘-isation’)

from localspelling import get_dictionary
get_dictionary("us")["honour"]

outputs ‘honor’

Who to contact

Thomas Wood at https://fastdatascience.com

Metadata

Release files for localspelling 0.94

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

Source distribution (sdist)

Source distribution for localspelling 0.94
File Size Uploaded
localspelling-0.94.tar.gz 9.1 kB Details

Release files / localspelling-0.94.tar.gz

Download URL localspelling-0.94.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f7deeb8b7ced2c79f88e5de8db18767bcd9d538d6b47bdb2e49dc5b8131eea91
BLAKE2b-256 checksum
How to use checksums
fab3192550d401840f42dbe6089054ec944e41341c7db8f271c74ee9855c1110
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.94 This release

1 release file

0.93

1 release file

0.92

1 release file

0.91

1 release file

0.9

1 release file

0.8

1 release file

0.7

1 release file

0.5

1 release file

0.2

1 release file

0.1

1 release file

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