foma-py
Python bindings for Foma
This is a foma interface implemented in Python. Requires libfoma installed.
Installation
From PyPI:
pip install foma
From source:
git clone https://github.com/GooDeeJaY/foma-py.git
cd foma-py
python -m pip install .
Basic usage
from foma import FST
fst = FST.load("path_to_model")
fst.apply_up("example")
fst.apply_down("example")
Other modules:
attapply
This is a stand-alone Python utility for reading AT&T files and applying transductions. Useful for minimizing dependencies. Also supports weighted transducers, in which case apply() returns output strings in least-cost order.
TODO: Add basic usage
phonrule
This is a simple helper tool for debugging foma-scripts that are sequences of phonological rules meant to apply in a certain order. It assumes a grammar is written as a sequence of define-statements and ordered rewrite-rules combined with a chain-statement (simulating composition of the rules). It then passes words from STDIN through the sequence of transducers and prints a decorated output to STDOUT where rules that fire are shown between brackets.
TODO: Add basic usage
foma2js
This is a port of foma/contrib/foma2js.perl to Python 3. Get the help using foma2js.py -h. Everything else like in the original program.
TODO: Add basic usage
Forked from mhulden/foma/python
Metadata
Release files for foma 1.0.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 |
|---|---|---|---|---|
| foma-1.0.0.tar.gz | 12.9 kB | Without provenance | Details for foma-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| foma-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for foma-1.0.0-py3-none-any.whl |
Total release size: 26.2 kB
Release files / foma-1.0.0.tar.gz
| Download URL | foma-1.0.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15692f1f0519ae4e32dd1776175e563c71e5c093a4040c4a141e2ee196b60389
|
|
BLAKE2b-256 checksum How to use checksums |
6009152a5351a7c98dfa339b0549a5d80fa83959aec484842ee093997e4fbdce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / foma-1.0.0-py3-none-any.whl
| Download URL | foma-1.0.0-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c7aa7968fdf731ac48e5ab724a81610cbc4ab25d4ebfb34aeef1bab523ed3ac
|
|
BLAKE2b-256 checksum How to use checksums |
81cbdb683e9682e5ddac9637a4321671ea2a177cd4ae7175cc078fd878e695ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for foma 1.0.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.