A simple but working Finnish language hyphenator.
By Pyry Kontio a.k.a Drasa (Drasa@IRCnet, pyry.kontio@drasa.eu)
Hyphenates Finnish text with Unicode soft hyphens. (U+00AD) Mainly intended for server- side-hyphenation of web sites.
Allows to set hyphenation-preventing character margins for words so that they won’t break right at the start or the end. (For example, it’d be a bit silly - although certainly possible in Finnish language - to break a word like ‘erikoinen’ at ‘e-rikoinen’. With default margin of 2, it breaks more stylistically pleasingly, ‘eri-koinen’.)
Hyphenated html tags break web sites, so there’s the boolean argument skip_html. That enabled, it skips over all the words that are contained between “<” and “>” characters.
Usage: as a standalone script:
hyphenate_finnish.py [margin] [text]
or as a Python module:
from hyphenate_finnish import hyphenate; hyphenate(“some text but <html> isn’t gonna get hyphenated!”, margin=1, skip_html=True)
It’s that simple. By the way, written in Py3k, but it seems to work with 2.7 too.
Licensed with LGPL.
Metadata
Release files for hyphenate_finnish 1.3.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 | |
|---|---|---|---|---|
| hyphenate_finnish-1.3.0.tar.gz | 9.1 kB | Without provenance | Details |
Release files / hyphenate_finnish-1.3.0.tar.gz
| Download URL | hyphenate_finnish-1.3.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6eba9c892e6909ec4b5f3ad366948edd32ec79107754b06ac11a06fb40a023ab
|
|
BLAKE2b-256 checksum How to use checksums |
29c34adfd57a2e3fe75a0b833a82f861ac73f72e1ea735c3393862b9f77f98b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for hyphenate_finnish 1.3.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.