# Merging segmentations together

Computerized text analysis often implies consolidating various text sources into a single corpus. In the framework of Orange Textable, this amounts to grouping segmentations together, and it is the purpose of the :ref:Merge widget.

To try out this widget, create on the canvas two instances of :ref:Text Field, an instance of :ref:Merge and an instance of :ref:Display (see :ref:figure 1 <merging_segmentations_together_fig1> below). Type a different string in each :ref:Text Field instance (e.g. a simple example and another example) and assign it a distinct label (e.g. text_string and text_string2). Eventually, connect the instances as shown on :ref:figure 1 <merging_segmentations_together_fig1>.

Figure 1: Grouping a simple example with another example using widget :ref:Merge.

The interface of widget :ref:Merge (see :ref:figure 2 <merging_segmentations_together_fig2> 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 the box unchecked.

Figure 2: Interface of widget :ref:Merge.

Section Ordering of the widget's interface lets the user view the labels of incoming segmentations and control the order in which they will appear in the output segmentation (by selecting them and clicking on Move Up / Down). The Output segmentation label can be set in section Options. We will return :doc:later <annotating_merging> to the purpose of checkbox Import labels with key; leave it unchecked for now.

Figure 3: Merged segmentation.

:ref:Figure 3 <merging_segmentations_together_fig3> above shows the resulting merged segmentation, as displayed by widget :ref:Display. As can be seen, :ref:Merge makes it easy to concatenate several strings into a single segmentation. If the incoming segmentations contained several segments, each of them would appear in the output segmentation, in the order specified under Ordering (and, within each incoming segmentation, in the original order of segments).

Exercise: Can you add a new instance of :ref:Merge to the scheme illustrated on :ref:figure 1 <merging_segmentations_together_fig1> above and modify the connections (but not the configuration of existing widgets) so that the segmentation given in :ref:figure 4 <merging_segmentations_together_fig1> below appears in the :ref:Display widget? (:ref:solution <solution_merging_segmentations_together_ex>)

Figure 4: The segmentation requested in the :ref:exercise <merging_segmentations_together_ex>.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.