Skip to content

gold-silver-copper/interslavic-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inflector for the Interslavic language

Crates.io Documentation License Downloads

This crate provides a decliner/conjugator/inflector for Interslavic.

It uses data from the official dictionary at https://interslavic-dictionary.com/

Sample usage:

use interslavic::*;
fn main() {
    let mut inflector = ISV::default();
    //if you do not initialize the dictionary, animate nouns will not be inflected correctly, nor will words with irregular stems
    inflector.initialize_dictionary("isv_words.csv");

    let noun = inflector.decline_noun("mųž", &Case::Gen, &Number::Singular);
    //the output is a tuple of a string and gender
    println!("{:#?}", noun.0);
    //output: mųža

    let adj = inflector.decline_adj(
        "samy",
        &Case::Gen,
        &Number::Singular,
        &Gender::Masculine,
        true,
    );
       //the output is just a string
    println!("{:#?}", adj);
    //output: samogo


    let verbik = "učiti";


    let verb = inflector.conjugate_verb(
            verbik,
            &Person::First,
            &Number::Singular,
            &Gender::Feminine,
            &Tense::Present,
    );
    println!("{:#?}", verb);
    //output: učų



    let lik = inflector.l_participle("buditi", &Gender::Feminine, &Number::Singular);
    println!("{:#?}", lik);
    //output: budila


}

About

interslavic utils in rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages