Lingua::FI::Hyphenate - Finnish hyphenation (suomen tavutus)
Lingua::FI::Hyphenate - suomen tavutus
use Lingua::FI::Hyphenate qw(tavuta); my @tavut = tavuta("kodeissansakaan"); print "@tavut\n"; # will print "ko deis san sa kaan\n";
use Lingua::FI::Hyphenate qw(tavuta); my @tavut = tavuta("kodeissansakaan"); print "@tavut\n"; # tulostaa "ko deis san sa kaan\n";
tavuta() returns as a list the syllables of its Finnish input list.
The used character set is ISO 8859-1, of which the Finnish word characters the vowels are
aeiouyäåö AEIOUYÅÄÖ
and the consonants are
bcdfghjklmnpqrstvwxz BCDFGHJKLMNPQRSTVWXZ
The rules for syllable divisions are:
Before any consonant-vowel pair except when the said consonant is the latter consonant of a syllable-initial consonant-consonant pair.
Between any vowel-vowel pair except when the vowel pair is a Finnish diphthong, that is any of the ai au ei eu ey ie iu iy oi ou ui uo yi yö äi äy öi öy.
tavuta() palauttaa listana suomenkielisen syötelistansa tavut.
Käytetty merkistö on ISO 8859-1, suomenkieliset vokaalit ovat
ja konsonantit ovat
Tavujakosäännöt ovat:
Ennen jokaista konsonantti-vokaali-paria paitsi kun mainittu konsonantti on tavunalkuisen konsonantti-konsonantti-parin jälkimmäinen.
Jokaisen vokaali-vokaali-parin välissä paitsi kun vokaalipari on suomen diftongi, eli jokin seuraavista: ai au ei eu ey ie iu iy oi ou ui uo yi yö äi äy öi öy.
tavuta() works only for single words. Compound words may get wrongly hyphenated, especially when the first component ends in a consonant and the second component begins with a vowel. For example, "kaivosaukko" ('the opening of a mine', compound of "kaivos", 'mine', and "aukko", 'opening') will be wrongly hyphenated as "kai-vo-sauk-ko" ('well otter'). Caveat hyphenator.
You may hint the correct word/syllable division by inserting a "-" at the right places. In fact, any non-Finnish word characters are removed and replaced with syllable divisions.
tavuta() toimii vain yksittäisille sanoille. Sanaliitot saattavat tavuttua väärin, varsinkin jos ensimmäinen osa päättyy konsonanttiin ja toinen osa alkaa vokaalilla. Esimerkiksi "kaivosaukko" tavuttuu väärin: "kai-vo-sauk-ko". Tarkkavaisuutta tavutukseen.
Voit antaa tavutusvihjeitä käyttämällä "-"-merkkiä sopivissa kohdissa. Itse asiassa kaikki paitsi kirjaimet poistetaan ja korvataan tavurajoilla.
Jarkko Hietaniemi <jhi@iki.fi>
Copyright 2001 Jarkko Hietaniemi
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Tämä kirjastomoduli on vapaa; voit jakaa ja/tai muuttaa sitä samojen ehtojen mukaisesti kuin Perliä itseään.
2 POD Errors
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'KÄYTTÖ'. Assuming CP1252
You forgot a '=back' before '=head1'
To install Lingua::FI::Hyphenate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::FI::Hyphenate
CPAN shell
perl -MCPAN -e shell install Lingua::FI::Hyphenate
For more information on module installation, please visit the detailed CPAN module installation guide.