1.2. Keyboard input, widget labelling and segmentation display

Typing or pasting text in a Text Field widget is the simplest way to import a string in Orange Textable. As a result, the widget creates a segmentation with a single segment covering the entire string. (see figure 1 below):

Example usage of text field

Figure 1: Typing text in widget Text Field.

Each segmentation is identified by a label which is the name of the widget that creates the segmentation. It is a good habit to rename widgets to make the label more meaningful. To do so, right-click on the widget, select Rename or press F2, then enter the new name.

Example Widget Label

Figure 2: Typing an extract of Hamlet in widget Text Field and giving it a label (Hamlet).

This widget’s simplicity makes it most adequate for pedagogic purposes. Later, we will discover other, more powerful ways of importing strings such as the Text Files and URLs widgets. These import widgets create a segmentation with one segment for each imported file or URL.

The Display widget can be used to visualize the details of a segmentation. By default, it shows the segmentation’s label followed by each successive segment’s content (see figure 3 below).

Example usage of widget Display

Figure 3 : Viewing Hamlet in widget Display.

The numbers between square brackets after the segment number constitute the address of the segment, consisting of three elements: 1) string index 2) initial position within the string 3) final position. The text corresponding to a given segment is called the segment’s content.

By default, Display passes its input data without modification to its output connections. It is very useful for viewing intermediate results in an Orange Textable workflow and making sure that other widgets have processed data as expected.

See also