# foma_bindings: Foma Python Bindings
These are python bindings for `foma`, [a finite-state toolkit](https://fomafst.github.io/) developed by [Dr. Mans Hulden](https://www.colorado.edu/linguistics/mans-hulden). These bindings are a subset of the functionality of `foma`, and are a modification of the file(s) in the `python` folder in the above `foma` repo. Those file(s) are edited, expanded, cleaned up, and packaged for distribution through `pip`; the changes made are listed below.
For additional functionality, please feel free to open up an issue [on our github page](https://github.com/CultureFoundryCA/foma_bindings) describing what you'd like to see, how this is currently accomplished in `foma`, and the reasons why you would like to see this functionality. Feel free to fork this repo and implement the changes yourself as well, and make a pull request and we'll merge it in.
This package is maintained by [CultureFoundry](https://www.culturefoundrystudios.com/) and created in conjunction with [Dr. Miikka Silfverberg](https://linguistics.ubc.ca/profile/miikka-silfverberg/https://linguistics.ubc.ca/profile/miikka-silfverberg/).
## The Bindings
Here is an example of how to use these bindings:
```python
from foma_bindings.fst import Fst
fst = Fst.load("/path/to/compiled/fst.fomabin")
for tagged_word in fst.apply_up("foxes", flags=Fst.TOKENIZE | Fst.PRINT_FLAGS)
print(tagged_word)
```
## Acknowledgements
Firstly, we would like to acknowledge the extensive work of [Dr. Mans Hulden](https://www.colorado.edu/linguistics/mans-hulden) on the entire `foma` software suite; that software [can be found here](https://fomafst.github.io/). These python bindings only exist because the software that Dr. Hulden wrote is so robust for language use.
Secondly, we would like to acknowledge the work of [Dr. Miikka Silfverberg](https://linguistics.ubc.ca/profile/miikka-silfverberg/https://linguistics.ubc.ca/profile/miikka-silfverberg/). Dr. Silfverberg has extensive experience and knowledge of `foma`, and has been instrumental not only in CultureFoundry's adoption of it in our language programs, but also in working with us to adapt and expand these python bindings to further `foma`'s usability going forward. We hope he will be here to help us, and thereby the communities we are working with, for a long time to come!
## Changelog
### Changes from the original file as part of the Mans Hulden foma repo:
- extensive readability edits have been made, including splitting classes into separate files, alphabetizing the C API mappings, and extensive renaming of function and variable names
- `get_alphabet` and the aliased `get_sigma` functions have been added
- the multi-tape FST class/section has been entirely commented out for now
- additional printing parameters have been added, such as printing with flags included
- the files have been made ready for distribution on `pip`
- apache copyright notices have been added to all the relevant python files
- add query function
- add function to get the flag diacritics
### 0.1.10
- add `query_with_head_tags` function to replace `query` function
- add 2 month deprecation warning for `query` function
Raw data
{
"_id": null,
"home_page": "https://github.com/CultureFoundryCA/foma_bindings",
"name": "foma-bindings",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.10",
"maintainer_email": null,
"keywords": "foma, xfst, hfst, fst, fsm, mtfst, mtfsm",
"author": "CultureFoundry",
"author_email": "info@culturefoundrystudios.com",
"download_url": "https://files.pythonhosted.org/packages/d5/02/d3ab42f82f9e4377e9152fcdadb5aef91cf68d325e1625042e340727cfc8/foma_bindings-0.1.10.tar.gz",
"platform": null,
"description": "# foma_bindings: Foma Python Bindings\n\nThese are python bindings for `foma`, [a finite-state toolkit](https://fomafst.github.io/) developed by [Dr. Mans Hulden](https://www.colorado.edu/linguistics/mans-hulden). These bindings are a subset of the functionality of `foma`, and are a modification of the file(s) in the `python` folder in the above `foma` repo. Those file(s) are edited, expanded, cleaned up, and packaged for distribution through `pip`; the changes made are listed below. \n\nFor additional functionality, please feel free to open up an issue [on our github page](https://github.com/CultureFoundryCA/foma_bindings) describing what you'd like to see, how this is currently accomplished in `foma`, and the reasons why you would like to see this functionality. Feel free to fork this repo and implement the changes yourself as well, and make a pull request and we'll merge it in.\n\nThis package is maintained by [CultureFoundry](https://www.culturefoundrystudios.com/) and created in conjunction with [Dr. Miikka Silfverberg](https://linguistics.ubc.ca/profile/miikka-silfverberg/https://linguistics.ubc.ca/profile/miikka-silfverberg/).\n\n## The Bindings\n\nHere is an example of how to use these bindings:\n\n```python\nfrom foma_bindings.fst import Fst\n\nfst = Fst.load(\"/path/to/compiled/fst.fomabin\")\n\nfor tagged_word in fst.apply_up(\"foxes\", flags=Fst.TOKENIZE | Fst.PRINT_FLAGS)\n print(tagged_word)\n```\n\n## Acknowledgements\n\nFirstly, we would like to acknowledge the extensive work of [Dr. Mans Hulden](https://www.colorado.edu/linguistics/mans-hulden) on the entire `foma` software suite; that software [can be found here](https://fomafst.github.io/). These python bindings only exist because the software that Dr. Hulden wrote is so robust for language use.\n\nSecondly, we would like to acknowledge the work of [Dr. Miikka Silfverberg](https://linguistics.ubc.ca/profile/miikka-silfverberg/https://linguistics.ubc.ca/profile/miikka-silfverberg/). Dr. Silfverberg has extensive experience and knowledge of `foma`, and has been instrumental not only in CultureFoundry's adoption of it in our language programs, but also in working with us to adapt and expand these python bindings to further `foma`'s usability going forward. We hope he will be here to help us, and thereby the communities we are working with, for a long time to come!\n\n## Changelog\n\n### Changes from the original file as part of the Mans Hulden foma repo:\n\n- extensive readability edits have been made, including splitting classes into separate files, alphabetizing the C API mappings, and extensive renaming of function and variable names\n- `get_alphabet` and the aliased `get_sigma` functions have been added\n- the multi-tape FST class/section has been entirely commented out for now\n- additional printing parameters have been added, such as printing with flags included\n- the files have been made ready for distribution on `pip`\n- apache copyright notices have been added to all the relevant python files\n- add query function\n- add function to get the flag diacritics\n\n### 0.1.10\n\n- add `query_with_head_tags` function to replace `query` function\n- add 2 month deprecation warning for `query` function\n\n\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Python bindings for the foma finite-state technology suite",
"version": "0.1.10",
"project_urls": {
"Homepage": "https://github.com/CultureFoundryCA/foma_bindings"
},
"split_keywords": [
"foma",
" xfst",
" hfst",
" fst",
" fsm",
" mtfst",
" mtfsm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "01cc6386bad1f6327cce2de8dcb1df12bdbdbe5f1f3730e4f702eb8181da45f9",
"md5": "6824acc3878ce0a4dbde55dbafcc12fe",
"sha256": "58a819d7adbf648c8afb73ef6a9f3c14f05199fb132723d8ea53d2ede976d021"
},
"downloads": -1,
"filename": "foma_bindings-0.1.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6824acc3878ce0a4dbde55dbafcc12fe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.10",
"size": 15802,
"upload_time": "2024-04-29T17:39:45",
"upload_time_iso_8601": "2024-04-29T17:39:45.266051Z",
"url": "https://files.pythonhosted.org/packages/01/cc/6386bad1f6327cce2de8dcb1df12bdbdbe5f1f3730e4f702eb8181da45f9/foma_bindings-0.1.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d502d3ab42f82f9e4377e9152fcdadb5aef91cf68d325e1625042e340727cfc8",
"md5": "44afcfb54172a82d4cdc195c013e11bd",
"sha256": "482de60ff46bec8f5e59311829a6105bfc2046afe460a0fe2ddb6210338d4222"
},
"downloads": -1,
"filename": "foma_bindings-0.1.10.tar.gz",
"has_sig": false,
"md5_digest": "44afcfb54172a82d4cdc195c013e11bd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.10",
"size": 15149,
"upload_time": "2024-04-29T17:39:47",
"upload_time_iso_8601": "2024-04-29T17:39:47.822667Z",
"url": "https://files.pythonhosted.org/packages/d5/02/d3ab42f82f9e4377e9152fcdadb5aef91cf68d325e1625042e340727cfc8/foma_bindings-0.1.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-29 17:39:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "CultureFoundryCA",
"github_project": "foma_bindings",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "foma-bindings"
}