loco2.tcl?true_80_fable
where loco2.tcl is the name of the CGI script. The words in
file fable (`Fables de la Fontaine') have been indexed, and
the eightieth word has been selected (the word naissiez,
see Figure 1).
The result from the server is directed to the frame for morphological output (on the client side). The document provides not only output visible to the user (in this case Analysis: naître+IndI+PL+P2+FinV), but also a JavaScript function call, where the result of the analysis serves as an argument, for instance:
top.other('na%eetre&FinV')
Only the lemmatization is used, naître FinV (%ee
is the URI encoding for î), the derivation of
naissiez is not relevant to further processing.
Using this argument, the function top.other() then sends two
more request to the server, one for dictionary look-up, and one for
example look-up, directing the output to the appropriate frames, i.e.,
the client-side "Dictionary Entry" and "Examples"
frames. See Figure 3.
Figure 3: The flow of information between the major components of the Glosser-Web prototype.
function display (i) {
if (useLoco)
loco.location.replace ("/glosser_bin/loco2.tcl?true_"
+ i + "_" + file);
else if (useDict)
dict.location.replace ("/glosser_bin/loco2.tcl?false_"
+ i + "_" + file);
else if (useExp)
exp.location.replace ("/glosser_bin/loco2.tcl?false_"
+ i + "_" + file);
}
The boolean variables useLoco, useDict, and
useExp reflect whether or not visible output is desired for
morphological analysis, dictionary look-up, and example look-up,
respectively. If, for instance, useLoco is false and
useDict is true, the first argument to the CGI request is
false, and the output is directed to the dictionary frame,
instead of the morphology frame. The false argument tells the CGI
script not to produce any visible output. The script does return a HTML
document, including the call to the JavaScript function
top.other(), but with an empty body. So,
all the user sees is
the dictionary frame going temporarily blank, before the result of
dictionary look-up appears.
If both useLoco and useDict are false but useExp is true, then the example frame is used to temporarily hold the invisible output of the morphological analysis.
var GlosserTwo = true;
if (!top.GlosserTwo)
setTimeout("top.location=location",2000);
First, a boolean variable is set to true in the current document, then
its presence is tested in the top document. If it isn't there, the
location at the top is set to the location of the Glosser-Web frameset.
A time-out of two seconds is used, allowing the user later to back-out
to previous web locations, without getting stuck at the current
location.
The frameset contains all JavaScript functions, and defines four more variables. However, these variables are never set from within this frameset or its functions. The variables are used to hold the following information: the name of the document in the main text frame, and three booleans that indicated whether the frames for morphological analysis, dictionary look-up, and example look-up are activated. All variables are set by documents being loaded into these frames. For instance, if morphological output is requested by the user, any document appearing in the frame for morphological output has this JavaScript statement:
top.useLoco=true
The reason for this is as follows: when you first enter Glosser-Web all
variables need to be initialised. If variables were set from within the
frameset, all variables would be reset whenever you return to the site
from another site, even if you used your browser's Back button. In the
current set-up, all variables will be reinitialised to the proper values
reflecting the current content of the frames.
Results of analysis are not directed to a frame by setting that frame's location, but by using the JavaScript function location.replace(). This means that analyses are not entered into the browser's history list. The user can click the browser's Back button to back-out of the current Glosser-Web main text frame, without first having to go through all the results of previous analyses.