all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bijan Soleymani <bijan@psq.com>
Subject: Re: Word  Completion by  Association
Date: 06 Mar 2003 10:39:37 -0500	[thread overview]
Message-ID: <87heagsdvq.fsf@server.crasseux.com> (raw)
In-Reply-To: de3ad953.0303050642.63a87de7@posting.google.com

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

  reply	other threads:[~2003-03-06 15:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-03 20:13 Word Completion by Association Artist
2003-03-03 23:16 ` jean daniel browne
2003-03-03 23:52 ` Unknown
2003-03-04  2:36   ` Artist
2003-03-04  4:06     ` Unknown
2003-03-04 18:51     ` Edward O'Connor
2003-03-05 14:42       ` Artist
2003-03-06 15:39         ` Bijan Soleymani [this message]
2003-03-10 20:09 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87heagsdvq.fsf@server.crasseux.com \
    --to=bijan@psq.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.