blob: 557a74686f8281b3548b58fc837e3fd329fb5e6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
###################################################################
#
# ktouch-gen.pl
#
# written by: Steinar Theigmann <[email protected]>
# H�vard Fr�iland <[email protected]>
#
# This file describes how to generate your own training files
# in 3. steps.
#
Step 1: Collect data
The script needs a data file with words, one word on each line. You
can create it in your editor, or you can get it generated (see
below). You will also find some data files in cvs.
Suggestion for creating your own data file using an excisting dictionary. See http://aspell.sourceforge.net for more info.
$ aspell dump master
This will print out a looong list with words in the default
language. If you have installed other languages that you want to use
you can write:
$ aspell dump master norwegian
This will print out all the norwegian words found in the norwegian
ditionary.
Since we don't want this word on the screen, but in a file we do this:
$ aspell dump master > ~/your-word-file
You will now have a file called your-word-file stored in your home directory.
Step 2: Creat a configuration file
The config file is shown below.
<---- the file starts here ---->
length-of-line 20
number-of-line 10
jf
kd
ls
ca
nt
iv
me
hr
go
bp
qu
wn
cx
yz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
<---- the file ends here ---->
The length of a line is set to be 20 characters, and each level should
be 10 lines loong. The first level will only contain combinations of
"jf" and the next one will contain "jfkd" and so on.
Save it to a file called your-config-file, and we are ready to try the script.
Step 3: Generate your training file
To test the script you should do this:
$ perl ktouch-gen.pl your-config-file < your-word-file
This will print out the newly generated training file to your screen,
if you are happy with it, you could save it to file by doing this.
$ perl ktouch-gen.pl your-config-file < your-word-file > your-training-file.ktouch
|