ipapy
ipapy is a Python module to work with IPA strings.
Version: 0.0.1
Date: 2016-05-13
Developer: Alberto Pettarin
License: the MIT License (MIT)
Contact: click here
Installation
$ pip install ipapy
or
$ git clone https://github.com/pettarin/ipapy.git
$ cd ipapy
Usage
from ipapy.ipastring import IPAString
from ipapy.ipachar import IPADiacritic
# Unicode string for "Italian style"
s = u"iˈtaljans ˈtail"
# check if s contains only IPA characters (yes)
if IPAString.is_valid_ipa(s):
print("s is a valid IPA string")
# create IPA string from Unicode string
s_ipa = IPAString(unicode_string=s)
# print the IPAString
print(unicode(s_ipa)) # Python 2
print(s_ipa) # Python 3
# print the IPAString (Python 3)
print(s_ipa)
# new IPAStrings containing only...
s_cv = s.cns_vwl # vowels and consonants
s_cvs = s.cns_vwl_str # + stress marks
s_cvsl = s.cns_vwl_str_len # + lenght marks
s_cvslw = s.cns_vwl_str_len_wb # + word breaks
# iterate over each IPA char, print it, and,
# if it is a diacritic, print its properties
for c_ipa in s_ipa:
print(c_ipa)
if isinstance(c_ipa, IPADiacritic):
print(c_ipa.properties)
# print the name and properties of all the vowels in the string
for c_ipa in [c for c in s_ipa if c.is_vowel]:
print(u"%s => %s" % (c_ipa, c_ipa.name))
# print the name and properties of all the consonants in the string
for c_ipa in [c for c in s_ipa if c.is_consonant]:
print(u"%s => %s" % (c_ipa, c_ipa.name))
License
ipapy is released under the MIT License.
Metadata
Release files for ipapy 0.0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ipapy-0.0.1.0.tar.gz | 32.4 kB | Without provenance | Details for ipapy-0.0.1.0.tar.gz |
Release files / ipapy-0.0.1.0.tar.gz
| Download URL | ipapy-0.0.1.0.tar.gz |
|---|---|
| Size | 32.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdb7f47be21f99a31767c7c02b5666442b492e2c145c29d642a5f822d864f6ca
|
|
BLAKE2b-256 checksum How to use checksums |
fc452851945ee8f9c86b16c5be1bc12375d6f3c8a4607baec00e75bf096c5615
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ipapy 0.0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.