Skip to content

davepagurek/WordsPlease

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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); ```

About

Find all the words that can be made with a set of letters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages