Contents - Index - Previous - Next


Cumulative Sorting



Sorts in Concordance take effect cumulatively. This is not always easy to understand, so a fuller explanation follows.

The main help page about sorting introduces this idea: "For example, if you sort headwords by descending alphabetical order and then by frequency of occurrence, a run of words which all have the same frequency of occurrence will still be arranged in descending alphabetical order."  We could add, however, that after the second sort is applied, the list as a whole is ordered by frequency of occurrence, not by descending alphabetical order: it cannot be ordered by both, since one cannot have two mutually contradictory sort criteria applying at the same time. However, if we now consider any part of the list (a sub-list, so to speak) consisting of a run of items that all have the same frequency of occurrence, they will be ordered not at random but according to the previously-applied sort criterion, descending alphabetical order.

Let's take a familiar example by considering what happens when we first load a concordance. Contexts are initially sorted by their line number (strictly speaking, by order of occurrence ascending, which means that even if the same word occurs several times in the same line, all instances of the word will appear in their original order). Now apply another context sort, say 'by word after headword'. Look for a run of instances where the word after the headword is the same several times in succession (the new sort has, of course, brought any such examples adjacent to each other). Notice these few instances, considered as a sub-list, are themselves still arranged according to their order of occurrence: this is easily if loosely seen by looking at the line number. This is how cumulative sorting works. 

Go one step further, and sort the contexts by word before headword. Now find an example where the word before the headword is the same several times in succession. This sub-list will still be ordered by the word after the headword. Further, if there is now a run of words where not only the word before the headword is the same but also the word after the headword is the same, that run of words after the headword will be ordered by the order of occurrence (the first of the three sorts applied). Therefore three sorts have been applied cumulatively. 

To sum up, prior sorts apply only to sub-sections of the list with equal values under the current sort.