Skip to main content

Multicode: Miscelleneous functions for handling unicode in transcriptions

Build Status PyPI

General information

This repository provides code and data to normalize datasets, to avoid pitfalls of unicode when creating linguistic data, and to infer general information about digital data when dealing with it in linguistic contexts.

One major concern is the normalization of phonetic transcriptions. There are many lookalikes in unicode which linguists use without knowing that they are not what they initially want to write. Thus the character used to transcribe an alveolar voiceless fricative, for example, has three candidates in Unicode which look extremely similar: ʃ ∫ ꭍ, although only the first one is the character that should be used when writing phonetic transcriptions. Our goal is to provide ways to detect and normalize those cases which result from the confusion of Unicode characters when transcribing languages phonetically.

Other cases include specific writing systems, like CJK systems, where we want to offer services to more quickly handle them. These cases include the possibility to detect the Unicode code points of very rare characters by naming only the parts, but also simple Python functions that allow to determine whether a given character is a Chinese character or not.

CLI

Installing this package will also install the multicode command.

Normalizing data

The main purpose of this package is data normalization, i.e. replacing lookalikes in strings with the canonical characters. This can be done using the recode subcommand, either passing a string as argument:

$ multicode recode "ʃ ∫ ꭍ"
ʃ ʃ ʃ

or using pipes, i.e. having recode read from stdin:

$ echo "ʃ ∫ ꭍ" | multicode recode 
ʃ ʃ ʃ

Structure of the Repository

Our repository contains data and code. Data is represented in a custom CSV dialect, namely tab-separated, with | as optional secondary separator for field content. Unicode characters can be represented either as UTF-8 encoded strings, or using notation like U+0020.

Release files for multicode 0.2.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 multicode 0.2.1
File Size Uploaded
multicode-0.2.1.tar.gz 148.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for multicode 0.2.1
File Interpreter ABI Platform
multicode-0.2.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 298.0 kB

Release files / multicode-0.2.1.tar.gz

Download URL multicode-0.2.1.tar.gz
Size 148.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1154b803d54668a6d5b3ddd6cd3d87e7bc7f87f116ac9765d6dd8f26be7fddfb
BLAKE2b-256 checksum
How to use checksums
76dd8240a32c108e2f6ee2083e3826679e0cee23e6446ab3eba014f89cae2a4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.26.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.10

Release files / multicode-0.2.1-py2.py3-none-any.whl

Download URL multicode-0.2.1-py2.py3-none-any.whl
Size 149.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
82698bdfa14b8b50bf9fd4a0ff85bccac28e8132952eab1f40db990e57021f0a
BLAKE2b-256 checksum
How to use checksums
ab86d1fa671d84f0fb3464893935419cf8e0672be8cf57551ad0a8189fb3b6d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.26.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.1

1 release file

0.1.0

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