Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henchc/syllabipy
universal syllabification algorithms
https://github.com/henchc/syllabipy
Last synced: 3 months ago
JSON representation
universal syllabification algorithms
- Host: GitHub
- URL: https://github.com/henchc/syllabipy
- Owner: henchc
- License: mit
- Created: 2016-04-24T17:32:23.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-25T13:25:19.000Z (almost 2 years ago)
- Last Synced: 2024-07-19T09:16:21.563Z (4 months ago)
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 42
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- low-resource-languages - SyllabiPy - Python interface for universal syllabification algorithms (Software / Utilities)
README
# syllabipy
Collection of syllabification algorithms designed to be universal, aimed at low-resource languages without look-up techniques.*Note: SonoriPy has been incorporated into [NLTK](https://github.com/nltk/nltk/blob/develop/nltk/tokenize/sonority_sequencing.py) for Python; LegaliPy and SonoriPy have been incorporated into [Talisman](https://github.com/Yomguithereal/talisman) for JavaScript. This repo will not be updated, we recommend you use one of these two libraries.*
## installation
syllabipy can be installed with `pip`:
~~~
$ pip install syllabipy
~~~### LegaliPy
To get legal onsets for variable `text`:
~~~
>>> from syllabipy.legalipy import getOnsets
>>> getOnsets(text)
~~~To syllabify a word:
~~~
>>> from syllabipy.legalipy import LegaliPy
>>> LegaliPy(word, getOnsets(text))
~~~Command line usage to syllabify a text file:
~~~
$ python legalipy.py text.txt
~~~### SonoriPy
To syllabify a word:
~~~
>>> from syllabipy.sonoripy import SonoriPy
>>> SonoriPy("justification")
['jus', 'ti', 'fi', 'ca', 'tion']
~~~Command line usage to syllabify a text file:
~~~
$ python sonoripy.py text.txt
~~~