[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Word Completion by Association
From: |
Bijan Soleymani |
Subject: |
Re: Word Completion by Association |
Date: |
06 Mar 2003 10:39:37 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
googleartist@yahoo.com (Artist) writes:
> How difficult is to develop something like this? Any hints would be
> useful.
It all depends on how efficient you want it to be.
The worst way to do it is to keep a list of all words, and scan
through the entire list for each key enterred :)
A better way is to determine what letters are in each word in your
list. Then store the list of words with each letter.
have a list for words with a,
another for words with b, etc.
so "hello"
would be in the 'e','h','l' and 'o' lists (maybe have a list for
multiple occurences of letters 'l' x 2)
Then for a particular input, for example "fmt", check for words that
are in the 'f', 'm' and 't' lists, and use the first one.
This is still not very efficient, but it is very easy to do.
Bijan
Re: Word Completion by Association, Stefan Monnier, 2003/03/10