From c85f474dbfabdc6e07016f060a9c255d9d4de2cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=B3=E3=83=9E=E3=83=AA=E3=83=B3=E8=A6=AA=E8=A1=9B?= =?UTF-8?q?=E9=9A=8A?= Date: Wed, 25 Sep 2024 22:22:52 +0900 Subject: [PATCH] Update jtalk.rs --- sbv2_core/src/jtalk.rs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/sbv2_core/src/jtalk.rs b/sbv2_core/src/jtalk.rs index 7217e61..52f9994 100644 --- a/sbv2_core/src/jtalk.rs +++ b/sbv2_core/src/jtalk.rs @@ -19,21 +19,6 @@ fn initialize_jtalk() -> Result { Ok(jpreprocess) } -static JTALK_G2P_G_A1_PATTERN: Lazy = Lazy::new(|| Regex::new(r"/A:([0-9\-]+)\+").unwrap()); -static JTALK_G2P_G_A2_PATTERN: Lazy = Lazy::new(|| Regex::new(r"\+(\d+)\+").unwrap()); -static JTALK_G2P_G_A3_PATTERN: Lazy = Lazy::new(|| Regex::new(r"\+(\d+)/").unwrap()); -static JTALK_G2P_G_E3_PATTERN: Lazy = Lazy::new(|| Regex::new(r"!(\d+)_").unwrap()); -static JTALK_G2P_G_F1_PATTERN: Lazy = Lazy::new(|| Regex::new(r"/F:(\d+)_").unwrap()); -static JTALK_G2P_G_P3_PATTERN: Lazy = Lazy::new(|| Regex::new(r"\-(.*?)\+").unwrap()); - -fn numeric_feature_by_regex(regex: &Regex, text: &str) -> i32 { - if let Some(mat) = regex.captures(text) { - mat[1].parse::().unwrap() - } else { - -50 - } -} - macro_rules! hash_set { ($($elem:expr),* $(,)?) => {{ let mut set = HashSet::new();