=?utf-8?q?Companion_plugin_for_B=C3=A9poSt=C3=A9no_-_cycle_through_homophones_and_split_words_at_previous_stroke?=
Project description
Plover Cycle through homophones
Companion plugin for BépoSténo - includes the following macros:
- split_previous split the last word's two last syllables. This is in case plover reads the last two strokes as a single word (eg "A-LAn" turning into "allant" when you want "a lent")
- find_homophone cycles through homophones from the dictionnary
Usage
-
Cycle through homophones:
add a stroke to your Plover dictionnary in the following format:
"<stroke>": "=find_homophone",
-
For split_previous:
This functionality is tricky. The expected behaviour here, is that for any stroke that calls the macro while containing the splitter key, it will split the previous word's last stroke and attach it to the current one.
Here's an example:
In the first line, we see the second stroke attaches erroneously to the first stroke. In the second line, the same thing happens, but the macros gets called, splits the second stroke and attaches it to the third one.
In order to achieve this functionality, there is sadly no way other than associating every stroke available in your dictionnary to your a splitter key. This means creating a copy of every single stroke of the dictionnary, adding the splitter key inside of it, and binding them to a call of the macro. The splitter key must be at the end of the steno order, optionnally a suffix stroke. In the following example, I associated the
ß
symbol to the splitter key. It follows the traditionnal format"<stroke><splitter_key>": "=split_previous"
{
"SKPREDCß": "=split_previous",
"SKPIlß": "=split_previous",
"SKPInCß": "=split_previous",
"SKPIß": "=split_previous",
"SKMECß": "=split_previous",
}
Currently, the key is hardcoded on line 30 in split_previous/__init__.py
to ß
, so you'll have to change that to whatever suits your needs.
In these conditions, how do I create a copy of every single stroke in the dictionnary?. A good starting point would be to use the following command in your dictionnary's directory:
jq 'keys' * | sed -e 's/\//",\n"/g' -e 's/^\s*//' | sort --unique | awk '!/[\[|\]]/' | sed -e '/[\\.]/d' -e '/,"/d' -e 's/"$/",/' -e 's/",/ß":"=space_or_split",/' -e 's/,$//' -e '1s/^/{\n/' -e 's/$/,/' | sort --unique | sed -e '$s/,$/\n}/'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file plover_cycle_homophones-0.0.2.tar.gz
.
File metadata
- Download URL: plover_cycle_homophones-0.0.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 408387cc51e2d1fb999ee891783e09829edb866bbd55583fe1c0e7a7fafc2c53 |
|
MD5 | 74553f5111725f8bd3d68ea8b9ef6569 |
|
BLAKE2b-256 | c60002b4bd49208c2cfcaa349affb1a53b0c65a84476816edfffef18bd309eef |
File details
Details for the file plover_cycle_homophones-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: plover_cycle_homophones-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caadeca17d9252606084d03f2e22937f9acb64801b705c41aa43d73dc8e59119 |
|
MD5 | 6bbf8390f12dc0e5634eeb4b260316ed |
|
BLAKE2b-256 | a9b1174b4503edd4d79a6db27f7c84842aebaf652e88b1015e73a84c02d69db1 |