Skip to main content

Next Stroke Suggestions GUI Plugin for Plover

Project description

Next Stroke Suggestions for Plover

PyPI GitHub

This is a plugin that displays the possible options for the next few strokes.

Installation

You can install this plugin using the built-in Plover Plugin Manager, under the name plover-next-stroke.

Usage Notes

Macro Strokes & Shortcuts

To make full use of the plugin, you'll have to define a few additional entries in your dictionary to navigate the menu (They won't be added automatically!). The recommended strokes are just what I use personally, so it's okay if you'd like to use something else.

Action Dictionary Definition Recommended Stroke
Next Page =ns_next_page #WR
Previous Page =ns_prev_page 1K
Reload Suggestions =ns_reload 1KWR

Since the plugin keeps an internal copy of your dictionaries to load suggestions quicker, you'll have to manually reload this internal copy with a reload stroke whenever you add or delete entries to/from any of your dictionaries. You don't need to trigger a manual update if you're switching languages or activating/deactivating dictionaries.

Display Order Types

Display Order Explanation
Frequency Order by lowest stroke count first, then when stroke counts are equal, order by most frequent first based on system orthography list (if available)
Frequency (Prioritize Numbers) Same as Frequency, but strokes containing numbers are prioritized and ordered by numeric value.
Frequency (Prioritize Non-numberic) Same as Frequency, but strokes containing numbers are pushed to the back.
Stroke Count Order by lowest stroke count first, preserving original dictionary order.
Alphabetical Order by translation alphabetically.
System Defined Order defined by the system. The default English stenotype system doesn't have a defined display order. Defaults to Frequency.

System-defined functions

If you're designing a language system for Plover and you'd like to customize the display order and format (for instance, converting certain strokes to numbers), you may do so by including these functions in your system file:

def NS_STROKE_FORMATTER(stroke: str) -> str:
    """Formats single strokes, such as STROEBG"""
    return ...

def NS_TRANSLATION_FORMATTER(translation: str) -> str:
    """Formats the translated string, such as 'stroke'"""
    return ...

def NS_SORTER(entry: Tuple[Tuple[str], str]) -> int:
    """
    Scores outline-translation pairs, such as (("TRAPBS", "HRAEUT"), "translate")

    Pairs are ordered from smallest to biggest;
    it need not be an int - anything that can be compared
    works, including strings or tuples of ints.
    """
    outline, translation = entry
    return ...

All next stroke suggestions will be run through the two formatters (if available) before being sorted. The sorter will only be used if the user changes their display order to "System Defined".

License & Credits

This plugin is licensed under the MIT license.

The icons used in this plugin are taken from Icons8 Flat Color Icons.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plover-next-stroke-0.2.2.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

plover_next_stroke-0.2.2-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file plover-next-stroke-0.2.2.tar.gz.

File metadata

  • Download URL: plover-next-stroke-0.2.2.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.6.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.7

File hashes

Hashes for plover-next-stroke-0.2.2.tar.gz
Algorithm Hash digest
SHA256 38b25c20297206a06ac91029be50c03f84c2c37cee898dd909ce2a139f6d510d
MD5 f5e0671f1bcd272a48104c9ae44d8bf1
BLAKE2b-256 b9591c43463c69d5e45ba1b8b33ee0643490bfcad4734448854529c2fcfd6724

See more details on using hashes here.

File details

Details for the file plover_next_stroke-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: plover_next_stroke-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.6.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.7

File hashes

Hashes for plover_next_stroke-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 079dd5eaa9a0e7ac4dbdb8ff870b95b0176360833c9424f2c1cfde66cf5cd76d
MD5 e1d032349366e576685d5e1fcd92bbb5
BLAKE2b-256 ddcea2f78ab4fff2650a55d501ff938595bc8d094da1be8e372e0098746c28f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page