extern crate rsmorphy;
use rsmorphy::{prelude::*, rsmorphy_dict_ru};
pub mod util;
fn main() {
let morph_ru = MorphAnalyzer::from_file(rsmorphy_dict_ru::DICT_PATH);
let apple = Lex::from_id(&morph_ru, "ru:d:яблоко,22c").unwrap();
let bread = Lex::from_id(&morph_ru, "ru:d:хлеб,878").unwrap();
let ablt_set = GrammemeSet::new("ablt");
println!(
" ::: {} {} + {} {} = {} {}",
1,
apple.get_plural(&morph_ru, 1).unwrap(),
4,
apple.get_plural(&morph_ru, 4).unwrap(),
5,
apple.get_plural(&morph_ru, 5).unwrap(),
);
println!(
" ::: {} {} - {} {} = {} {}",
102,
apple.get_plural(&morph_ru, 102).unwrap(),
11,
apple.get_plural(&morph_ru, 11).unwrap(),
91,
apple.get_plural(&morph_ru, 91).unwrap(),
);
println!(
" ::: {} {} сыт не будешь",
1,
apple
.inflect(&morph_ru, &ablt_set)
.unwrap()
.get_plural(&morph_ru, 1)
.unwrap(),
);
println!(
" ::: накормил {} {}",
2,
bread
.inflect(&morph_ru, &ablt_set)
.unwrap()
.get_plural(&morph_ru, 2)
.unwrap(),
);
}