pub trait NounParsing<'a, 'ctx, 'int> {
// Required methods
fn parse_noun_phrase(
&mut self,
greedy: bool,
) -> Result<NounPhrase<'a>, ParseError>;
fn parse_noun_phrase_for_relative(
&mut self,
) -> Result<NounPhrase<'a>, ParseError>;
fn noun_phrase_to_term(&self, np: &NounPhrase<'a>) -> Term<'a>;
fn check_possessive(&self) -> bool;
fn check_of_preposition(&self) -> bool;
fn check_proper_name_or_label(&self) -> bool;
fn check_possessive_pronoun(&self) -> bool;
}Expand description
Trait for parsing noun phrases.
Provides methods for parsing determiners, adjectives, possessives, and converting noun phrases to first-order terms.
Required Methods§
Sourcefn parse_noun_phrase(
&mut self,
greedy: bool,
) -> Result<NounPhrase<'a>, ParseError>
fn parse_noun_phrase( &mut self, greedy: bool, ) -> Result<NounPhrase<'a>, ParseError>
Parses a full noun phrase with optional greedy PP attachment.
Sourcefn parse_noun_phrase_for_relative(
&mut self,
) -> Result<NounPhrase<'a>, ParseError>
fn parse_noun_phrase_for_relative( &mut self, ) -> Result<NounPhrase<'a>, ParseError>
Parses a noun phrase suitable for relative clause antecedent.
Sourcefn noun_phrase_to_term(&self, np: &NounPhrase<'a>) -> Term<'a>
fn noun_phrase_to_term(&self, np: &NounPhrase<'a>) -> Term<'a>
Converts a parsed noun phrase to a first-order term.
Sourcefn check_possessive(&self) -> bool
fn check_possessive(&self) -> bool
Checks for possessive marker (’s).
Sourcefn check_of_preposition(&self) -> bool
fn check_of_preposition(&self) -> bool
Checks for “of” preposition (possessive or partitive).
Sourcefn check_proper_name_or_label(&self) -> bool
fn check_proper_name_or_label(&self) -> bool
Checks for proper name or label (capitalized).
Sourcefn check_possessive_pronoun(&self) -> bool
fn check_possessive_pronoun(&self) -> bool
Checks for possessive pronoun (his, her, its, their).