pub struct LengthPenaltyConfig {
pub alpha: f64,
pub beta: f64,
pub min_length: usize,
pub max_length: usize,
}Expand description
Configuration for GNMT-style length and coverage penalties.
Fields§
§alpha: f64Length-penalty exponent α. 0 = disabled; typical values 0.6–1.0.
beta: f64Coverage-penalty weight β. 0 = disabled.
min_length: usizeMinimum output length (informational; not enforced by score()).
max_length: usizeMaximum output length (informational; not enforced by score()).
Trait Implementations§
Source§impl Clone for LengthPenaltyConfig
impl Clone for LengthPenaltyConfig
Source§fn clone(&self) -> LengthPenaltyConfig
fn clone(&self) -> LengthPenaltyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LengthPenaltyConfig
impl RefUnwindSafe for LengthPenaltyConfig
impl Send for LengthPenaltyConfig
impl Sync for LengthPenaltyConfig
impl Unpin for LengthPenaltyConfig
impl UnsafeUnpin for LengthPenaltyConfig
impl UnwindSafe for LengthPenaltyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more