Python bindings for Foma
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file foma-1.0.0.tar.gz.
File metadata
- Download URL: foma-1.0.0.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15692f1f0519ae4e32dd1776175e563c71e5c093a4040c4a141e2ee196b60389
|
|
| MD5 |
23ae234df84bd20a7793360a28baffce
|
|
| BLAKE2b-256 |
6009152a5351a7c98dfa339b0549a5d80fa83959aec484842ee093997e4fbdce
|
File details
Details for the file foma-1.0.0-py3-none-any.whl.
File metadata
- Download URL: foma-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c7aa7968fdf731ac48e5ab724a81610cbc4ab25d4ebfb34aeef1bab523ed3ac
|
|
| MD5 |
c0923b7d7fcf3955a9d079fbbbacab41
|
|
| BLAKE2b-256 |
81cbdb683e9682e5ddac9637a4321671ea2a177cd4ae7175cc078fd878e695ff
|