Find all the words that can be made with a set of letters
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes
.gitignore
WordsPlease.pm
index.pl
readme.md
style.css

readme.md

WordsPlease

A Perl script to find all words in a dictionary containing specified letters. Live demo available at http://davepagurek.com/wordsplease

Input

WordsPlease works with text files with one word per line.

Usage

1. Create an instance of WordsPlease

Parameters:
  1. Directory: The directory with your dictionary text files
  2. Word limit (optional): If a limit is specified, WordsPlease stops after finding that amount of words in whatever order they were found in.
  3. Time limit (optional): If a limit is specified, WordsPlease stops looking after the specified number of seconds.
```perl use WordsPlease; my $wordsPlease = new WordsPlease("dictionaries", 1000, 3); ```

Word list text files can be downloaded online from your source of choice. The live demo uses the SIL International list.

2. Get an array of matched words

Parameters:
  1. Letters
  2. Exclusivity (optional, default is 0): If 1, no letters not listed can be in the word
  3. Match Quantity (optional, default is 0): If 1, only as many of each letter as appear in the letters string can be in the word
```perl my @matchedWords = $wordsPlease->wordsWith("abcde", 1, 1); ```