pub struct NodeFeatures {Show 16 fields
pub word_count_norm: f32,
pub char_count_norm: f32,
pub link_density: f32,
pub stopword_ratio: f32,
pub p_count_norm: f32,
pub text_tag_ratio: f32,
pub depth_norm: f32,
pub comma_density: f32,
pub tag_article: f32,
pub tag_main: f32,
pub tag_section: f32,
pub tag_div: f32,
pub tag_other: f32,
pub class_positive: f32,
pub class_negative: f32,
pub unique_word_ratio: f32,
}Expand description
Structural / textual features for a single candidate node.
All fields are pre-normalized to roughly [0, 1] so they can be fed directly to the network without further scaling.
Fields§
§word_count_norm: f32§char_count_norm: f32§link_density: f32§stopword_ratio: f32§p_count_norm: f32§text_tag_ratio: f32§depth_norm: f32§comma_density: f32§tag_article: f32§tag_main: f32§tag_section: f32§tag_div: f32§tag_other: f32§class_positive: f32§class_negative: f32§unique_word_ratio: f32Implementations§
Source§impl NodeFeatures
impl NodeFeatures
Sourcepub const DIM: usize = 16
pub const DIM: usize = 16
Number of features per node. Kept in sync with Self::to_vec.
Sourcepub fn heuristic_content_score(&self) -> f32
pub fn heuristic_content_score(&self) -> f32
A heuristic “is this the article body?” score in [0, 1], derived purely from the features. Used as a warm-start prior and as a baseline for the supervised classifier’s tests. Not learned — just a sane linear combo of Readability-style signals.
Trait Implementations§
Source§impl Clone for NodeFeatures
impl Clone for NodeFeatures
Source§fn clone(&self) -> NodeFeatures
fn clone(&self) -> NodeFeatures
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 NodeFeatures
Source§impl Debug for NodeFeatures
impl Debug for NodeFeatures
Source§impl PartialEq for NodeFeatures
impl PartialEq for NodeFeatures
Source§fn eq(&self, other: &NodeFeatures) -> bool
fn eq(&self, other: &NodeFeatures) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NodeFeatures
Auto Trait Implementations§
impl Freeze for NodeFeatures
impl RefUnwindSafe for NodeFeatures
impl Send for NodeFeatures
impl Sync for NodeFeatures
impl Unpin for NodeFeatures
impl UnsafeUnpin for NodeFeatures
impl UnwindSafe for NodeFeatures
Blanket Implementations§
impl<T> Boilerplate for T
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