[−][src]Struct rusty_grammar::CYK
The struct for the CYK algorithm.
Implementations
impl<'grammar, W> CYK<'grammar, W> where
W: WordBank,
[src]
W: WordBank,
pub fn new<G>(rules: G, word_bank: W) -> Self where
G: Grammar<'grammar>,
[src]
G: Grammar<'grammar>,
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,
W: RefUnwindSafe,
impl<'rules, W> Send for CYK<'rules, W> where
W: Send,
W: Send,
impl<'rules, W> Sync for CYK<'rules, W> where
W: Sync,
W: Sync,
impl<'rules, W> Unpin for CYK<'rules, W> where
W: Unpin,
W: Unpin,
impl<'rules, W> UnwindSafe for CYK<'rules, W> where
W: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,