Skip to main content

Supplementary data about languages used by the langcodes module

Project description

language_data: a supplement to langcodes

This package is not meant to be used on its own. Please see langcodes for documentation.

language_data is a supplement to the langcodes module, for working with standardized codes for human languages. It stores the more bulky and hard-to-index data about languages, particularly what they are named in various languages.

For example, this stores the data that tell you that the code "en" means "English" in English, or that "francés" is the Spanish (es) name for French (fr).

The functions and test cases for working with this data are in langcodes, because working with the data correctly requires parsing language codes.

Data

The data included in this package is:

  • The names of various languages, in various languages
  • The estimated population that speaks each language
  • The estimated population that writes each language

These are all extracted from the Unicode CLDR data package, version 40, plus a few additional language names that fill in gaps in CLDR.

Caveats

  • The estimates for "writing population" are often overestimates, as described in the CLDR documentation on territory data. In most cases, they are derived from published data about literacy rates in the places where those languages are spoken. This doesn't take into account that many literate people around the world speak a language that isn't typically written, and write in a different language.

  • The writing systems of Chinese erase most (but not all) of the distinctions between spoken Chinese languages. You'll see separate estimates of the writing population for Cantonese, Mandarin, Wu, and so on, even though you'll likely consider these all to be zh when written.

  • CLDR doesn't have language population data for sign languages. Sign languages end up with a speaking_population() and writing_population() of 0, and I suppose that is literally true, but there's no data from which we could provide a signing_population() method.

Dependencies

language_data has a dependency on the marisa-trie package so that it can load a compact, efficient data structure for looking up language names.

Installation

language_data is usually installed as a dependency of langcodes, and doesn't make much sense without it. You can pip install language_data anyway if you want.

To install the language_data package in editable mode, run poetry install in the package root. (This is the equivalent of pip install -e ., which will hopefully become compatible again soon via PEP 660.)

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

language_data-1.1.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

language_data-1.1-py3-none-any.whl (4.9 MB view details)

Uploaded Python 3

File details

Details for the file language_data-1.1.tar.gz.

File metadata

  • Download URL: language_data-1.1.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-7620-generic

File hashes

Hashes for language_data-1.1.tar.gz
Algorithm Hash digest
SHA256 c1f5283c46bba68befa37505857a3f672497aba0c522b37d99367e911232455b
MD5 75ea158be78983b0a858e6e157bcfa3a
BLAKE2b-256 f4efb2176538ebb01ac7c08b29c9d8cf878275ff98a4e717c57ee8123c373424

See more details on using hashes here.

File details

Details for the file language_data-1.1-py3-none-any.whl.

File metadata

  • Download URL: language_data-1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-7620-generic

File hashes

Hashes for language_data-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f7ba86fafe099ef213ef597eda483d5227b12446604a61f617122d6c925847d5
MD5 53024a91a5349cf3822f303141fa929d
BLAKE2b-256 7396053c710a9d1df31cce0025e1050e924083acf231e3eadbeadf5d696bf370

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