Skip to content

Releases: rothos/lexitron

v5.2.0

Choose a tag to compare

@rothos rothos released this 30 Oct 02:38

ry -S finds words by how they sound, and lx -f/-a letters can go anywhere.

Words by sound

  • ry -S '.*sigh' gives words ending in the sound of "sigh", however they're spelled: "sigh", "psi", "bonsai". sigh.* starts with it, and .*shun.* has it anywhere.
  • Words stand for their sounds, so a bare word gives its homophones: ry -S night gives "knight" and "nite".
  • ., *, +, ?, |, () and {} work as in lx, and ARPAbet works in capitals: ry -S '.* SH AH N'. Stress doesn't count unless you give it (AY1).
  • A spelling expression and the usual filters narrow the results: ry -S '.*shun' '.*cian' gives "magician", "musician" and the like.

Letters

  • -f and -a now take their letters directly, so lx '....s' -f jslauy. works like lx -f jslauy. '....s'. Before, the first word was always taken as the letters. Bundles like -rf and -fr still work.
  • In a terminal, a search with no results says (no matches) rather than printing nothing.

See the README for more.

v5.1.0

Choose a tag to compare

@rothos rothos released this 25 Oct 00:28

lx -R picks random words.

Random words

  • lx -R gives one random word, and lx -R 10 gives ten.
  • It picks from whatever the other options match: lx -R 5 -l 6 '.*e' gives six-letter words ending in "e", and lx -R 3 -t abba gives words like "boob" and "peep". Letters, Wordle, --plus and the rest work too.
  • The words are everyday base forms: no plurals or conjugations, and level 50 unless you give -L.
  • They come in random order unless you give -o. With -I, the header says how many matches they were picked from.

See the README for more.

v5.0.0

Choose a tag to compare

@rothos rothos released this 24 Oct 05:26

A new command, ry: a rhyming dictionary, built on the same word list as lx and the CMU Pronouncing Dictionary.

Rhymes

  • ry cat finds perfect rhymes, grouped by syllables, most common first. Weak rhymes like "bobcat" come last.
  • Long rhymes, which also match the vowels from the stress before, come first: ry understand starts with "wonderland". -g shows only those.
  • -N near rhymes, closest first (ry -N love: rough, stuff, enough), and -A assonance, the same vowels with any consonants (ry -A weblog: headlong, headstrong).
  • -w wrenched rhymes, the same sounds with the stress on one side only (ry -w be: philosophy, democracy; ry -w window: go, below). It combines with -N and -A.
  • A word with no perfect rhymes gets near rhymes instead, and one with few gets some near rhymes as well.

Phrases and pronunciations

  • Phrases rhyme too: ry 'hurt you' gives "virtue" and also "alert you", "desert you".
  • About 220,000 words the dictionary lacks are derived from ones it has ("chasms" from "chasm") or guessed, and guesses are flagged.
  • Give a pronunciation in ARPAbet to rhyme it directly: ry "K AE1 T".

Filters

  • -y picks the number of syllables, and lx's expression, -L, -l, -i, -e, -t, -p and -u options work the same way: ry -y 2 -L 50 money.

See the README for examples.

v4.1.0

Choose a tag to compare

@rothos rothos released this 23 Oct 21:13

Longer patterns, and fixes from an audit of how the options combine.

Patterns

  • -t understands .*, .+ and .? as in regex, so a pattern can match words of any length: lx -t ab.*ab finds "decade", "church" and "alphabetical".

Wordle

  • After a poor opener, with thousands of candidates left, guesses are scored against an evenly spaced sample, so results stay quick (a few seconds at worst).
  • With -u, proper and common candidates are scored together, so the bits are right.
  • Wordle guesses of different lengths, and --probes with -o, are now errors instead of being ignored.

Speed

  • -o best stops with an error on lists over 5000 words instead of running for minutes.
  • -n skips sorting, so counts are faster.

See the README for examples.

v4.0.0

Choose a tag to compare

@rothos rothos released this 23 Oct 12:08

New filters, a proper Wordle solver, and tools for Scrabble and word ladders.

Breaking changes

  • -i now means --include (see below). The info header is -I.
  • Blank tiles in -f and -a letters are . only, matching what . means in expressions and patterns: lx -a dot.. ? is no longer accepted.
  • The old option names --only-phrases and --only-uppercase are gone; use --phrases-only and --uppercase-only.

New filters

  • -i / -e: words that contain all of these letters / none of them. Repeats count, so -i ee means at least two e's: lx -i q -e u
  • -t: patterns, where each letter stands for some letter: lx -t abba finds "deed" and "noon", lx -t abcdcba finds "racecar" and "deified"
  • The expression can be left out when another option says what to look for.

Word games

  • -w: Wordle. One per guess, with g, y or . for each letter: lx -w crane:..y.g -w toils:.y.... The best next guesses come first, with how much each would tell you, in bits. Guesses that can't be the answer but would narrow things down more are listed first, dimmed. --probes lists only those: the best and worst 20.
  • --plus, --minus, --change: words one letter away (or N, with cat:2), for word ladders and the like: lx --change love
  • --hooks: Scrabble hooks: lx --hooks at shows bcefghklmoprstvw at e
  • New sort order -o best: best Wordle guess first (the default with -w).

Other changes

  • Shorter help, with the options in a more sensible order.
  • The -I header mentions the length when -l is given.

See the README for examples.

v3.3.1

Choose a tag to compare

@rothos rothos released this 23 Oct 10:31

Consistent option names.

Changes

  • --only-phrases and --only-uppercase are now --phrases-only and --uppercase-only, matching --base-only and --number-only. The old names still work. The short flags (-P, -U) are unchanged.

v3.3.0

Choose a tag to compare

@rothos rothos released this 23 Oct 10:29

Consistent phrases.

Word list

  • Phrases with spaces are now listed in their base form only: "sperm whale", not "sperm whales". SCOWL gives plurals for only a few phrases ("sperm banks" but not "sperm cells"), so the 5,462 inflected phrases are left out for consistency.
  • Hyphenated words keep their inflected forms ("x-rayed", "to-dos"). Single words are unchanged.

See the README for details.

v3.2.0

Choose a tag to compare

@rothos rothos released this 23 Oct 10:14

Phrases only.

New option

  • -P searches only phrases and hyphenated entries: lx -P 'sperm.*' gives "sperm bank", "sperm whale" and so on, without "sperm" or "spermicide". -p still adds phrases to the usual results; the two can't be combined.
  • From Python: search(..., phrases=True, single_words=False).

See the README for details.

v3.1.0

Choose a tag to compare

@rothos rothos released this 23 Oct 10:07

Word families and color.

New default sort

  • Results are still alphabetical, but inflected forms now come right after their base form: run ran running runs runabout. Use -o alpha for the old strict alphabetical order (this also applies to piped output).

Styled terminal output

  • Inflected forms listed under their base form are dimmed, so each family stands out.
  • Other words are colored by how common they are: bold green for core vocabulary, then green, yellow and orange, to red for the most obscure.
  • Set NO_COLOR to turn styling off. Piped output is never styled.

See the README for details.

v3.0.0

Choose a tag to compare

@rothos rothos released this 19 Oct 09:06

A big update: a new word list, whole-word matching, and tools for word games (anagrams, letter racks with blank tiles, Spelling Bee, Wordle).

Breaking changes

  • Expressions now match the whole word. In 2.x, lx cat matched any word containing "cat"; to get that behavior now, use lx -s cat.
  • Inflected forms (plurals, conjugations, etc) are now searched too; use -b to search base forms only, as in 2.x.
  • New word list: SCOWL replaces AGID, so results differ. It adds everyday words AGID was missing ("a", "of", "from"), British and other spellings, and obscurity levels. The default level (-L 70) leaves out very obscure words; use -L 95 to search everything.
  • Requires Python 3.9 or later.

New options

  • -f / -a: words spelled from given letters / exact anagrams, with -r to reuse letters and ? or . as blank tiles: lx -a 'retain?'
  • -l: length (5, 4-7, 5-); -o: sort by length or common; -L: obscurity level; -p: phrases like "sperm whale"; -c: case-sensitive
  • Options can go anywhere on the command line.

Fixes

  • Output no longer crashes when piped or redirected; it falls back to one word per line.
  • Invalid regular expressions give a short error instead of a traceback.
  • Apostrophes in expressions are no longer stripped.
  • -i with -n prints the header line; -u and -U can no longer be combined.

Lexitron can also be used as a Python library: from lexitron import search. See the README for examples.