Stroke and rule analyzer for stenography
Project description
The Spectra Steno Lexer is an experimental tool for analyzing and matching patterns of steno keys against the text they produce using various rules from steno theories (mostly Plover theory). It also has advanced search functions for steno dictionaries which have been mostly lacking in Plover up to this point.
Installation and Operation
Spectra is primarily designed as a plugin for Plover. If you have installed the latest binary release of Plover (4.0.0.dev8 as of this writing), the plugins manager should be able to find this program in the PyPI database and set it up automatically for you. When opened from the main toolbar, Spectra will automatically load Plover’s dictionaries for manual searching and will also attempt to analyze strokes sent from Plover as you type.
If you have built and installed Plover from source, it is not likely to have the plugins manager by default. In this case it is possible to install Spectra through pip like any other Python package. Plover searches through all available Python paths to find plugins; so long as it ends up in the same general place that Plover looks for its other dependencies, it should find it just fine.
Source Installation
To run this software on its own from source, you must have a correctly installed Python distribution (3.6 or greater). Download or clone the source into a free directory, change to this directory in a terminal and type:
python3 setup.py install
This will install it to your Python distribution with all features.
Advanced Operation (from console)
From the console, you can execute the main GUI program on its own by typing:
spectra_lexer gui [DICT1 DICT2 ... DICTn]
where each DICT argument is a path to a JSON file of steno translations (the dictionaries used by Plover are in the correct format). Without arguments, the program will try to find your Plover dictionaries and load those. The standalone mode operates identically to the plugin in all respects except that it cannot decipher strokes in real-time. There is also a menu bar where dictionaries can be loaded manually.
There is also a batch mode available for analysis purposes. Run it by typing:
spectra_lexer batch IN_DICT OUT_DICT
where IN_DICT is a path to a JSON file of steno translations, and OUT_DICT is a path to a (new) JSON file that will store the output. The lexer will run on each translation and store the output in the same format as the rules dictionary files.
Details
This software is currently experimental with many rules unaccounted for, so do not rely on it to figure out the rules of stenography with 100% accuracy. If it cannot match every single steno key to letters in the word, it will simply not return a result at all (to avoid guessing wrong). Inversions and asterisks are particularly troublesome here; inversions of steno order violate the strict left-to-right parsing that lexers rely on, and oftentimes there is not enough context to figure out the meaning of an asterisk from just a stroke and the word it makes in the absence of other information. Briefs are often constructed by keeping only the most important parts or sounds of a word, and Spectra can usually match these, but briefs relying on strange phonetics or arbitrary sequences of keys simply cannot be matched without pre-programmed custom rules (which are included for some of the most common briefs, but not many).
When searching from the lookup tool, if a word is chosen and there is more than one stroke entry for it, the lexer will attempt to analyze each one and select the one that has the best possibility of being “correct” (i.e. not a misstroke), choosing shorter strokes over longer ones to break ties.
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
Hashes for spectra_lexer-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4473c4de72aeb0e1c426285554ff0f3d8832d51bf7b85f5f3e78bd65b4bcee38 |
|
MD5 | 461754c202fbbd976ff859d0a85f5da5 |
|
BLAKE2b-256 | c08372e6dd2db0ea6fbd2fec110303155e64c001d2fa2351f62669f49164f37c |