Skip to content

Commit

Permalink
feat: AZKKCを更新し、軽微な修正を実施 (#108)
Browse files Browse the repository at this point in the history
* feat: update azkkc

* chore: swiftlint
  • Loading branch information
ensan-hcl authored Feb 14, 2025
1 parent 505f751 commit e41e042
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion azooKeyMac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@
repositoryURL = "https://github.com/ensan-hcl/AzooKeyKanaKanjiConverter";
requirement = {
kind = revision;
revision = 00375ba20a8111dc5ce752cd901935fd0d9c9350;
revision = 24f506b5b522f54854860364d9fb261033408a0b;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
28 changes: 14 additions & 14 deletions azooKeyMac/InputController/OpenAIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ private struct Prompt {
"": """
Generate 3-5 natural sentence completions for the given fragment.
Return them as a simple array of strings.
Example:
Input: "りんごは"
Output: ["赤いです。", "甘いです。", "美味しいです。", "1個200円です。", "果物です。"]
Expand All @@ -16,7 +16,7 @@ private struct Prompt {
"えもじ": """
Generate 3-5 emoji options that best represent the meaning of the text.
Return them as a simple array of strings.
Example:
Input: "嬉しいです<えもじ>"
Output: ["😊", "🥰", "😄", "💖", ""]
Expand All @@ -26,7 +26,7 @@ private struct Prompt {
"かおもじ": """
Generate 3-5 kaomoji (Japanese emoticon) options that best express the emotion or meaning of the text.
Return them as a simple array of strings.
Example:
Input: "嬉しいです<かおもじ>"
Output: ["(≧▽≦)", "(^_^)", "(o^▽^o)", "(。♥‿♥。)"]
Expand All @@ -36,7 +36,7 @@ private struct Prompt {
"きごう": """
Propose 3-5 symbol options to represent the given context.
Return them as a simple array of strings.
Example:
Input: "総和<きごう>"
Output: ["Σ", "+", ""]
Expand All @@ -46,7 +46,7 @@ private struct Prompt {
"るいぎご": """
Generate 3-5 synonymous word options for the given text.
Return them as a simple array of Japanese strings.
Example:
Input: "楽しい<るいぎご>"
Output: ["愉快", "面白い", "嬉しい", "快活", "ワクワクする"]
Expand All @@ -56,7 +56,7 @@ private struct Prompt {
"たいぎご": """
Generate 3-5 antonymous word options for the given text.
Return them as a simple array of Japanese strings.
Example:
Input: "楽しい<たいぎご>"
Output: ["悲しい", "つまらない", "不愉快", "退屈", "憂鬱"]
Expand All @@ -70,10 +70,10 @@ private struct Prompt {
Example:
Input: "二次方程式<てふ>"
Output: ["$x^2$", "$\\alpha$", "$\\frac{1}{2}$"]
Input: "積分<てふ>"
Output: ["$\\int$", "$\\oint$", "$\\sum$"]
Input: "平方根<てふ>"
Output: ["$\\sqrt{x}$", "$\\sqrt[n]{x}$", "$x^{1/2}$"]
""",
Expand Down Expand Up @@ -120,23 +120,23 @@ private struct Prompt {
- Alternative phrases or expressions
- Different rhetorical approaches
Return results as a simple array of strings.
Example:
Input: "おはようございます。今日も<てんき>"
Output: ["いい天気", "", "晴れ", "快晴" , "曇り"]
Input: "先日は失礼しました。<ごめん>"
Output: ["すいません。", "ごめんなさい", "申し訳ありません"]
Input: "すぐに戻ります<まってて>"
Output: ["ただいま戻ります", "少々お待ちください", "すぐ参ります", "まもなく戻ります", "しばらくお待ちを"]
Input: "遅刻してすいません。<いいわけ>"
Output: ["電車の遅延", "寝坊", "道に迷って"]
Input: "こんにちは<ふらんすご>"
Output: ["Bonjour", "Salut", "Bon après-midi", "Coucou", "Allô"]
Input: "ありがとう<すぺいんご>"
Output: ["Gracias", "Muchas gracias", "Te lo agradezco", "Mil gracias", "Gracias mil"]
"""
Expand Down
2 changes: 1 addition & 1 deletion azooKeyMac/InputController/SegmentsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ final class SegmentsManager {
}

let base = Bundle.main.bundleURL.appendingPathComponent("Contents/Resources/", isDirectory: false).path + "/lm"
let personal = containerURL.appendingPathComponent("Library/Application Support/SwiftNGram").path + "/lm"
let personal = containerURL.appendingPathComponent("Library/Application Support/p13n_v1").path + "/lm"
// check personal lm existence
guard [
FileManager.default.fileExists(atPath: personal + "_c_abc.marisa"),
Expand Down

0 comments on commit e41e042

Please sign in to comment.