leeo
unread,Feb 27, 2012, 12:13:18 PM2/27/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Plover
I have a prioritized list of dictionaries -- the system should behaive
exactly like it would if all the dictionaries in use were merged, and
in the case of the same key sequence (series of strokes), the
dictionary with the higher priority should prevail.
Each dictionary keys to a sequence of strokes, and I sort the
dictionary keys in "lexical" or prefix order -- If a series of strokes
matches an entry, if that same series of strokes prefixes another
entry in the dictionary, it immediately follows.
Given a stroke, I ask each active dictionary to perform a lookup based
on that stroke. The results can be either { nonmatch, prefix,
prefixmatch, match }. non-match means the sequence of strokes (or
single stroke) is not in the dictionary and does not prefix any other
entry in the dictionary. prefix means that the sequence of strokes
doesn't match anything in the dictionary, but conceivably might after
receiving more strokes. prefixmatch means that I have a match, but it
might match a longer sequence, because this entry also prefixes
another entry in the dictionary. match means that the sequence of
strokes definitely matches and cannot conceivably match any other
entry after additional strokes are received in the future. To verify
if a match is also a prefix, check if the series of strokes is a
prefix to the next entry in the dictionary. Of course, if you're at
the last entry in the dictionary, it cannot be a prefix.
I collect all the dictionary reports to that match, and decide which
one to honor based on priority, possible completion from strokes yet
to arrive, and so forth: That is the state of the algorithm so far.