pub fn gerund(verb: &VerbEntry) -> StringExpand description
Computes the gerund (present participle) form of a verb.
Returns the irregular form if one is defined in the verb’s forms map under
the "gerund" key. Otherwise, applies English gerund formation rules:
- Ends in
-e(but not-ee) → dropeand append-ing(“make” → “making”) - Ends in
-ee→ append-ingwithout dropping (“see” → “seeing”) - Default → append
-ing(“run” → “running”)
Note: This implementation does not handle consonant doubling (e.g., “run” → “running”
should double the ‘n’, but this produces “runing”). For accurate results with such
verbs, provide an irregular form in the forms map.
§Arguments
verb- The verb entry containing the lemma and optional irregular forms.
§Examples
use logicaffeine_lexicon::runtime::{VerbEntry, gerund};
use std::collections::HashMap;
let make = VerbEntry {
lemma: "make".to_string(),
class: "Activity".to_string(),
forms: HashMap::new(),
features: vec![],
};
assert_eq!(gerund(&make), "making");
let see = VerbEntry {
lemma: "see".to_string(),
class: "Activity".to_string(),
forms: HashMap::new(),
features: vec![],
};
assert_eq!(gerund(&see), "seeing");