Commit Graph

367 Commits

Author SHA1 Message Date
Miwa
3a4e914624 Merge pull request #171 from azooKey/ensan-hcl/feat/add_time_expression
feat: Add time expression conversion function
2025-03-30 17:32:07 +09:00
Miwa / Ensan
eb040124e7 fix: add more test cases 2025-03-30 17:20:07 +09:00
Miwa
858416289f Update digit check in convertToTimeExpression function
* Check if characters are ASCII digits instead of just digits
2025-03-30 17:09:02 +09:00
Miwa
a9971e6909 Add digit check to convertToTimeExpression function
* Check if all characters in the input string are digits before processing
* Return an empty array if the input string contains non-digit characters
2025-03-30 17:05:48 +09:00
Miwa
38b84fe3e8 Add convertToTimeExpression function to convert numbers into time expressions
* Add logic to handle 3-digit and 4-digit numbers
* Check if the number is 3 digits with the first digit between 0-9 and the last two digits between 00-60
* Check if the number is 4 digits with the first two digits between 00-24 and the last two digits between 00-59
* Convert the number into a time expression in the format 'HH:MM' if conditions are met
2025-03-30 17:04:30 +09:00
Miwa
e8f9eb2f80 Update testConvertToTimeExpression to use await for KanaKanjiConverter initialization
* Change `let converter = KanaKanjiConverter()` to `let converter = await KanaKanjiConverter()`
2025-03-30 16:58:10 +09:00
Miwa
feb5daa5bb Update convertToTimeExpression function to handle edge cases and correct time validation
* **TimeExpression.swift**
  - Change the validation for 3-digit numbers to allow last two digits between 00-59.
  - Change the validation for 4-digit numbers to allow first two digits between 00-24 and last two digits between 00-59.

* **TimeExpressionTests.swift**
  - Update test cases to reflect the new validation rules.
  - Change test input "1360" to "2440" and update expected results accordingly.
  - Update assertions for the modified test cases.
2025-03-30 16:57:46 +09:00
Miwa
19dbbccd9f Add test cases for convertToTimeExpression function
* **Test cases**
  - Create `KanaKanjiConverter` instance
  - Use `makeDirectInput` to create `ComposingText` instances for test cases
  - Call `convertToTimeExpression` function with different inputs
  - Verify the results using `XCTAssertEqual` and `XCTAssertTrue`

* **Helper function**
  - Add `makeDirectInput(direct input: String) -> ComposingText` helper function

* **Concurrency**
  - Use `await` for the call of `convertToTimeExpression`
  - Call `convertToTimeExpression` outside of XCTest function
2025-03-30 16:55:34 +09:00
Miwa
65ac2fa3aa Update testConvertToTimeExpression function to use await for convertToTimeExpression calls
* Ensure `convertToTimeExpression` function is called asynchronously in all test cases
2025-03-30 16:48:17 +09:00
Miwa
ac8dfc8dc3 Update test cases for current convertToTimeExpression signature
* Add makeDirectInput function to create ComposingText instances
* Update testConvertToTimeExpression to use makeDirectInput for input conversion
2025-03-30 16:44:45 +09:00
Miwa
3b6d63c8d3 Add async/await to test functions in TimeExpressionTests.swift
* **testConvertToTimeExpression**
  - Change function signature to `async throws`
  - Initialize `KanaKanjiConverter` with `await`

* **testToTimeExpressionCandidates**
  - Change function signature to `async throws`
  - Initialize `KanaKanjiConverter` with `await`
2025-03-30 16:38:22 +09:00
Miwa
ff8c38f76c Update KanaKanjiConverter to handle time expression conversion
* Rename `toTimeExpressionCandidates` function to `convertToTimeExpression`
* Remove `toTimeExpressionCandidates` function and integrate its logic into `convertToTimeExpression`
* Call `convertToTimeExpression` function in `getWiseCandidate` function
2025-03-30 16:35:31 +09:00
Miwa
ad580d5214 feat: Add time expression conversion function
Fixes #170

Add functionality to convert 3-digit and 4-digit numbers into time expressions in the format 'HH:MM'.

* Add `convertToTimeExpression` function in `Sources/KanaKanjiConverterModule/Converter/TimeExpression.swift` to handle the conversion.
* Modify `Sources/KanaKanjiConverterModule/Converter/KanaKanjiConverter.swift` to include the new function and call it within `getWiseCandidate`.
* Add tests in `Tests/KanaKanjiConverterModuleTests/ConverterTests/TimeExpressionTests.swift` to ensure the new function works correctly.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/azooKey/AzooKeyKanaKanjiConverter/issues/170?shareId=XXXX-XXXX-XXXX-XXXX).
2025-03-30 16:32:25 +09:00
Miwa
7d5dd99fd7 Merge pull request #157 from fkunn1326/latest_llama
feat: 最新のllama.cppに対応
2025-03-18 23:03:14 +09:00
Miwa
271222a82a Merge pull request #169 from azooKey/perf/prediction_acceleration
perf: 予測変換候補の検索において早期に打ち切ることで高速化
2025-03-16 15:40:27 +09:00
Miwa / Ensan
1409575391 perf: 予測変換候補の検索において早期に打ち切ることで高速化 2025-03-16 15:30:23 +09:00
Miwa
42fdba530f Merge pull request #168 from azooKey/feat/swift_tools_version
feat: use swift-tools-version 6.0
2025-03-16 14:57:25 +09:00
Miwa / Ensan
d34915096d feat: use swift-tools-version 6.0 2025-03-16 14:43:05 +09:00
fkunn1326
a9f568ddd3 ci: devcontainerをサポート 2025-03-16 09:08:47 +09:00
fkunn1326
a2e6e4208d ci: fix for android build 2025-03-16 08:51:37 +09:00
fkunn1326
bd407171f8 Merge branch 'develop' into latest_llama 2025-03-16 08:49:15 +09:00
fkunn1326
d8a6b3b715 ci: build for release 2025-03-16 08:44:31 +09:00
fkunn1326
22dad49075 ci: copy needed files to build directory 2025-03-16 08:41:11 +09:00
fkunn1326
915e71b79f ci: linuxでのビルドを修正 2025-03-16 08:33:39 +09:00
fkunn1326
121cdd705c ci: fix path 2025-03-16 08:08:15 +09:00
fkunn1326
c805f22ec9 ci: support llama.cpp on windows / linux 2025-03-16 08:05:54 +09:00
Miwa
5423dfe59b Merge pull request #165 from azooKey/fix/minimum_ios_version
fix: set minimum version of iOS to v16
2025-03-15 18:59:29 +09:00
Miwa
1e0bf846cd fix: set minimum version of iOS to v16 2025-03-15 18:52:27 +09:00
Miwa
c6a9812549 Merge pull request #164 from azooKey/refactor/remove_graph_based_conversion
refactor: clear Graph-based input impls
2025-03-08 23:08:46 +09:00
fkunn1326
a164294c19 ci: llama-mockの抜けを修正 2025-03-08 20:10:58 +09:00
fkunn1326
b5765163fe ci: llama-mockを更新 2025-03-08 19:59:17 +09:00
fkunn1326
79b5a6a785 ci: macOSの依存関係を変更 2025-03-08 19:53:01 +09:00
ensan-hcl
ebaa31721c refactor: clear Graph-based input impls 2025-03-08 18:17:21 +09:00
Miwa
35b708997b Merge pull request #161 from azooKey/feat/fyu
feat: ローマ字入力中、fyu→ふゅ、を追加
2025-03-08 17:05:52 +09:00
Miwa
da09c69f04 Merge pull request #160 from azooKey/feat/session_command_replay
feat: sessionコマンドにdump/replayの機能を追加
2025-03-08 17:05:34 +09:00
Miwa
72b2a8db9c Merge pull request #159 from azooKey/fix/prompt_preprocess
fix: 前方文脈に半角スペースが入ると変換が不安定になっていた問題を修正
2025-03-08 16:04:34 +09:00
ensan-hcl
f56ece1517 fyu→ふゅ、を追加 2025-03-08 16:00:30 +09:00
ensan-hcl
c240dec854 feat: sessionコマンドにdump/replayの機能を追加 2025-03-08 15:54:12 +09:00
ensan-hcl
99625951c7 fix: 前方文脈に半角スペースが入ると変換が不安定になっていた問題を修正 2025-03-08 15:52:13 +09:00
Miwa
ce48df60ab Merge pull request #158 from fkunn1326/perf-windows
perf: ファイルI/Oでの遅延をなくすために、辞書を事前に読み込めるように
2025-03-06 19:47:54 +09:00
fkunn1326
6bb5d2d49f fix: accept suggestions 2025-03-06 18:37:29 +09:00
fkunn1326
d0397c62ca refactor: キャッシュしたデータをDicdataStoreに保持するように 2025-02-27 07:10:44 +09:00
fkunn1326
39b90389da perf: file I/Oでの遅延をなくすために、事前にキャッシュできるように 2025-02-26 20:24:27 +09:00
fkunn1326
d49fb598fe feat: 最新のllama.cppに対応 2025-02-26 15:52:18 +09:00
Miwa
24f506b5b5 feat: ngramの学習のresume処理を実装 (#156)
* feat: ngramの学習のresume処理を実装

* fix: mock signature for Android
2025-02-13 16:29:25 +09:00
Miwa
0e8e3e7ba3 docs: update zenzai.md (#155)
* Update zenzai.md

* add recent knowledges
2025-02-11 23:06:14 +09:00
fkunn1326
c307efa527 fix: Windows用のワークアラウンド (https://github.com/azooKey/AzooKeyKanaKanjiConverter/pull/122) を削除 (#154)
Swiftのアップデートで挙動が修正されたため
2025-02-11 18:16:52 +09:00
Miwa
531c6fe0fb feat: SwiftNGramWithMarisaTrieへの依存を除去し、内部の実装をターゲットとして追加 (#153) 2025-02-09 20:09:01 +09:00
Miwa
f83ab3559c Merge pull request #151 from ensan-hcl/feat/enhance-email-lookup
feat: Enhance email address conversion feature
2025-02-09 02:53:00 +09:00
Miwa
a39216b0d2 Merge branch 'develop' into feat/enhance-email-lookup 2025-02-09 02:45:31 +09:00