discussion of handling multiple dictionaries

25 views
Skip to first unread message

leeo

unread,
Feb 27, 2012, 12:13:18 PM2/27/12
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.

Mirabai Knight

unread,
Feb 27, 2012, 11:55:42 PM2/27/12
to plove...@googlegroups.com
This is definitely something that we'd like to eventually support in
Plover too. I use multiple dictionaries with my proprietary software
all the time on the job, and it's a significant lack in the current
version of Plover, though I'd argue that just-in-time dictionary
definitions and finishing of the various ports (especially Windows and
Mac OS) are higher ones.
Reply all
Reply to author
Forward
0 new messages