From 58721efa35c858ddcd24684a31df9ea916310153 Mon Sep 17 00:00:00 2001 From: Jan Lukas Gernert Date: Tue, 28 Feb 2023 18:27:36 +0100 Subject: [PATCH] fix positive/negative class weight regex --- src/constants.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/constants.rs b/src/constants.rs index 027b80f..0200c37 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -26,12 +26,12 @@ pub static HAS_CONTENT: Lazy = pub static HASH_URL: Lazy = Lazy::new(|| Regex::new(r#"/^#.+/"#).expect("HASH_URL regex")); pub static POSITIVE: Lazy = Lazy::new(|| { Regex::new( - r#"/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i"#, + r#"article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i"#, ) .expect("POSITIVE regex") }); pub static NEGATIVE: Lazy = - Lazy::new(|| Regex::new(r#"/-ad-|hidden|^hid$| hid$| hid |^hid"#).expect("NEGATIVE regex")); + Lazy::new(|| Regex::new(r#"-ad-|hidden|^hid$| hid$| hid |^hid"#).expect("NEGATIVE regex")); pub static TITLE_SEPARATOR: Lazy = Lazy::new(|| Regex::new(r#"[-|\\/>ยป]"#).expect("TITLE_SEPARATOR regex"));