1.4. Segmenting data into smaller units¶
We have seen previously how to combine several segmentations into a single one. We will often be performing the inverse operation: create a segmentation whose segments are parts of another segmentation’s segments. Typically, we will be segmenting strings into words, characters, or any kind of text units that will be later counted, measured, and so on. This is precisely the purpose of widget Segment.
To try it out, create a new workflow with an instance of Text Field connected to Segment, itself connected to Display (see figure 1 below). In what follows, we will suppose that the string typed in Text Field is a simple example.

The interface of Segment (see figure 2 below) illustrates a feature shared by most Orange Textable widgets: the Advanced settings checkbox triggers the display of more complex controls offering more possibilities to the user. For now we will stick to the basic settings and leave this box unchecked.

Figure 2: Interface of the Segment widget, configured for word segmentation¶
Segment offers several parameters in the drop-down menu named segment type. Try using them to segment the text into lines, letters, or words, then check the result in Display.
The option of using a regular expression is quite powerful and we will return to it later in this tutorial..