LMAssoc. // Conforming symbol naming convention.

This commit is contained in:
ShikiSuen 2022-07-24 10:36:54 +08:00
parent 938fedbcc4
commit 47018534d3
1 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ extension vChewing {
!rangeMap.isEmpty !rangeMap.isEmpty
} }
internal func cnvNgramKeyFromPinyinToPhona(target: String) -> String { internal func cnvNGramKeyFromPinyinToPhona(target: String) -> String {
guard target.contains("("), target.contains(","), target.contains(")") else { guard target.contains("("), target.contains(","), target.contains(")") else {
return target return target
} }
@ -69,7 +69,7 @@ extension vChewing {
if !theKey.isEmpty, theKey.first != "#" { if !theKey.isEmpty, theKey.first != "#" {
for (i, _) in neta.filter({ $0.first != "#" && !$0.isEmpty }).enumerated() { for (i, _) in neta.filter({ $0.first != "#" && !$0.isEmpty }).enumerated() {
if i == 0 { continue } if i == 0 { continue }
rangeMap[cnvNgramKeyFromPinyinToPhona(target: theKey), default: []].append(($0, i)) rangeMap[cnvNGramKeyFromPinyinToPhona(target: theKey), default: []].append(($0, i))
} }
} }
} }