<commit_before># README

This is a dictionary lookup script for [Plover](https://github.com/openstenoproject/plover) made for OS X. You can use it to discover which strokes can be used to produce a word (or phrase).

Derived from [this Automator workflow](http://stenoknight.com/plover/aviary/phpBB3/viewtopic.php?f=14&t=4386&p=6524&hilit=dictionary+lookup#p6524).


# Features

* Bash dictionary lookup script to find all the briefs for a given translation (desired word).
* AppleScript UI for presenting dictionary lookup results, showing the shortest brief first.


# Installation

1.  Download the 2 files included:

    `git clone https://github.com/dimonster/plover-dictionary-lookup.git ~/plover-dictionary-lookup`

2.  Update the path to your Plover application dictionary in `dictlook`.
3.  Update the path to `dictlook` in `dictlook-ui.scpt`.


# Usage

There are a few options for using the dictionary lookup script:

- Run the script on the command line:

    `cd ~/plover-dictionary-lookup`

    `./dictlook the-word-you-want-to-lookup`

- Add the AppleScript to [an Automator workflow](http://stenoknight.com/plover/aviary/phpBB3/viewtopic.php?f=14&t=4386&p=6524&hilit=dictionary+lookup#p6524), then select the word you want to look up and use the context-menu service by right-clicking on the word or using a keyboard shortcut you've mapped to the service.

- Use [the Alfred workflow](https://github.com/dimonster/alfred-plover-dictionary-lookup).
<commit_msg>Update README for new features<commit_after># README

This is a dictionary lookup script for [Plover](https://github.com/openstenoproject/plover) made for OS X. You can use it to discover which strokes can be used to produce a word (or phrase).

Derived from [this Automator workflow](http://stenoknight.com/plover/aviary/phpBB3/viewtopic.php?f=14&t=4386&p=6524&hilit=dictionary+lookup#p6524).


# Features

* Bash dictionary lookup script to find all the briefs for a word you would like to learn how to type.
* AppleScript UI for presenting dictionary lookup results:
  * Shows the shortest brief first.
  * Presents a text area to practice typing in.


# Installation

1.  Download the 2 files included:

    `git clone https://github.com/dimonster/plover-dictionary-lookup.git ~/plover-dictionary-lookup`


2.  Update the path to your Plover dictionaries folder in `dictlook`, for example:

    `grep -ia "$str" $HOME/Library/Application\ Support/plover/*.json | awk -F '": ' '{ print length($1), $0 }' | sort -n | grep -o '".*$'`


3.  Update the path to `dictlook` in `dictlook-ui.scpt`, for example:

    `do shell script "$HOME/plover-dictionary-lookup/dictlook -x " & "\"" & input & "\""`



# Usage

There are a few options for using the dictionary lookup script:

- Run the script on the command line:

    `cd ~/plover-dictionary-lookup`

    `./dictlook the-word-you-want-to-lookup`

- Add the AppleScript to [an Automator workflow](http://stenoknight.com/plover/aviary/phpBB3/viewtopic.php?f=14&t=4386&p=6524&hilit=dictionary+lookup#p6524), then select the word you want to look up and use the context-menu service by right-clicking on the word or using a keyboard shortcut you've mapped to the service.

- Use [the Alfred workflow](https://github.com/dimonster/alfred-plover-dictionary-lookup).

{'fraction_non_alphanumeric': 0.10620815581253804, 'fraction_numerical': 0.02130249543517955, 'mean_word_length': 4.242424242424242, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4640677', 'n_tokens_mistral': 1091, 'n_tokens_neox': 996, 'n_words': 355}