Complex Retrieval Functions

This page describes the functions of the Complex Coding Query. Each function compares the codes you place in Window A, and some functions also use Window B and Window C.

Intersection ("small picture")

Definition: Retrieves only the parts of segments that have all the codes in Window A assigned to them.

How it works

  1. Activate the relevant documents in the documents window.
  2. Go to Analysis > Complex Coding Query and select this function.
  3. Activate the codes you need in the codes window, then click All activated codes in Window A.
Every code in Window A must match
A segment is listed only if all the codes in Window A are assigned to it.

Changing the activations in the documents window immediately changes your results.

For this function, it is often helpful to turn on Include the subcodes, so that all combinations of intersections between each code and its subcodes are included automatically. You can find this option in the local settings of the Retrieved Segments window: click the gear icon in the window's toolbar.

Example

Example of the Intersection function

Intersection (Set)

Definition: Retrieves only the parts of segments that have at least X of the codes in Window A assigned to them. You specify the number X in Window C.

How it works

  1. Activate the relevant documents in the documents window.
  2. Go to Analysis > Complex Coding Query and select this function.
  3. Activate the codes you need in the codes window, then click All activated codes in Window A.
  4. Set the minimum number of codes that must intersect in Window C.

The Results window shows how many segments would be retrieved based on the intersections.

In the example, the codes "Friends", "Happy", and "Leisure" are in Window A, and Window C requires at least two intersections. Only the intersection of "Friends" and "Leisure" meets the condition, so only it is listed in the Retrieved Segments window. Only the part of the coded segments that is coded with two of the codes is displayed.

Example

Example of the Intersection (Set) function

Overlapping ("big picture")

Definition: Retrieves the full segments where at least one part is assigned all the codes in Window A.

How it works

  1. Activate the relevant documents in the documents window.
  2. Go to Analysis > Complex Coding Query and select this function.
  3. Activate the codes you need in the codes window, then click All activated codes in Window A.
Every code in Window A must match
A segment is listed only if it is coded with all the codes in Window A.

The Overlapping function works like the Intersection function, but it displays the results differently. It returns the entire coded segments that overlap, not just the part that is coded with both codes.

As with the Intersection function, it is often helpful to include subcodes in the query. All combinations of subcodes are then tested for overlap.

Example

Example of the Overlapping function

Only one code

Definition: Retrieves segments where only one of the codes in Window A is assigned, and none of the other codes in Window A.

How it works

  1. Activate the relevant documents in the documents window.
  2. Go to Analysis > Complex Coding Query and select this function.
  3. Activate the codes you need in the codes window, then click All activated codes in Window A.

If Window A contains "Friends" and "Happy", the first two examples on the right are retrieved, because their codes do not overlap each other. It makes no difference that "Happy" and "Nature" overlap, because "Nature" is not in Window A. The last example is not retrieved, because "Friends" and "Happy" intersect.

Example

Example of the Only one code function

Only this code

Definition: Retrieves segments where the code selected in Window B is assigned, but none of the codes in Window A.

This function is similar to the Only one code function, but it targets one selected code. Select the target code in Window B and the other codes in Window A as usual.

How it works

  1. Activate the relevant documents in the documents window.
  2. Go to Analysis > Complex Coding Query and select this function.
  3. Activate the codes you need in the codes window, then click All activated codes in Window A.
  4. Select the relevant code in Window B. The fastest way is to drag it from the codes window into Window B.

Example: The code "Friends" is selected in Window B, and "Nature" and "Happy" are in Window A. If "Nature" or "Happy" intersects with "Friends", "Friends" is not listed. This is the case in the second and third examples on the right. Only the first example shows "Friends" without an intersection with "Nature" or "Happy", so only it is listed in the Retrieved Segments window.

Example

Example of the Only this code function

If outside

Definition: Retrieves segments assigned to any of the codes in Window A that do not overlap or intersect with a segment assigned to the code selected in Window B.

How it works

  1. Activate the relevant documents in the documents window.
  2. Go to Analysis > Complex Coding Query and select this function.
  3. Activate the codes you need in the codes window, then click All activated codes in Window A.
  4. Select the relevant code in Window B. The fastest way is to drag it from the codes window into Window B.

Example: This function helps if you are looking for passages where people talk about happiness, but you do not want those that appear in the context of their friendships.

"Happy" is in Window A and "Friends" is in Window B, so you are looking for instances of "Happy" that are completely outside "Friends". In the examples on the right, only the third is retrieved. In the first, "Happy" is not there, and in the second, "Happy" is not completely outside "Friends".

Example

Example of the If outside function

If inside

Definition: Lists segments where the code in Window A is completely surrounded by the code in Window B. The results can be the segments of the inner code (Window A) or of the outer code (Window B).

How it works

  1. Activate the relevant documents in the documents window.
  2. Go to Analysis > Complex Coding Query and select this function.
  3. Activate the codes you need in the codes window, then click All activated codes in Window A.
  4. Select the relevant code in Window B. The fastest way is to drag it from the codes window into Window B.

Example: Say you are interested in what people said about their happiness, but only in statements about their friends. In the examples on the right, only the first shows "Happy" (Window A) completely inside "Friends" (Window B). That is not the case in the second or third example.

Example

Example of the If inside function

Followed by

Definition: Retrieves segments assigned to any of the codes in Window A that are followed by a segment assigned to the code selected in Window B within no more than X paragraphs. You specify the number X in Window C. This function does not work in image or PDF documents.

How it works

  1. Activate the relevant documents in the documents window.
  2. Go to Analysis > Complex Coding Query and select this function.
  3. Activate the codes you need in the codes window, then click All activated codes in Window A.
  4. Select the relevant code in Window B. The fastest way is to drag it from the codes window into Window B.
  5. Enter the maximum number of paragraphs allowed between the codes in Window C. If you enter 0, the segment in Window B must begin in the same paragraph as the segment in Window A.

You can define which results this function generates: the segments of the Window A code that are within distance X before the Window B code, the coded segments of the Window B code, or both. The last option is rarely needed.

Example: In the example on the right, we are looking for "Friends" (Window B) following "Happy" (Window A) within one paragraph. This applies to both appearances of "Happy", because "Friends" follows it directly in both cases.

Example

Example of the Followed by function

Near

Definition: Retrieves segments assigned to any of the codes in Window A that are preceded or followed by a segment assigned to the code selected in Window B within no more than X paragraphs. You specify the number X in Window C. This function does not work in image or PDF documents.

How it works

  1. Activate the relevant documents in the documents window.
  2. Go to Analysis > Complex Coding Query and select this function.
  3. Activate the codes you need in the codes window, then click All activated codes in Window A.
  4. Select the relevant code in Window B. The fastest way is to drag it from the codes window into Window B.
  5. Enter the maximum number of paragraphs allowed between the codes in Window C. If you enter 0, the segment in Window B must begin in the same paragraph as the segment in Window A.

You can define which results this function generates: the segments of the Window A code that are within distance X of the Window B code, the coded segments of the Window B code, or both. The last option is rarely needed.

Example: We are looking for places where "Happy" (Window A) and "Friends" (Window B) are found within one paragraph of each other (Window C). In the screenshot, "Happy" appears twice, and both times it is within one paragraph of "Friends".

We chose to view the Window A code in the Retrieved Segments window, but we could also have chosen to list the Window B code or both.

Example

Example of the Near function

Was this page helpful?