Class H4WriterExperiment

java.lang.Object
  extended by H4WriterExperiment

public class H4WriterExperiment
extends java.lang.Object

H4WriterExperiment - experiment software to test and demonstrate text input using Huffman coding.

If you are unfamiliar with H4-Writer begin by reading the first paper below.

Related references

The first paper below describes the rationale and specific details for designing text entry methods using Huffman coding. It also details the design and evaluation H4-Writer. The remaining papers describe extensions of H4-Writer to wearable computing, gesture input, and smart phones, respectively.

Running the experiment software

Click here for instructions on launching/running the application.

Setup parameters

Upon launching, the application presents a setup dialog:

The default parameter settings are read from a configuration file called H4WriterExperiment.cfg. This file is created automatically when the application is launched for the first time. The default parameter settings may be changed through the setup dialog. The setup parameters are as follows:

Program operation

The program can work with Huffman codes in base 2 through to base 10. The number of keys is equal to the code base. The following are examples for base 2, base 4, and base 10: (click to enlarge)

The virtual keys are laid out, left to right, as many as needed. The left-most key is selected by pressing 1 on the system's keyboard. The next key is selected by pressing 2, and so on.

Mouse input is also supported. Just click on a key to select it.

There are two Huffman code trees for each code base, a basic tree containing the most common symbols and codes (e.g., letters, period, comma, SPACE, BACKSPACE, ENTER, SYMBOL), and a symbol tree for special symbols (e.g., digits, punctuation). Here are links to view the code trees:

Code base 2:      h2.txt     h2-sym.txt
Code base 3:      h3.txt     h3-sym.txt
Code base 4:      h4.txt     h4-sym.txt
Code base 5:      h5.txt     h5-sym.txt
Code base 6:      h6.txt     h6-sym.txt
Code base 7:      h7.txt     h7-sym.txt
Code base 8:      h8.txt     h8-sym.txt
Code base 9:      h9.txt     h9-sym.txt
Code base 10:    h10.txt    h10-sym.txt

In operation, entering "[symbol]" from the basic tree causes a transition to the symbol tree. The next selection is from the symbol tree. If the next selection is " [SymLock]" the symbol tree remains active for the input of multiple symbols, until " [SymLock]" is again selected.

The base-4 case — H4-Writer — is a configuration of particular interest. The GUI has a special look when the program is launched for 4-key input (if the option "H4Writer gamepad layout" is checked):

For this mode, it is intended that text will be entered with a four-key device, such as a gamepad:

Input will use the D-pad on a gamepad, with LEFT = 1, UP = 2, RIGHT = 3, and DOWN = 4. For the gamepad to work, software such as Xpadder must be installed and configured so that the gamepad keys generate the appropriate keystroke events on the host system. This is the mode of input used in the original paper presenting H4-Writer (click here to view).

As established in the original test of H4-Writer, users learn the codes after a few hours of practice. At this juncture, the rendering of the symbols on the keys is not needed. If the setup parameter "Show symbols on keys" is unchecked, the symbols do not appear. Here's an example for H4-Writer:

Output data files

At the end of each block, data are written to two "summary data" (sd) files. The "sd1" file contains data on a per-keystroke basis, one line per keystroke. The "sd2" file contains data on a per-phrase basis, one line per phrase. Example data files follow:

The data in the sd2 file are full-precision, comma-delimited. Importing into a spreadsheet application provides a convenient method to examine the data on a phrase-by-phrase basis. Here's how the data might look after importing into Microsoft Excel: (click to enlarge)

Actual output files use "H4WriterExperiment" as the base filename. This is followed by the participant code, the condition code, the session code, and the block code, for example, H4WriterExperiment-P01-C99-S07-B01.sd2.

Miscellaneous

During entry, a phrase may be aborted by pressing "r" ("restart") on the system's keyboard. This will terminate the current phrase and bring up a new phrase for input. "r" must be pressed before "Enter" ("LU" for H4-Writer) is entered. Data for the aborted phrase are not saved.

If "r" is pressed between phrases (i.e., after "Enter" is entered), the effect is to erase the newly-presented phrase and bring up a new phrase. Data for the previous phrase, which have already been written to disk, are not affected.

When using this program in an experiment, it is a good idea to terminate all other applications and disable the system's network connection. This will maintain the integrity of the data collected and ensure that the program runs without hesitations.

Author:
Scott MacKenzie, 2010-2014

Constructor Summary
H4WriterExperiment()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

H4WriterExperiment

public H4WriterExperiment()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException