Add text property

This commit is contained in:
ensan-hcl
2023-09-19 22:10:54 +09:00
parent abd896f649
commit f5cfe1cf11

View File

@@ -36,6 +36,15 @@ public enum PredictionCandidate: Sendable {
}
}
public var text: String {
switch self {
case .additional(let c):
c.text
case .replacement(let c):
c.text
}
}
public func join(to candidate: consuming Candidate) -> Candidate {
switch self {
case .additional(let c):