Word Lists

From Codefool

Jump to: navigation, search

Contents

Overview

This is a scratchpad page for a project to build a simple "game" to help my son with his reading. The idea is to present words one letter at a time, and then he has to pick the correct word from a list of alternatives. This means I need to have a list of alternatives, and know their characteristics, such as:

  1. words that have the same length (cold and cool)
  2. words that are anagrams of each other (bear and bare)
  3. words that differ by only n letters (hear and head)
  4. words that have the same first n letters (heat and hear)
  5. words that are palindromes (racecar and madam)

So, the idea is that after viewing the letters of a word one at a time (or n at a time) that he can pick the correct word from a list - e.g. he sees b-e-a-r and can pick "bear" from a list. By increasing the length of the words, and the number of letters presented at a time, the hope is that this will expand his memory skill and improve his mental acuity.

Basic Design

The words must be in an n-off network of related words. The edges contain most of the selection information, while the nodes themselves contain little more than the word itself.

  • Word Node
    • Word (char 32) - According to this reference should suffice for any English word.
    • Length (unsigned byte)
    • Palindrome (bool)
    • hasSpaces (bool) - e.g "a priori" or "a capella"
  • Edge
    • Length delta [src.length - trg.length](signed byte)
    • Letter delta (signed byte)
    • Leading sequence length (byte)
    • Anagram (bool)

Database

Edges exist in a marriage table between two words, and should be usable in both directions. That is, the relationship of word A to word B, is the same as word B to word A, so duplicate edge records are unnecessary.

WORD VARCHAR(32)

Resources

  1. 12dicts package
  2. SIL English Word List
Personal tools