Join 3,495 readers in helping fund MetaFilter (Hide)


custom keypad mapping to common words?
March 30, 2011 8:14 AM   Subscribe

Is there an easy way to map numbers to words on a CUSTOM keypad- SORT OF like - but not exactly like - the way you map letters on phone keys to words... i.e. my phone number 638-9675 spells "network."

So here's my issue:

Looking to develop a nmemonic (sp?) device that would assist users using a custom keypad... the user would be given a six digit code (on a six digit keypad), such as '631524' which they could use to get information at a specific location.

I'd also like to - since the user would use their six digit number multiple times across multiple days - provide a word that would map to letters which would also be on the keypad, as follows (eliminates letters Q and X)

1 - ABCD
2 - EFGH
3 - IJKL
4 - MNOP
5 - RSTU
6 - VWYZ

so if, for example, a user's code is 453321, the notification would also provide a word that mapped to that code... such as 'PULLED.' This would provide them an easy-to-remember ways to get the information at a later time than remembering the code itself.

Nice thing is that every number above has a vowel in it (if you count Y).

Now the challenge is how to 1) find a list of six letter words, and 2) how to map those words to the possible codes that would be generated by a back end system (or vice versa - map the codes to real words...).

Any help from the ask hive mind?
posted by dyerfr to Technology (9 answers total)
 
List of 6 letter words.

You probably want to remove obscure or offensive ones first though ("Your reference number is: 251325. Remember this with the handy mnemonic: FUCKER").
posted by EndsOfInvention at 8:22 AM on March 30, 2011 [3 favorites]


Oh and remember that after mapping 6 letter words to numbers, you need to then remove duplicate numbers.
posted by EndsOfInvention at 8:23 AM on March 30, 2011


The first thing I thought of when I read "six-letter words" was Scrabble, and yup, the first Google result for "six letter words" was this list of valid Scrabble words. The Scrabble wordset contains a number of words that might not be familiar to the average person but it's a good starting point.

The easiest thing might to be map from words to numbers. The other approach is to write a quick program to determine all the valid words for a given number. Naive implementation: take the (I think) 4096 letter combinations for a six-digit number and see which ones are on the list.

Warning: if you're going from words to numbers, remember that multiple words will map to the same number.
posted by flipper at 8:25 AM on March 30, 2011


Oh and as for mapping... simplest way if you're not a programmer might be: put all the codes in two columns in Excel. Select the second column and do a Find/Replace for A to 1, then B to 1, .... Y to 6, z to 6. You'll end up with 1 column of words and another of their corresponding number codes.
posted by EndsOfInvention at 8:26 AM on March 30, 2011


Given EndsOfInvention's list of words, it seems fairly straightforward to use Excel to figure out the appropriate number combination for each. Then the whole list of word/number combinations could be sorted however you like.
posted by jon1270 at 8:27 AM on March 30, 2011


Or, what he said.
posted by jon1270 at 8:27 AM on March 30, 2011


Here's a perl oneliner to generate all possible combinations:

perl -lne 'BEGIN { %m = map { $_ => int $i++ / 4 + 1 } (a..p,r..w,"y"..z) } if (/^[a-pr-wy-z]{6}$/i) { push @{$n{join "", map $m{$_}, split //, lc}}, uc; } }{ print "$_: @{$n{$_}}" for sort keys %n' /usr/share/dict/words

Here's the output.
posted by Rhomboid at 10:21 AM on March 30, 2011


The Scrabble list in flipper's link seems to have a lot more usable six letter words compared to the dictionary (15281 vs 8988) so here's the output using that instead.
posted by Rhomboid at 10:28 AM on March 30, 2011


Using that larger list you still only get 8729/6^6 = 18.7% percent coverage of your total keyspace, however. Depending on your application that may or may not be acceptable.
posted by Rhomboid at 10:41 AM on March 30, 2011


« Older I remember an animated movie t...   |  Can you translate the Japanese... Newer »
This thread is closed to new comments.