Skip to main content

Conjugation

Struct Conjugation 

Source
pub struct Conjugation;
Expand description

Generates all conjugated forms of Persian verbs.

Each verb is described by two roots:

  • ri — بن ماضی (past root, e.g. "دید")
  • rii — بن مضارع (present root, e.g. "بین")

§Examples

use rustam::Conjugation;

let c = Conjugation;
assert_eq!(c.perfective_past("دید"), vec!["دیدم", "دیدی", "دید", "دیدیم", "دیدید", "دیدند"]);
assert_eq!(c.imperfective_present("بین"), vec!["می‌بینم", "می‌بینی", "می‌بیند", "می‌بینیم", "می‌بینید", "می‌بینند"]);

Implementations§

Source§

impl Conjugation

Source

pub fn perfective_past(&self, ri: &str) -> Vec<String>

Returns simple past (گذشتهٔ مطلق) forms for the given past root.

Source

pub fn negative_perfective_past(&self, ri: &str) -> Vec<String>

Returns negative simple past forms for the given past root.

Source

pub fn passive_perfective_past(&self, ri: &str) -> Vec<String>

Returns passive simple past forms for the given past root.

Source

pub fn negative_passive_perfective_past(&self, ri: &str) -> Vec<String>

Returns negative passive simple past forms for the given past root.

Source

pub fn imperfective_past(&self, ri: &str) -> Vec<String>

Returns habitual past (گذشتهٔ پایا) forms with می‌ prefix.

Source

pub fn negative_imperfective_past(&self, ri: &str) -> Vec<String>

Returns negative habitual past forms with نمی‌ prefix.

Source

pub fn passive_imperfective_past(&self, ri: &str) -> Vec<String>

Returns passive habitual past forms for the given past root.

Source

pub fn negative_passive_imperfective_past(&self, ri: &str) -> Vec<String>

Returns negative passive habitual past forms for the given past root.

Source

pub fn past_progressive(&self, ri: &str) -> Vec<String>

Returns past progressive (گذشتهٔ استمراری) forms using داشت auxiliary.

Source

pub fn passive_past_progressive(&self, ri: &str) -> Vec<String>

Returns passive past progressive forms for the given past root.

Source

pub fn present_perfect(&self, ri: &str) -> Vec<String>

Returns present perfect (حال کامل) forms for the given past root.

Source

pub fn negative_present_perfect(&self, ri: &str) -> Vec<String>

Returns negative present perfect forms for the given past root.

Source

pub fn subjunctive_present_perfect(&self, ri: &str) -> Vec<String>

Returns subjunctive present perfect forms for the given past root.

Source

pub fn negative_subjunctive_present_perfect(&self, ri: &str) -> Vec<String>

Returns negative subjunctive present perfect forms for the given past root.

Source

pub fn grammatical_present_perfect(&self, ri: &str) -> Vec<String>

Returns grammatical (imperative-style) present perfect forms for the given past root.

Source

pub fn negative_grammatical_present_perfect(&self, ri: &str) -> Vec<String>

Returns negative grammatical present perfect forms for the given past root.

Source

pub fn passive_present_perfect(&self, ri: &str) -> Vec<String>

Returns passive present perfect forms for the given past root.

Source

pub fn negative_passive_present_perfect(&self, ri: &str) -> Vec<String>

Returns negative passive present perfect forms for the given past root.

Source

pub fn passive_subjunctive_present_perfect(&self, ri: &str) -> Vec<String>

Returns passive subjunctive present perfect forms for the given past root.

Source

pub fn negative_passive_subjunctive_present_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative passive subjunctive present perfect forms for the given past root.

Source

pub fn passive_grammatical_present_perfect(&self, ri: &str) -> Vec<String>

Returns passive grammatical present perfect forms for the given past root.

Source

pub fn negative_passive_grammatical_present_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative passive grammatical present perfect forms for the given past root.

Source

pub fn imperfective_present_perfect(&self, ri: &str) -> Vec<String>

Returns imperfective present perfect (حال کامل پایا) forms with می‌ prefix.

Source

pub fn negative_imperfective_present_perfect(&self, ri: &str) -> Vec<String>

Returns negative imperfective present perfect forms with نمی‌ prefix.

Source

pub fn subjunctive_imperfective_present_perfect(&self, ri: &str) -> Vec<String>

Returns subjunctive imperfective present perfect forms for the given past root.

Source

pub fn negative_subjunctive_imperfective_present_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative subjunctive imperfective present perfect forms for the given past root.

Source

pub fn passive_imperfective_present_perfect(&self, ri: &str) -> Vec<String>

Returns passive imperfective present perfect forms for the given past root.

Source

pub fn negative_passive_imperfective_present_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative passive imperfective present perfect forms for the given past root.

Source

pub fn passive_subjunctive_imperfective_present_perfect( &self, ri: &str, ) -> Vec<String>

Returns passive subjunctive imperfective present perfect forms for the given past root.

Source

pub fn negative_passive_subjunctive_imperfective_present_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative passive subjunctive imperfective present perfect forms for the given past root.

Source

pub fn present_perfect_progressive(&self, ri: &str) -> Vec<String>

Returns present perfect progressive (حال کامل استمراری) forms using داشت auxiliary.

Source

pub fn passive_present_perfect_progressive(&self, ri: &str) -> Vec<String>

Returns passive present perfect progressive forms for the given past root.

Source

pub fn past_precedent(&self, ri: &str) -> Vec<String>

Returns pluperfect (گذشتهٔ پیشین) forms using بود auxiliary.

Source

pub fn negative_past_precedent(&self, ri: &str) -> Vec<String>

Returns negative pluperfect forms for the given past root.

Source

pub fn passive_past_precedent(&self, ri: &str) -> Vec<String>

Returns passive pluperfect forms for the given past root.

Source

pub fn negative_passive_past_precedent(&self, ri: &str) -> Vec<String>

Returns negative passive pluperfect forms for the given past root.

Source

pub fn imperfective_past_precedent(&self, ri: &str) -> Vec<String>

Returns imperfective pluperfect forms with می‌ prefix.

Source

pub fn negative_imperfective_past_precedent(&self, ri: &str) -> Vec<String>

Returns negative imperfective pluperfect forms with نمی‌ prefix.

Source

pub fn passive_imperfective_past_precedent(&self, ri: &str) -> Vec<String>

Returns passive imperfective pluperfect forms for the given past root.

Source

pub fn negative_passive_imperfective_past_precedent( &self, ri: &str, ) -> Vec<String>

Returns negative passive imperfective pluperfect forms for the given past root.

Source

pub fn past_precedent_progressive(&self, ri: &str) -> Vec<String>

Returns past precedent progressive forms using داشت auxiliary.

Source

pub fn passive_past_precedent_progressive(&self, ri: &str) -> Vec<String>

Returns passive past precedent progressive forms for the given past root.

Source

pub fn past_precedent_perfect(&self, ri: &str) -> Vec<String>

Returns past precedent perfect (گذشتهٔ پیشین کامل) forms for the given past root.

Source

pub fn negative_past_precedent_perfect(&self, ri: &str) -> Vec<String>

Returns negative past precedent perfect forms for the given past root.

Source

pub fn subjunctive_past_precedent_perfect(&self, ri: &str) -> Vec<String>

Returns subjunctive past precedent perfect forms for the given past root.

Source

pub fn negative_subjunctive_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative subjunctive past precedent perfect forms for the given past root.

Source

pub fn grammatical_past_precedent_perfect(&self, ri: &str) -> Vec<String>

Returns grammatical past precedent perfect forms for the given past root.

Source

pub fn negative_grammatical_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative grammatical past precedent perfect forms for the given past root.

Source

pub fn passive_past_precedent_perfect(&self, ri: &str) -> Vec<String>

Returns passive past precedent perfect forms for the given past root.

Source

pub fn negative_passive_past_precedent_perfect(&self, ri: &str) -> Vec<String>

Returns negative passive past precedent perfect forms for the given past root.

Source

pub fn passive_subjunctive_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns passive subjunctive past precedent perfect forms for the given past root.

Source

pub fn negative_passive_subjunctive_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative passive subjunctive past precedent perfect forms for the given past root.

Source

pub fn passive_grammatical_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns passive grammatical past precedent perfect forms for the given past root.

Source

pub fn negative_passive_grammatical_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative passive grammatical past precedent perfect forms for the given past root.

Source

pub fn imperfective_past_precedent_perfect(&self, ri: &str) -> Vec<String>

Returns imperfective past precedent perfect (گذشتهٔ پیشین کامل پایا) forms with می‌ prefix.

Source

pub fn negative_imperfective_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative imperfective past precedent perfect forms with نمی‌ prefix.

Source

pub fn subjunctive_imperfective_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns subjunctive imperfective past precedent perfect forms for the given past root.

Source

pub fn negative_subjunctive_imperfective_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative subjunctive imperfective past precedent perfect forms for the given past root.

Source

pub fn passive_imperfective_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns passive imperfective past precedent perfect forms for the given past root.

Source

pub fn negative_passive_imperfective_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative passive imperfective past precedent perfect forms for the given past root.

Source

pub fn passive_subjunctive_imperfective_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns passive subjunctive imperfective past precedent perfect forms for the given past root.

Source

pub fn negative_passive_subjunctive_imperfective_past_precedent_perfect( &self, ri: &str, ) -> Vec<String>

Returns negative passive subjunctive imperfective past precedent perfect forms for the given past root.

Source

pub fn past_precedent_perfect_progressive(&self, ri: &str) -> Vec<String>

Returns past precedent perfect progressive forms using داشت auxiliary.

Source

pub fn passive_past_precedent_perfect_progressive( &self, ri: &str, ) -> Vec<String>

Returns passive past precedent perfect progressive forms for the given past root.

Source

pub fn perfective_present(&self, rii: &str) -> Vec<String>

Returns simple present (حال مطلق) forms for the given present root.

Source

pub fn negative_perfective_present(&self, rii: &str) -> Vec<String>

Returns negative simple present forms for the given present root.

Source

pub fn subjunctive_perfective_present(&self, rii: &str) -> Vec<String>

Returns subjunctive present forms with ب prefix for the given present root.

Source

pub fn negative_subjunctive_perfective_present(&self, rii: &str) -> Vec<String>

Returns negative subjunctive present forms for the given present root.

Source

pub fn grammatical_perfective_present(&self, rii: &str) -> Vec<String>

Returns imperative (grammatical) present forms for the given present root.

Source

pub fn negative_grammatical_perfective_present(&self, rii: &str) -> Vec<String>

Returns negative imperative (grammatical) present forms for the given present root.

Source

pub fn passive_perfective_present(&self, ri: &str) -> Vec<String>

Returns passive simple present forms for the given past root.

Source

pub fn negative_passive_perfective_present(&self, ri: &str) -> Vec<String>

Returns negative passive simple present forms for the given past root.

Source

pub fn passive_subjunctive_perfective_present(&self, ri: &str) -> Vec<String>

Returns passive subjunctive present forms for the given past root.

Source

pub fn negative_passive_subjunctive_perfective_present( &self, ri: &str, ) -> Vec<String>

Returns negative passive subjunctive present forms for the given past root.

Source

pub fn passive_grammatical_perfective_present(&self, ri: &str) -> Vec<String>

Returns passive grammatical (imperative) present forms for the given past root.

Source

pub fn negative_passive_grammatical_perfective_present( &self, ri: &str, ) -> Vec<String>

Returns negative passive grammatical present forms for the given past root.

Source

pub fn imperfective_present(&self, rii: &str) -> Vec<String>

Returns present habitual (حال پایا) forms with می‌ prefix for the given present root.

Source

pub fn negative_imperfective_present(&self, rii: &str) -> Vec<String>

Returns negative present habitual forms with نمی‌ prefix for the given present root.

Source

pub fn passive_imperfective_present(&self, ri: &str) -> Vec<String>

Returns passive present habitual forms for the given past root.

Source

pub fn negative_passive_imperfective_present(&self, ri: &str) -> Vec<String>

Returns negative passive present habitual forms for the given past root.

Source

pub fn present_progressive(&self, rii: &str) -> Vec<String>

Returns present progressive (حال استمراری) forms using دار auxiliary.

Source

pub fn passive_present_progressive(&self, ri: &str) -> Vec<String>

Returns passive present progressive forms for the given past root.

Source

pub fn perfective_future(&self, ri: &str) -> Vec<String>

Returns simple future (آیندهٔ مطلق) forms using خواه auxiliary.

Source

pub fn negative_perfective_future(&self, ri: &str) -> Vec<String>

Returns negative simple future forms for the given past root.

Source

pub fn passive_perfective_future(&self, ri: &str) -> Vec<String>

Returns passive simple future forms for the given past root.

Source

pub fn negative_passive_perfective_future(&self, ri: &str) -> Vec<String>

Returns negative passive simple future forms for the given past root.

Source

pub fn imperfective_future(&self, ri: &str) -> Vec<String>

Returns future imperfective (آیندهٔ پایا) forms with می‌ prefix.

Source

pub fn negative_imperfective_future(&self, ri: &str) -> Vec<String>

Returns negative future imperfective forms with نمی‌ prefix.

Source

pub fn passive_imperfective_future(&self, ri: &str) -> Vec<String>

Returns passive future imperfective forms for the given past root.

Source

pub fn negative_passive_imperfective_future(&self, ri: &str) -> Vec<String>

Returns negative passive future imperfective forms for the given past root.

Source

pub fn future_precedent(&self, ri: &str) -> Vec<String>

Returns future perfect (آیندهٔ پیشین) forms for the given past root.

Source

pub fn negative_future_precedent(&self, ri: &str) -> Vec<String>

Returns negative future perfect forms for the given past root.

Source

pub fn passive_future_precedent(&self, ri: &str) -> Vec<String>

Returns passive future perfect forms for the given past root.

Source

pub fn negative_passive_future_precedent(&self, ri: &str) -> Vec<String>

Returns negative passive future perfect forms for the given past root.

Source

pub fn future_precedent_imperfective(&self, ri: &str) -> Vec<String>

Returns future perfect imperfective (آیندهٔ پیشین پایا) forms with می‌ prefix.

Source

pub fn negative_future_precedent_imperfective(&self, ri: &str) -> Vec<String>

Returns negative future perfect imperfective forms with نمی‌ prefix.

Source

pub fn passive_future_precedent_imperfective(&self, ri: &str) -> Vec<String>

Returns passive future perfect imperfective forms for the given past root.

Source

pub fn negative_passive_future_precedent_imperfective( &self, ri: &str, ) -> Vec<String>

Returns negative passive future perfect imperfective forms for the given past root.

Source

pub fn get_all(&self, verb: &str) -> Vec<String>

Generates every conjugated form for a "past#present" verb string.

§Panics

Panics if verb does not contain #. Use Lemmatizer for safe access.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.