LMAssoc. // Remove useless symbols.

This commit is contained in:
ShikiSuen 2022-07-24 12:59:22 +08:00
parent 47018534d3
commit d5b36c762d
2 changed files with 0 additions and 24 deletions

View File

@ -248,14 +248,6 @@ extension vChewing {
return !unigramsFor(key: key).isEmpty
}
public func associatedPhrasesFor(key: String) -> [String] {
lmAssociates.valuesFor(key: key)
}
public func hasAssociatedPhrasesFor(key: String) -> Bool {
lmAssociates.hasValuesFor(key: key)
}
public func associatedPhrasesFor(pair: Megrez.KeyValuePaired) -> [String] {
lmAssociates.valuesFor(pair: pair)
}

View File

@ -94,22 +94,6 @@ extension vChewing {
// This function will be implemented only if further hard-necessity comes.
}
public func valuesFor(key: String) -> [String] {
var pairs: [String] = []
if let arrRangeRecords: [(Range<String.Index>, Int)] = rangeMap[key] {
for (netaRange, index) in arrRangeRecords {
let neta = strData[netaRange].split(separator: " ")
let theValue: String = .init(neta[index])
pairs.append(theValue)
}
}
return pairs
}
public func hasValuesFor(key: String) -> Bool {
rangeMap[key] != nil
}
public func valuesFor(pair: Megrez.KeyValuePaired) -> [String] {
var pairs: [String] = []
if let arrRangeRecords: [(Range<String.Index>, Int)] = rangeMap[pair.toNGramKey] {