We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3444b02 + c7ed384 commit d638b7dCopy full SHA for d638b7d
libakaza/src/consonant.rs
@@ -20,7 +20,21 @@ impl ConsonantSuffixExtractor {
20
/// "めny" を ("め", "ny") に分解する。
21
// (preedit, suffix) の形で返す。
22
pub fn extract(&self, src: &str) -> (String, String) {
23
- if src.ends_with("nn") {
+ if
24
+ // nn は「ん」で確定されている。
25
+ src.ends_with("nn")
26
+ // 矢印などはのこった子音じゃない。
27
+ || src.ends_with("zh")
28
+ || src.ends_with("zj")
29
+ || src.ends_with("zk")
30
+ || src.ends_with("zl")
31
+ || src.ends_with("z[")
32
+ || src.ends_with("z]")
33
+ || src.ends_with("z-")
34
+ || src.ends_with("z.")
35
+ || src.ends_with("z,")
36
+ || src.ends_with("z/")
37
+ {
38
(src.to_string(), "".to_string())
39
} else if let Some(p) = self.pattern.captures(src) {
40
(
0 commit comments