3 # ScummVM - Scumm Interpreter
4 # Copyright (C) 2006 The ScummVM project
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 # This script constructs dictionary for use with predictive input
26 # Feed it with list of words. One word per line
33 s/[\x7f-\xff]//g; # remove unprintable characters
35 next if /^.$/; # skip one character words
36 next if $_ eq ""; # skip empty words
43 for $_ (sort keys %words) {
56 $list{$_} .= "$word ";
59 for $k (sort keys %list) {
62 print "$k $list{$k}\n";