File: node32.html

package info (click to toggle)
gtkeyboard 1.1.7-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,284 kB
  • ctags: 1,234
  • sloc: ansic: 12,255; sh: 2,805; makefile: 328; perl: 32
file content (184 lines) | stat: -rw-r--r-- 6,296 bytes parent folder | download | duplicates (2)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2K.1beta (1.48)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Word Completion Cache Files</TITLE>
<META NAME="description" CONTENT="Word Completion Cache Files">
<META NAME="keywords" CONTENT="MANUAL">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v2K.1beta">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="MANUAL.css">

<LINK REL="next" HREF="node33.html">
<LINK REL="previous" HREF="node31.html">
<LINK REL="up" HREF="node29.html">
<LINK REL="next" HREF="node33.html">
</HEAD>

<BODY >
<!--Navigation Panel-->
<A NAME="tex2html533"
  HREF="node33.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="/usr/share/latex2html/icons/next.png"></A> 
<A NAME="tex2html529"
  HREF="node29.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="/usr/share/latex2html/icons/up.png"></A> 
<A NAME="tex2html523"
  HREF="node31.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="/usr/share/latex2html/icons/prev.png"></A> 
<A NAME="tex2html531"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="/usr/share/latex2html/icons/contents.png"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html534"
  HREF="node33.html">Creating Cache Files</A>
<B> Up:</B> <A NAME="tex2html530"
  HREF="node29.html">Word Completion</A>
<B> Previous:</B> <A NAME="tex2html524"
  HREF="node31.html">Word Completion Options</A>
 &nbsp <B>  <A NAME="tex2html532"
  HREF="node1.html">Contents</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION00730000000000000000">
Word Completion Cache Files</A>
</H1>

<P>
Word completion in GTKeyboard uses a special cache file that guides
GTKeyboard in suggesting which word may be the most useful to insert
given a particular set of characters.  For example, when you type the
letter ``c'', how does GTKeyboard know whether you're thinking
of the word ``cache'', ``communist'', ``catchy'', ``cantankerous'', or
any of the other hundreds of words that start with ``c''?

<P>
Well, frankly, it doesn't.  But it can take a good guess.  This is
what cache files are for.  A cache file specifies a list of words with
their frequencies.  For example, in a text file about Darwin and
Evolution, the term ``evolution'' or the term
``species'' may be quite common.  The common terms are the
terms that we want to appear first in the completion list given the
beginning of the word.  The frequency of different words provided by
the cache file fits this role perfectly.

<P>
The default user cache file is located at
<I>/.gtkeyboard-wordcache</I>.  It will contain a list of an
arbitrary number of words with their frequencies in a given document.
Although the file is not meant to be edited by hand, its general form
looks like this:
<BR>
<BR><I>5 above
<BR>
1 absence
<BR>
2 accept
<BR>
1 acceptance
<BR>
2 access
<BR>
1 accompanies
<BR>
1 accord
<BR>
1 achieve
<BR>
2 act
<BR>
1 actions
<BR>
2 add
<BR>
1 addition
<BR></I>
Simply a number corresponding to the number of times the word occured
in the document followed by the word itself.  (The word
``above'' occurred 5 times, but the word
``acceptance'' occured only once) If this cache file were
used in GTKeyboard, and the character ``a'' were typed,
GTKeyboard would suggest 10 completions, from the most often occuring
to the least often occuring.  The way the words are ranked is by the
frequency number found in the cache file.

<P>
When a new completion window is created, GTKeyboard will always
load <I>/.gtkeyboard-wordcache</I> if it exists.  If it doesn't,
then GTKeyboard has to do the best it can, and usually loads the
dictionary file.  (This file is often located at
<I>/usr/dict/words</I> on may GNU/Linux systems).  While the
dictionary file is not optimal, it still produces decent results
depending on the application.

<P>
To load a new cache file into GTKeyboard's word completion
facility, click on the ``Load Cache File'' button in the main
word completion window.  It will present you with a file chooser
dialog.  Once you hit ``OK'', the new cache file will be
loaded in.

<P>
Users may find it interesting to have different cache files for
different tasks to speed up the task at hand.  For general text
editing that doesn't really have a particularly well defined domain,
using no cache file, (letting GTKeyboard use only
<I>/usr/dict/words</I>) is usually best.  For specialized tasks,
such as Perl or HTML programming with GTKeyboard, a specialized cache
the word ``print'' over the word ``perfect'' would be
very helpful, since ``print'' is the name of a built in Perl
function, and ``perfect'' isn't, even though it would occur
more often than ``print'' if the document were a general text
document.

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html533"
  HREF="node33.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="/usr/share/latex2html/icons/next.png"></A> 
<A NAME="tex2html529"
  HREF="node29.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="/usr/share/latex2html/icons/up.png"></A> 
<A NAME="tex2html523"
  HREF="node31.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="/usr/share/latex2html/icons/prev.png"></A> 
<A NAME="tex2html531"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="/usr/share/latex2html/icons/contents.png"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html534"
  HREF="node33.html">Creating Cache Files</A>
<B> Up:</B> <A NAME="tex2html530"
  HREF="node29.html">Word Completion</A>
<B> Previous:</B> <A NAME="tex2html524"
  HREF="node31.html">Word Completion Options</A>
 &nbsp <B>  <A NAME="tex2html532"
  HREF="node1.html">Contents</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
David Allen
2001-04-26
</ADDRESS>
</BODY>
</HTML>