Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A simple but working Finnish language hyphenator.

Project Description

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.

Release History

Release History

This version
History Node

1.3.0

History Node

1.2.0

History Node

1.1.5

History Node

1.1.4

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
hyphenate_finnish-1.3.0.tar.gz (9.1 kB) Copy SHA256 Checksum SHA256 Source Mar 10, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting