Spam filter performance and accuracy improvements (part 6)
This commit is contained in:
@@ -83,7 +83,7 @@ impl TextClassifier {
|
||||
}
|
||||
}
|
||||
|
||||
fn predict_proba_sample(&self, features: &Features) -> f32 {
|
||||
pub fn predict_proba_sample(&self, features: &Features) -> f32 {
|
||||
let mut z: f32 = 0.0;
|
||||
for (idx, feature) in &features.0 {
|
||||
z += self.weights[*idx as usize] * *feature;
|
||||
|
||||
@@ -73,6 +73,7 @@ impl WordStemTokenizer {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
pub fn symbols(input: &str) -> bool {
|
||||
hashify::set!(
|
||||
input.as_bytes(),
|
||||
@@ -7824,6 +7825,7 @@ pub fn symbols(input: &str) -> bool {
|
||||
)
|
||||
}
|
||||
|
||||
*/
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use crate::tokenizers::{
|
||||
|
||||
Reference in New Issue
Block a user