[][src]Module voikko_rs::voikko

This module provides Rust bindings for libvoikko.

Libvoikko provides spell checking, hyphenation, grammar checking and morphological analysis for the Finnish language.

voikko-rs requires libvoikko (version 4.1.1 or greater) to be installed on your system.

Example

extern crate voikko_rs; // in Rust 2015
use voikko_rs::voikko;

fn main() {
    let v = voikko::Voikko::new("fi-x-morphoid", None).unwrap();
    println!("{}", v.hyphenate("kunnallispolitiikka", "-").unwrap());
}

The above prints:

kun-nal-lis-po-li-tiik-ka

Structs

Dictionary

Information about an available dictionary

GrammarError

Grammar error

InitError
Sentence

A sentence

Token

Tokenization unit

Voikko

A Voikko instance

Enums

SentenceType

Type of a following sentence

SpellReturn

A spell check return value

TokenType

Functions

list_dicts

Get a list of available dictionaries. Returns a vector of Dictionary structs.

list_supported_grammar_checking_languages

Same as list_supported_spelling_languages() but for grammar checking.

list_supported_hyphenation_languages

Same as list_supported_spelling_languages() but for hyphenation.

list_supported_spelling_languages

Return a list of language codes representing the languages for which at least one dictionary is available for spell checking. The codes conform to those specified in BCP 47. Typically the returned codes consist of only BCP 47 language subtags. They may also include tags in format Language-Script, Language-Region, or Language-Script-Region if such variants are widely used for a particular language.

version

Returns the version number of libvoikko.

Type Definitions

Analysis

A morphological analysis item