[][src]Struct rusty_grammar::CYK

pub struct CYK<'rules, W> { /* fields omitted */ }

The struct for the CYK algorithm.

Implementations

impl<'grammar, W> CYK<'grammar, W> where
    W: WordBank
[src]

pub fn new<G>(rules: G, word_bank: W) -> Self where
    G: Grammar<'grammar>, 
[src]

Creates a new instance of a CYK algo with a set of rules and a word brank.

Arguments

  • rules - The object that implements the Grammar Trait.
  • word_bank - The object that implements the WordBank Trait.

pub fn parse<'word>(&self, input: &'word str) -> MatrixResult[src]

A function that parses the given sentence for the rules and wordbank in the CYK struct.

Arguments

  • input - The input string to be parsed and validated.

pub fn memoized_parse<'word>(&self, input: &'static str) -> MatrixResult[src]

A memoized version of the parse function. i.e. if sentence exists in map just instant return results.

Arguments

  • input - The input string to be parsed and validated.

Auto Trait Implementations

impl<'rules, W> RefUnwindSafe for CYK<'rules, W> where
    W: RefUnwindSafe

impl<'rules, W> Send for CYK<'rules, W> where
    W: Send

impl<'rules, W> Sync for CYK<'rules, W> where
    W: Sync

impl<'rules, W> Unpin for CYK<'rules, W> where
    W: Unpin

impl<'rules, W> UnwindSafe for CYK<'rules, W> where
    W: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.