Commit Graph

1745 Commits

Author SHA1 Message Date
zonble 34e193df21 Also updates the README file. 2022-01-14 02:34:23 +08:00
zonble 536aff1070 Removes unused files. 2022-01-14 01:38:32 +08:00
zonble fcdd59dd6b Wraps OpenCCBridge into a SPM package. 2022-01-14 00:57:41 +08:00
zonble e01eb46c9f Wraps InputSourceHelper to a SPM package. 2022-01-14 00:43:21 +08:00
zonble d4772ffa99 Adds notifier UI to notify user Chinese conversion on/off. 2022-01-13 23:38:56 +08:00
zonble a7e38b5b2d Fine-tunes tooltip UI. 2022-01-13 22:00:29 +08:00
zonble 366453820d Adds a tiny tooltop for shift-left/right selections. 2022-01-13 21:47:52 +08:00
zonble 4c1781d970 Renames half-size to half-width. 2022-01-13 19:59:49 +08:00
zonble 9cd2306313 Adds emacs-style hotkeys. 2022-01-13 19:57:08 +08:00
zonble 232a944953 Implements half-size punctuations. 2022-01-13 17:07:22 +08:00
Lukhnos Liu c31e390122 Merge pull request #218 from zonble/dev/user_phrases_lm
Adds UserPhrasesLM for user phrases.
2022-01-12 07:51:37 -08:00
zonble d590d748f8 Adds UserPhrasesLM for user phrases.
Since there is no probability information for users' custom phrases,
they should be stored in a format differs from data.txt. Using the same
format and FastLM to parse user phrases just because of laziness but it
is not the right way.

The pull request adds a new language model class to parse user phrases.
It also update the input method controller to adopt the new user phrase
format.
2022-01-12 16:53:51 +08:00
Weizhong Yang a.k.a zonble fb513f51b0 Merge pull request #216 from zonble/dev/lm_management
Introduces custom excluded phrases
2022-01-12 13:25:06 +08:00
zonble f1e56a7e01 Lets McBopomofoLM to accept NULL as the parameter in loadUserPhrases. 2022-01-12 13:17:41 +08:00
zonble 84fc2f068b Removes unused code and fixes a typo. 2022-01-12 13:16:10 +08:00
Weizhong Yang a.k.a zonble 819e1be8d6 Merge pull request #217 from lukhnos/fix-vertical-candidate-ui
Fix regression in vertical candidate UI
2022-01-12 12:52:19 +08:00
Lukhnos Liu 7c354a5b6c Fix regression in vertical candidate UI
The table view style must be set before it's added as the scroll view's
content view. See [1].

[1] https://github.com/openvanilla/McBopomofo/blob/1.1/Source/CandidateUI/VTVerticalCandidateController.m#L110
2022-01-11 20:43:31 -08:00
zonble abdf97f652 Adds McBopomofoLM as the facade of three language models.
- main language model
- user phrases
- user excluded phrases
2022-01-12 12:26:24 +08:00
zonble 56896625e3 Removes unused comments. 2022-01-12 01:17:39 +08:00
zonble cbd21cbe1d Updates localization. 2022-01-12 01:10:39 +08:00
zonble ea36061a41 Implements excluding punctuations. 2022-01-12 00:36:55 +08:00
zonble 9b485b799c Implements excluding phrases. 2022-01-12 00:16:55 +08:00
zonble 144d133463 Adds Language Model Manager.
The reference of the global language models were stored in the class
InputMethodController, however, the global models are global but not a
part of the input method controller, and the input method controller
only use one of the models (McBopomofo/Plain Bopomofo). I guess it
somehow violates SRP and there should be a better place for the global
models.
2022-01-11 17:12:58 +08:00
zonble f339948219 Fixes duplicated code and typos. 2022-01-11 13:46:29 +08:00
Weizhong Yang a.k.a zonble 11d33c0b42 Merge pull request #212 from zonble/dev/swiftify
Converts most of the Objective-C classes into Swift
2022-01-11 02:53:32 +08:00
Weizhong Yang a.k.a zonble b6ad33967a Merge pull request #211 from zonble/master
Fixes the bug that I forgot to create the user phrases folder.
2022-01-11 02:44:48 +08:00
zonble df3914eeed Fixes a minor bug in the new Swift app delegate. 2022-01-11 02:35:31 +08:00
zonble a7b2edcf26 Converts AppDelegate to Swift. 2022-01-11 02:22:13 +08:00
zonble 52bf2d67c5 Updates copyright information. 2022-01-11 01:13:28 +08:00
zonble 61e2751702 Converts candidate UI to a Swift package. 2022-01-11 01:07:17 +08:00
zonble 867a828722 Fixes minor layout issues. 2022-01-11 00:47:48 +08:00
zonble f7e927d67d Starts to use Swift candidate UI.
There are bugs still.
2022-01-11 00:30:02 +08:00
zonble a97cc5ca6c Converts VerticalCandidateController to Swift. 2022-01-11 00:03:32 +08:00
zonble 5aafe64751 Starts to convert candidate UI to Swift. 2022-01-10 22:01:40 +08:00
zonble ba6889fa63 Converts OVInputSourceHelper to Swift. 2022-01-10 22:01:40 +08:00
zonble 84849bdb3d Converts the preference and non modal view controller to Swift. 2022-01-10 22:01:40 +08:00
zonble 75a0f68a9c Fixes the bug that I forgot to create the user phrases folder.
There was a legacy user override model which creates a folder and a
plist file. If a user uses McBopomofo for years, the folder would
exist. However, when the old override model was removed, I forgot
to create the folder for the new user phrase file.

The bug would let the users with new installation of McBopomofo unable
to add user phrases.
2022-01-10 21:59:18 +08:00
zonble 6bdd2aab44 Fixes a bug on building the unigrams. 2022-01-09 13:00:19 -08:00
zonble b4276f0488 Fixes a bug on building the vector for unigrams from both global language model and user phrases. 2022-01-09 13:00:19 -08:00
zonble 1e5bad20c2 Removes unused references. 2022-01-09 08:38:32 -08:00
zonble 5b72e48a4e Minor fine-tunes on the preference window. 2022-01-09 08:38:32 -08:00
zonble 0af238ef79 Cleans-up unused logs. 2022-01-09 08:38:32 -08:00
zonble 3763688275 Fixes a typo. 2022-01-09 08:38:32 -08:00
zonble a5247d958c Makes it able to reload user phrases. 2022-01-09 08:38:32 -08:00
zonble e909dc20b5 Uses user phrases in the block builder. 2022-01-09 08:38:32 -08:00
zonble 6f761ecbcd Implements adding phrase from shift and arrow keys. 2022-01-09 08:38:32 -08:00
zonble 358462dff1 [WIP] Starts to work on the user phrases. 2022-01-09 08:38:32 -08:00
Weizhong Yang a.k.a zonble 39cdc7d73d Merge pull request #207 from openvanilla/rebased-user-override-model
Implements an exponential decay-based user candidate override model, rebased from #135
2022-01-07 13:20:52 +08:00
ovadmin 789d2a5687 計算選字事件時,若遇到常用標點,將標點視為句尾
如此一來標點後的單字詞,在計算時,等同於句首第一詞。
2022-01-06 18:28:37 -08:00
ovadmin aeb774a8ed 小幅重構重複的程式碼 2022-01-06 18:28:37 -08:00