Skip to main content

No project description provided

Project description

panphon2

PanPhon2 is a more performant version of Python PanPhon being written in Rust (and depending on rspanphon. It does not have all of the functionality of PanPhon, but it should be much faster.

The main class in PanPhon2 is FeatureTable. To instantiate a FeatureTable, the following is sufficient:

>>> import panphon2
>>> ft = panphon2.FeatureTable()

FeatureTable currenly has these methods:

phonemes(str) -> [str] Takes a string in IPA and returns a list of phonemes.

phonemes_to_vectors([str]) -> [[int]] Takes a list of phonemes and returns a list of list of numeric feature values.

word_to_vectors(str) -> [[int]] Takes an IPA string and returns a list of lists of numberic feature values.

feature_edit_distance(str, str) -> float Takes two IPA strings and returns the feature-weighted distance between them.

word_to_bag_of_features Takes an IPA string and returns a vector of the sums of each dimension in the feature vectors corresponding to the phonemes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

panphon2-0.3.3-cp311-cp311-macosx_11_0_arm64.whl (263.4 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

panphon2-0.3.3-cp310-cp310-macosx_11_0_arm64.whl (260.7 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

panphon2-0.3.3-cp38-cp38-macosx_11_0_arm64.whl (240.7 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

panphon2-0.3.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

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