Skip to content

A pure Rust port of Pyphen, a Python hyphenation library

License

Unknown and 3 other licenses found

Licenses found

Unknown
COPYING
GPL-2.0
COPYING.GPL
LGPL-2.1
COPYING.LGPL
Unknown
COPYING.MPL
Notifications You must be signed in to change notification settings

nareshganduri/pyphen-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

pyphen-rs

A pure Rust port of Python's Pyphen library.

Usage

use pyphen_rs;

assert_eq!(pyphen_rs::language_fallback("nl_NL_variant1").unwrap(), "nl_NL");

pyphen_rs::LANGUAGES.with(|l|) {
    assert!(l.borrow().contains_key("nl_NL"));
};

let dic = pyphen_rs::Builder::lang("nl_NL").build().unwrap();
assert_eq!(dic.inserted("lettergrepen"), "let-ter-gre-pen");

let wrap = dic.wrap("autobandventieldopje", 11); // Some(("autoband-", "ventieldopje"))
let iter = dic.iterate("Amsterdam"):
iter.next(); // Some(("Amster", "dam"))
iter.next(); // Some(("Am", "sterdam"))
iter.next(); // None

License

Pyphen-rs is released under the GPL 2.0+/LGPL 2.1+/MPL 1.1 tri-license. See COPYING.GPL, COPYING.LGPL and COPYING.MPL for more details.

About

A pure Rust port of Pyphen, a Python hyphenation library

Topics

Resources

License

Unknown and 3 other licenses found

Licenses found

Unknown
COPYING
GPL-2.0
COPYING.GPL
LGPL-2.1
COPYING.LGPL
Unknown
COPYING.MPL

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages