Struct programinduction::pcfg::Rule[][src]

pub struct Rule {
    pub name: &'static str,
    pub production: Type,
    pub logprob: f64,
}

A PCFG rule specifies a production that can happen for a particular nonterminal.

A rule associates a production name with a production type. Rules that are not arrows are terminals for the supplied nonterminal type. Rules that are arrows expand nonterminals that correspond to the arrow's return type.

Log-probabilities are normalized when initializing a Grammar.

Fields

Methods

impl Rule
[src]

Trait Implementations

impl Debug for Rule
[src]

Formats the value using the given formatter. Read more

impl Clone for Rule
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Ord for Rule
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialOrd for Rule
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq for Rule
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Rule
[src]

Auto Trait Implementations

impl Send for Rule

impl Sync for Rule