LMs // Documentation fix.

This commit is contained in:
ShikiSuen 2022-06-20 12:30:37 +08:00
parent be0142a481
commit 6edbbe4aa6
2 changed files with 16 additions and 16 deletions

View File

@ -31,7 +31,7 @@ extension vChewing {
/// C++ ParselessLM Swift
/// For
@frozen public struct LMCoreEX {
/// 便 strData
/// 便 strData
var rangeMap: [String: [Range<String.Index>]] = [:]
///
var strData: String = ""
@ -66,12 +66,12 @@ extension vChewing {
shouldForceDefaultScore = forceDefaultScore
}
///
///
public func isLoaded() -> Bool {
!rangeMap.isEmpty
}
///
///
/// - parameters:
/// - path:
@discardableResult public mutating func open(_ path: String) -> Bool {
@ -105,7 +105,7 @@ extension vChewing {
return true
}
///
///
public mutating func close() {
if isLoaded() {
rangeMap.removeAll()
@ -114,7 +114,7 @@ extension vChewing {
// MARK: - Advanced features
/// macOS Console.app
/// macOS Console.app
///
///
public func dump() {
@ -130,7 +130,7 @@ extension vChewing {
IME.prtDebugIntel(strDump)
}
/// 使 strData
/// 使 strData
///
///
/// - parameters:
@ -142,7 +142,7 @@ extension vChewing {
precedingKey == key ? [Megrez.Bigram]() : [Megrez.Bigram]()
}
/// strData
/// strData
/// - parameters:
/// - key:
public func unigramsFor(key: String) -> [Megrez.Unigram] {
@ -165,7 +165,7 @@ extension vChewing {
return grams
}
///
///
/// - parameters:
/// - key:
public func hasUnigramsFor(key: String) -> Bool {

View File

@ -29,7 +29,7 @@ extension vChewing {
/// mac
/// 使 plist
@frozen public struct LMCoreNS {
/// UTF8
/// UTF8
var rangeMap: [String: [Data]] = [:]
/// LMCoreNS
var strData: String = ""
@ -67,12 +67,12 @@ extension vChewing {
shouldForceDefaultScore = forceDefaultScore
}
///
///
public func isLoaded() -> Bool {
!rangeMap.isEmpty
}
///
///
/// - parameters:
/// - path:
@discardableResult public mutating func open(_ path: String) -> Bool {
@ -93,7 +93,7 @@ extension vChewing {
return true
}
///
///
public mutating func close() {
if isLoaded() {
rangeMap.removeAll()
@ -102,7 +102,7 @@ extension vChewing {
// MARK: - Advanced features
/// macOS Console.app
/// macOS Console.app
///
///
public func dump() {
@ -124,7 +124,7 @@ extension vChewing {
IME.prtDebugIntel(strDump)
}
/// 使 UTF8
/// 使 UTF8
///
///
/// - parameters:
@ -136,7 +136,7 @@ extension vChewing {
precedingKey == key ? [Megrez.Bigram]() : [Megrez.Bigram]()
}
/// UTF8
/// UTF8
/// - parameters:
/// - key:
public func unigramsFor(key: String) -> [Megrez.Unigram] {
@ -160,7 +160,7 @@ extension vChewing {
return grams
}
///
///
/// - parameters:
/// - key:
public func hasUnigramsFor(key: String) -> Bool {