Skip to content

bmanolov/hyphenator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A helper to hyphenate Bulgarian words.

Usage in PHP code

$word = 'котарак';

$hyphenator = new BgHyphenator();
echo $hyphenator->getSyllables($word);// ко-та-рак

$hyphenator2 = new BgHyphenator('~');
echo $hyphenator2->getSyllables($word);// ко~та~рак

$words = ['котарак', 'самосвал'];
echo implode(", ", $hyphenator->getSyllablesForWords($words)); // ко-та-рак, са-мос-вал

Usage with a shell script

bin/hyphenate.php <word> [<word2> <word3> ...]

The hyphenated words are printed to the standard output.

OR

bin/hyphenate.php <file>

The source words are read from the given file. The hyphenated words are written to a new file with the extension 'hyphenated', e.g. if the source file is under /tmp/words then the result is written into /tmp/words.hyphenated

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published