vChewing-macOS/Source
zonble 2ebc789030 Implements the associated phrases function.
Since we use states manage the input flow in McBopomofo, implementing this function becomes easy. What I did is to create a new state, Associated Phrases state, and let the key handler to emit such a state just after emitting a Committing state.

When the input method controller is under Associated Phrase state, it shows the candidate window with a tooltip, and only accept candidate keys with the shift key. The key handler uses the characters without modifiers in an NSEvent object to find if there is any matching candidate label, so I added a new member "inputTextIgnoringModifiers" to KeyHandlerInput.

I use KeyValueBlobReader to read the associated phrases. I use the cin file from OpenVanilla project but removed the head and tail of the file to pass KeyValueBlobReader's validation.
2022-01-31 13:23:49 +08:00
..
Base.lproj Updates copyright information. 2022-01-22 11:24:22 +08:00
Engine Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
Images Show no update available when checking explicitly 2020-10-18 12:48:14 -07:00
Installer Adds a missing line back to the installer. 2022-01-22 00:07:07 +08:00
Tools Update copyright headers (fixes #213) 2022-01-18 14:21:55 -08:00
en.lproj Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
zh-Hant.lproj Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
AppDelegate.swift Loads the user phrases just after the files are changes. 2022-01-31 04:29:53 +08:00
InputMethodController.swift Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
InputState.swift Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
KeyHandler.h Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
KeyHandler.mm Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
KeyHandlerInput.swift Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
LanguageModelManager+Privates.h Updates the copyright title and the README file. 2022-01-30 08:06:22 +08:00
LanguageModelManager.h Modifies the interface of LanguageModelManager to note that some methods are for testing only. 2022-01-30 20:18:43 +08:00
LanguageModelManager.mm Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
McBopomofo-Bridging-Header.h Converts InputMethodController to Swift. 2022-01-30 08:06:22 +08:00
McBopomofo-Info.plist Bump to version 2.0.1 2022-01-20 15:37:31 -08:00
McBopomofo-Prefix.pch Project reorganization. 2012-09-08 19:28:15 -07:00
NonModalAlertWindowController.swift Merge pull request #245 from lukhnos/update-copyright-headers 2022-01-19 13:29:23 +08:00
NonModalAlertWindowController.xib Converts the preference and non modal view controller to Swift. 2022-01-10 22:01:40 +08:00
Preferences.swift Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
PreferencesWindowController.swift Merge pull request #245 from lukhnos/update-copyright-headers 2022-01-19 13:29:23 +08:00
README Updates the copyright title and the README file. 2022-01-30 08:06:22 +08:00
main.swift Updates copyright information. 2022-01-22 11:24:22 +08:00

README

.
├── AppDelegate.swift
├── Base.lproj
│   ├── Credits.rtf
│   ├── MainMenu.xib
│   ├── preferences.xib
│   ├── template-data.txt
│   ├── template-exclude-phrases-plain-bpmf.txt
│   ├── template-exclude-phrases.txt
│   └── template-phrases-replacement.txt
├── Data
│   ├── BPMFBase.txt
│   ├── BPMFMappings.txt
│   ├── BPMFPunctuations.txt
│   ├── Makefile
│   ├── PhraseFreq.txt
│   ├── README
│   ├── Symbols.txt
│   ├── bin
│   │   ├── C_Version
│   │   │   ├── Makefile
│   │   │   ├── count.bash
│   │   │   └── count.occurrence.c
│   │   ├── README
│   │   ├── Sample_Prep
│   │   │   ├── build.bash
│   │   │   └── filter.bash
│   │   ├── bpmfmap.py
│   │   ├── buildFreq.py
│   │   ├── cook-plain-bpmf.py
│   │   ├── cook.py
│   │   ├── cook_util.py
│   │   ├── count.bash
│   │   ├── count.occurrence.py
│   │   ├── disabled
│   │   │   ├── BIG5toUTF8.pl
│   │   │   ├── bpmfmap_human.py
│   │   │   ├── build4wlist.bash
│   │   │   ├── buildFreq.bash
│   │   │   ├── cook.rb
│   │   │   ├── count.occurrence.pl
│   │   │   ├── countphrase.bash
│   │   │   ├── randomShuffle.bash
│   │   │   ├── typocorrection.bash
│   │   │   └── utf8length.pl
│   │   ├── nonCJK_filter.py
│   │   ├── self-score-test.py
│   │   └── textpool.rc
│   ├── data-plain-bpmf.txt
│   ├── data.txt
│   ├── exclusion.txt
│   ├── heterophony1.list
│   ├── heterophony2.list
│   ├── heterophony3.list
│   ├── memo
│   │   ├── blacklist.txt
│   │   ├── covered_by_others.txt
│   │   ├── covered_by_singles.txt
│   │   └── falsecount.txt
│   └── phrase.occ
├── Engine
│   ├── CMakeLists.txt
│   ├── Gramambular
│   │   ├── Bigram.h
│   │   ├── BlockReadingBuilder.h
│   │   ├── Gramambular.h
│   │   ├── Grid.h
│   │   ├── KeyValuePair.h
│   │   ├── LanguageModel.h
│   │   ├── Node.h
│   │   ├── NodeAnchor.h
│   │   ├── Span.h
│   │   ├── Unigram.h
│   │   └── Walker.h
│   ├── KeyValueBlobReader.cpp
│   ├── KeyValueBlobReader.h
│   ├── KeyValueBlobReaderTest.cpp
│   ├── Mandarin
│   │   ├── Mandarin.cpp
│   │   └── Mandarin.h
│   ├── McBopomofoLM.cpp
│   ├── McBopomofoLM.h
│   ├── OpenVanilla
│   │   ├── OVAroundFilter.h
│   │   ├── OVBase.h
│   │   ├── OVBenchmark.h
│   │   ├── OVCINDataTable.h
│   │   ├── OVCINDatabaseService.h
│   │   ├── OVCINToSQLiteConvertor.h
│   │   ├── OVCandidateService.h
│   │   ├── OVDatabaseService.h
│   │   ├── OVDateTimeHelper.h
│   │   ├── OVEncodingService.h
│   │   ├── OVEventHandlingContext.h
│   │   ├── OVException.h
│   │   ├── OVFileHelper.h
│   │   ├── OVFrameworkInfo.h
│   │   ├── OVInputMethod.h
│   │   ├── OVKey.h
│   │   ├── OVKeyPreprocessor.h
│   │   ├── OVKeyValueMap.h
│   │   ├── OVLoaderBase.h
│   │   ├── OVLoaderService.h
│   │   ├── OVLocalization.h
│   │   ├── OVModule.h
│   │   ├── OVModulePackage.h
│   │   ├── OVOutputFilter.h
│   │   ├── OVPathInfo.h
│   │   ├── OVSQLiteDatabaseService.h
│   │   ├── OVSQLiteWrapper.h
│   │   ├── OVStringHelper.h
│   │   ├── OVTextBuffer.h
│   │   ├── OVUTF8Helper.h
│   │   ├── OVWildcard.h
│   │   └── OpenVanilla.h
│   ├── ParselessLM.cpp
│   ├── ParselessLM.h
│   ├── ParselessLMBenchmark.cpp
│   ├── ParselessLMTest.cpp
│   ├── ParselessPhraseDB.cpp
│   ├── ParselessPhraseDB.h
│   ├── ParselessPhraseDBTest.cpp
│   ├── PhraseReplacementMap.cpp
│   ├── PhraseReplacementMap.h
│   ├── PhraseReplacementMapTest.cpp
│   ├── UserOverrideModel.cpp
│   ├── UserOverrideModel.h
│   ├── UserPhrasesLM.cpp
│   ├── UserPhrasesLM.h
│   └── UserPhrasesLMTest.cpp
├── Images
│   ├── Bopomofo.tiff
│   ├── Bopomofo@2x.tiff
│   ├── Images.xcassets
│   │   ├── AlertIcon.imageset
│   │   │   ├── 128X128.png
│   │   │   ├── 192x192.png
│   │   │   ├── 64X64.png
│   │   │   └── Contents.json
│   │   ├── AppIcon.appiconset
│   │   │   ├── 1024X1024.png
│   │   │   ├── 128X128.png
│   │   │   ├── 16X16.png
│   │   │   ├── 256X256.png
│   │   │   ├── 32X32.png
│   │   │   ├── 512X512.png
│   │   │   ├── 64X64.png
│   │   │   └── Contents.json
│   │   └── Contents.json
│   ├── PlainBopomofo.tiff
│   └── PlainBopomofo@2x.tiff
├── InputMethodController.swift
├── InputState.swift
├── Installer
│   ├── AppDelegate.swift
│   ├── ArchiveUtil.swift
│   ├── Base.lproj
│   │   └── MainMenu.xib
│   ├── BundleTranslocate.h
│   ├── BundleTranslocate.m
│   ├── Installer-Info.plist
│   ├── Installer-Prefix.pch
│   ├── McBopomofoInstaller-Bridging-Header.h
│   ├── NotarizedArchives
│   │   └── README.md
│   ├── en.lproj
│   │   ├── InfoPlist.strings
│   │   ├── License.rtf
│   │   └── Localizable.strings
│   └── zh-Hant.lproj
│       ├── InfoPlist.strings
│       ├── License.rtf
│       ├── Localizable.strings
│       └── MainMenu.xib
├── KeyHandler.h
├── KeyHandler.mm
├── KeyHandlerInput.swift
├── LanguageModelManager+Privates.h
├── LanguageModelManager.h
├── LanguageModelManager.mm
├── McBopomofo-Bridging-Header.h
├── McBopomofo-Info.plist
├── McBopomofo-Prefix.pch
├── NonModalAlertWindowController.swift
├── NonModalAlertWindowController.xib
├── Preferences.swift
├── PreferencesWindowController.swift
├── README
├── Tools
│   ├── genRTF.py
│   └── tistool.m
├── en.lproj
│   ├── Credits.rtf
│   ├── InfoPlist.strings
│   └── Localizable.strings
├── main.swift
└── zh-Hant.lproj
    ├── Credits.rtf
    ├── InfoPlist.strings
    ├── Localizable.strings
    ├── MainMenu.xib
    ├── preferences.xib
    ├── template-data.txt
    ├── template-exclude-phrases-plain-bpmf.txt
    ├── template-exclude-phrases.txt
    └── template-phrases-replacement.txt

23 directories, 182 files