-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into tools/ci
- Loading branch information
Showing
7 changed files
with
983 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "Sources/KanaKanjiConverterModuleWithDefaultDictionary/azooKey_dictionary_storage"] | ||
path = Sources/KanaKanjiConverterModuleWithDefaultDictionary/azooKey_dictionary_storage | ||
url = https://github.com/ensan-hcl/azooKey_dictionary_storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...iConverterModuleWithDefaultDictionary/KanaKanjiConverterModuleWithDefaultDictionary.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@_exported import KanaKanjiConverterModule | ||
import Foundation | ||
|
||
public extension ConvertRequestOptions { | ||
static func withDefaultDictionary( | ||
N_best: Int = 10, | ||
requireJapanesePrediction: Bool, | ||
requireEnglishPrediction: Bool, | ||
keyboardLanguage: KeyboardLanguage, | ||
typographyLetterCandidate: Bool = false, | ||
unicodeCandidate: Bool = true, | ||
englishCandidateInRoman2KanaInput: Bool = false, | ||
fullWidthRomanCandidate: Bool = false, | ||
halfWidthKanaCandidate: Bool = false, | ||
learningType: LearningType, | ||
maxMemoryCount: Int = 65536, | ||
shouldResetMemory: Bool = false, | ||
memoryDirectoryURL: URL, | ||
sharedContainerURL: URL, | ||
textReplacer: TextReplacer = TextReplacer(), | ||
metadata: ConvertRequestOptions.Metadata | ||
) -> Self { | ||
#if os(iOS) || os(watchOS) || os(tvOS) || os(visionOS) | ||
let dictionaryDirectory = Bundle.module.bundleURL.appendingPathComponent("Dictionary", isDirectory: true) | ||
#elseif os(macOS) | ||
let dictionaryDirectory = Bundle.module.resourceURL!.appendingPathComponent("Dictionary", isDirectory: true) | ||
#else | ||
let dictionaryDirectory = Bundle.module.resourceURL!.appendingPathComponent("Dictionary", isDirectory: true) | ||
#endif | ||
return Self( | ||
N_best: N_best, | ||
requireJapanesePrediction: requireJapanesePrediction, | ||
requireEnglishPrediction: requireEnglishPrediction, | ||
keyboardLanguage: keyboardLanguage, | ||
typographyLetterCandidate: typographyLetterCandidate, | ||
unicodeCandidate: unicodeCandidate, | ||
englishCandidateInRoman2KanaInput: englishCandidateInRoman2KanaInput, | ||
fullWidthRomanCandidate: fullWidthRomanCandidate, | ||
halfWidthKanaCandidate: halfWidthKanaCandidate, | ||
learningType: learningType, | ||
maxMemoryCount: maxMemoryCount, | ||
shouldResetMemory: shouldResetMemory, | ||
dictionaryResourceURL: dictionaryDirectory, | ||
memoryDirectoryURL: memoryDirectoryURL, | ||
sharedContainerURL: sharedContainerURL, | ||
textReplacer: textReplacer, | ||
metadata: metadata | ||
) | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
Sources/KanaKanjiConverterModuleWithDefaultDictionary/azooKey_dictionary_storage
Submodule azooKey_dictionary_storage
added at
43b855
Oops, something went wrong.