mlange-42 / xwrd

xwrd is a word matching and anagram command line tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xwrd

Test status GitHub MIT license

xwrd is a word matching and anagram command line tool.

  • Find words by patterns of known letters
  • Find anagrams
  • Find partial anagrams
  • Find (partial) anagrams with unknown letters
  • Find multi-word anagrams

Installation

Using Go:

go install github.com/mlange-42/xwrd@latest

Without Go:

Download binaries for your OS from the Releases.

Getting started

Install and set a dictionary

Before working with xwrd, you need a word list, aka dictionary. Dictionaries can be installed manually, or downloaded via the xwrd CLI.

English dictionary elasticdog/yawl (260k words):

xwrd dict install en/yawl
xwrd dict set en/yawl

German dictionary enz/german-wordlist (680k words):

xwrd dict install de/enz
xwrd dict set de/enz

Anagrams

Run with words to process:

xwrd anagram <word1> <word2> ...

Run interactively by calling without positional arguments:

xwrd anagram

Partial anagrams:

xwrd anagram --partial

Multi-word anagrams:

xwrd anagram --multi

Find words by pattern

Run with patterns to process:

xwrd match .a..x
xwrd match .a..x q*a

Run interactively by calling without positional arguments:

xwrd match

Patterns

. (period) stands for one arbitrary letter
* (asterisk) stands for 0 or more arbitrary letters

Examples

a.... - find all 5-letter words starting with 'a'
*pf - find all words ending with 'pf'
a....b - find all words of length 6 that start with 'a' and end with 'b'

About

xwrd is a word matching and anagram command line tool

License:MIT License


Languages

Language:Go 100.0%