pub struct ExtractionParams {
pub min_block_words: usize,
pub max_block_link_density: f32,
}Expand description
Continuous extraction parameters that the RL policy tunes. They actually affect which text blocks are kept, so the policy’s continuous head has a real effect on the extracted text (and therefore on the reward).
Fields§
§min_block_words: usizeMinimum words for a block (
/text node) to be kept.
max_block_link_density: f32Drop blocks whose link density exceeds this threshold (0..=1).
Implementations§
Source§impl ExtractionParams
impl ExtractionParams
Sourcepub fn from_normalized(params: &[f32]) -> Self
pub fn from_normalized(params: &[f32]) -> Self
Map a policy’s normalized continuous params (each roughly in [-1, 1]) to concrete extraction settings. Only the first two params are used today; extra params are accepted and ignored so the action space can stay wide.
Trait Implementations§
Source§impl Clone for ExtractionParams
impl Clone for ExtractionParams
Source§fn clone(&self) -> ExtractionParams
fn clone(&self) -> ExtractionParams
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 moreimpl Copy for ExtractionParams
Source§impl Debug for ExtractionParams
impl Debug for ExtractionParams
Auto Trait Implementations§
impl Freeze for ExtractionParams
impl RefUnwindSafe for ExtractionParams
impl Send for ExtractionParams
impl Sync for ExtractionParams
impl Unpin for ExtractionParams
impl UnsafeUnpin for ExtractionParams
impl UnwindSafe for ExtractionParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more