Quickstart
pip install pyfoma
from pyfoma import FST
myfst = FST.re("(cl|n|s)?e(ve|a)r")
myfst.view()
What's new
- Mar 2026: added SKILL.md for creating morphological analyzers
- Mar 2026: added support for parsing and approximation of CFGs
- Feb 2026: pyfoma.js port allows PyFoma regex compilation, visualization, and testing in the browser
- Feb 2026: added support for lexd
Core documentation
- Regular Expression Compiler
- Introduction to lexd
- Morphological Analyzer Tutorial
- CFG Parsing
- CFG Approximation
Contributing
pip install -e .
# Build Cython modules
python setup.py build_ext --inplace
Rebuilding the documentation
brew install sphinx-doc # if not installed
# Update automatically-scraped docs
sphinx-apidoc -o docs src/pyfoma/
# Rebuild docs
cd docs
make html
Citation
@inproceedings{hulden-etal-2024-pyfoma,
title = "{P}y{F}oma: a Python finite-state compiler module",
author = "Hulden, Mans and Ginn, Michael and Silfverberg, Miikka and Hammond, Michael",
editor = "Cao, Yixin and Feng, Yang and Xiong, Deyi",
booktitle = "Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations)",
year = "2024",
address = "Bangkok, Thailand",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2024.acl-demos.24",
doi = "10.18653/v1/2024.acl-demos.24",
pages = "258--265"
}
Metadata
Release files for pyfoma 1.1.1
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 |
|---|---|---|---|---|
| pyfoma-1.1.1.tar.gz | 89.9 kB | Without provenance | Details for pyfoma-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyfoma-1.1.1-cp310-cp310-macosx_26_0_arm64.whl | CPython 3.10 | CPython 3.10 | macOS 26.0+ ARM64 | Details for pyfoma-1.1.1-cp310-cp310-macosx_26_0_arm64.whl |
Total release size: 462.1 kB
Release files / pyfoma-1.1.1.tar.gz
| Download URL | pyfoma-1.1.1.tar.gz |
|---|---|
| Size | 89.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c6327460febc191cafbaf3092a771f94c89370522a3709d85b0906347e854aa
|
|
BLAKE2b-256 checksum How to use checksums |
56a048679e18a46bb4568c85b1bcce3ed4382798efccd0d92b83848c510f72a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / pyfoma-1.1.1-cp310-cp310-macosx_26_0_arm64.whl
| Download URL | pyfoma-1.1.1-cp310-cp310-macosx_26_0_arm64.whl |
|---|---|
| Size | 372.2 kB |
| Tags | CPython 3.10 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
06124c6829deb41acb7ebb233826ad85b2c1cad8317024cd7eca22a1ea33bb01
|
|
BLAKE2b-256 checksum How to use checksums |
26d2be277cd7f5af9808b1724b94e0572b427f5287f1284a64577d9311670a6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Security for pyfoma 1.1.1
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.