unscrambler 0.9.3

  • README.md
  • Installing
  • Versions
  • --

unscrambler #

Dart scrabble word unscrambler, for use in word games (i.e. Scrabble) or as an int32 benchmark reference.

Unscrambler requires a word list, sowpods is included (official Scrabble word list, over 200000 words).

The program will preprocess each word and convert it into a list of int32 values.

To find matches, it will then run over all word int32 values and find matches using only 2 bitwise operations.

The algo is quite fast, on my machine it can find all matching words for a given scrambled word in about 4ms.

Try It Now #

Add the unscramble package to your pubspec.yaml file:

dependencies:
  unscramble: any

Usage #

  void main() {
    final String V = 'stbalet'; // scrambled word
    final int numBlanks = 0; // Scrabble blank letters
    final String C = new File('bin/sowpods.txt').readAsStringSync(); // word list
    final Dictionary D = new Dictionary(C);
    
    print(match(D, V, numBlanks)); // all matches
    print(anagrams(D, V)); // all anagrams of the same word length
  }

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  unscrambler: ^0.9.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:unscrambler/unscrambler.dart';
  
Version Uploaded Documentation Archive
1.0.0+2 Jun 26, 2018 Go to the documentation of unscrambler 1.0.0+2 Download unscrambler 1.0.0+2 archive
1.0.0+1 Jun 26, 2018 Go to the documentation of unscrambler 1.0.0+1 Download unscrambler 1.0.0+1 archive
1.0.0 Jun 26, 2018 Go to the documentation of unscrambler 1.0.0 Download unscrambler 1.0.0 archive
0.9.6 Aug 21, 2014 Go to the documentation of unscrambler 0.9.6 Download unscrambler 0.9.6 archive
0.9.5 Aug 21, 2014 Go to the documentation of unscrambler 0.9.5 Download unscrambler 0.9.5 archive
0.9.4 Aug 20, 2014 Go to the documentation of unscrambler 0.9.4 Download unscrambler 0.9.4 archive
0.9.3 Aug 20, 2014 Go to the documentation of unscrambler 0.9.3 Download unscrambler 0.9.3 archive
0.9.1 Aug 20, 2014 Go to the documentation of unscrambler 0.9.1 Download unscrambler 0.9.1 archive
0.9.0 Aug 20, 2014 Go to the documentation of unscrambler 0.9.0 Download unscrambler 0.9.0 archive
Awaiting analysis to complete.